Uniq Posted July 19, 2013 Share Posted July 19, 2013 Hi I wanted to add this code from we heart onto to my page <a href="//weheartit.com/heart-it" class="heart-it-button" data-type="vertical" data-image-url="" data-source-url="www.uniqjewelrydesigns.com">Heart It</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//assets.whicdn.com/assets/heart_it_button.js";fjs.parentNode.insertBefore(js,fjs);}else if(whi){whi.HeartItWidget();[spam-filter](document,"script","whi-heartitbutton");</script> I wanted to add it under the tumbler button seen here : http://uniqjewelryde...-necklace-.html I have tried product tpl, all different blocks and apparently i'm not doing it right lol. Can someone please help and Thanks in advance !! Link to comment Share on other sites More sharing options...
vekia Posted July 19, 2013 Share Posted July 19, 2013 use {literal}{/literal} tags for java scripts: {literal} <a href="//weheartit.com/heart-it" class="heart-it-button" data-type="vertical" data-image-url="" data-source-url="www.uniqjewelrydesigns.com">Heart It</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//assets.whicdn.com/assets/heart_it_button.js";fjs.parentNode.insertBefore(js,fjs);}else if(whi){whi.HeartItWidget();[spam-filter](document,"script","whi-heartitbutton");</script> {/literal} 1 Link to comment Share on other sites More sharing options...
Uniq Posted July 19, 2013 Author Share Posted July 19, 2013 Thank you so much !! That worked Link to comment Share on other sites More sharing options...
vekia Posted July 19, 2013 Share Posted July 19, 2013 you're welcome im glad that i could help you now i can mark this thread as [solved] best regards Link to comment Share on other sites More sharing options...
Uniq Posted July 19, 2013 Author Share Posted July 19, 2013 (edited) Ok I have one more problem. On the widget it asks for image url, Is there anyway i can hook it into the code so that it will automatically add the image url? because adding them individually gives me duplicate buttons on each product :/ Thanks {literal}<a href="//weheartit.com/heart-it" class="heart-it-button" data-type="vertical" data-image-url="" data-source-url="www.uniqjewelrydesigns.com">Heart It</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//assets.whicdn.com/assets/heart_it_button.js";fjs.parentNode.insertBefore(js,fjs);}else if(whi){whi.HeartItWidget();[spam-filter](document,"script","whi-heartitbutton");</script>{/literal} Edited July 19, 2013 by Uniq (see edit history) Link to comment Share on other sites More sharing options...
Uniq Posted July 19, 2013 Author Share Posted July 19, 2013 I currently have the code added to "themes/default/product.tpl Link to comment Share on other sites More sharing options...
Recommended Posts