Pippo3000 Posted February 28, 2013 Share Posted February 28, 2013 folks, I got some code snippet to show a feedback widget on the leftmost side of the screen., see attached screenshot. problem is I have no idea where to put that code snippet to show on all pages of my shop on the left side? any idea? The snippet is basically this (changed few lines referring to my account) <!-- SHOPLUPE WIDGET v2 START --> <script type="text/javascript"> (function(){ // Shoplupe Widget 2.0 Options var swOpt = {}; swOpt.shopId = 'xxxx'; swOpt.mainUrl = 'sf.shoplupe.com/widget/'; swOpt.pubKey = 'yyyy'; // Shoplupe Widget 2.0 Loader swStart=function(){var a="function"==typeof jQuery?"shoplupe_widget.jquery.min.js":"shoplupe_widget.js",d=document.createElement("script"),b=document.createElement("link"),c=new Date,c=c.getDay()+""+c.getMonth()+""+c.getFullYear();d.type="text/javascript";b.type="text/css";d.async=!0;b.async=!0;d.src=document.location.protocol+"//sf.shoplupe.com/widget/js/"+a+"?v="+c;b.href=document.location.protocol+"//sf.shoplupe.com/widget/css/shoplupe_widget.css?v="+c;b.rel="stylesheet";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);a.parentNode.insertBefore(d,a);var e=setInterval(function(){"object"==typeof ShoplupeWidget&&(ShoplupeWidget.init(swOpt),clearInterval(e))},100)};window.addEventListener?window.addEventListener("load",swStart,!1):window.attachEvent?window.attachEvent("onload",swStart):swStart(); })(); </script> <!-- SHOPLUPE WIDGET v2 END --> thanks phil Link to comment Share on other sites More sharing options...
tomerg3 Posted February 28, 2013 Share Posted February 28, 2013 You should be able to add this in header.tpl, as it looks like it adds itself dynamically Link to comment Share on other sites More sharing options...
Pippo3000 Posted February 28, 2013 Author Share Posted February 28, 2013 (edited) Thanks Tomer for jumping in. Added that code at the very end of the header.tpl and my site did not load anymore, just saw a blank white page. Any idea where it shall go exactly? Edited February 28, 2013 by Pippo3000 (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted February 28, 2013 Share Posted February 28, 2013 add {literal}{/literal} around the code. 1 Link to comment Share on other sites More sharing options...
Pippo3000 Posted March 1, 2013 Author Share Posted March 1, 2013 Tomer, you (again) made my day. The literal solved it. Thank you so much for your outstanding support here! Phil Link to comment Share on other sites More sharing options...
Pippo3000 Posted March 1, 2013 Author Share Posted March 1, 2013 Tomer, maybe you can even help here: the widget shows now. Great. But I realized that it also shows on the popups for T&C, shipping and such which open in an extra windows which now also has the widget on the left side, covering partly the content of the infobox. Any idea how to basically exclude these popups from the header.tpl? Your help is greatly appreciated Phil Link to comment Share on other sites More sharing options...
tomerg3 Posted March 1, 2013 Share Posted March 1, 2013 Try to add the following around the {literal}{/literal} {if $content_only != 1} ... ... {/if} 1 Link to comment Share on other sites More sharing options...
Pippo3000 Posted March 1, 2013 Author Share Posted March 1, 2013 does that go around the literal part? Link to comment Share on other sites More sharing options...
tomerg3 Posted March 1, 2013 Share Posted March 1, 2013 Correct. Link to comment Share on other sites More sharing options...
Pippo3000 Posted March 1, 2013 Author Share Posted March 1, 2013 ...and works like a charme! thanks a lot. probably a tiny thing for you but a big thing for someone like me who has not the slightest idea of programming ;-) Link to comment Share on other sites More sharing options...
buhajus Posted March 1, 2013 Share Posted March 1, 2013 support translating ? Link to comment Share on other sites More sharing options...
Pippo3000 Posted March 1, 2013 Author Share Posted March 1, 2013 support translating ? I always try to read between the lines but what do you mean? Whether I need support or offer support to translate the widget? Link to comment Share on other sites More sharing options...
buhajus Posted March 1, 2013 Share Posted March 1, 2013 sorry for shot question yes, support to translate the widget Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now