Hollister Posted October 24, 2017 Share Posted October 24, 2017 I am trying to add the secure seal from Godaddy to the 'Copyright text' in the store settings. Its something like (PS: Below is not the correct seal ID) <span id="siteseal"><script async type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=0lwpmB7U1ELUSpdGka8lmjf9eCvphf9xt56esxBvE7YRhLdmA"></script></span> But when I save and reload it shows 2 seals. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 24, 2017 Share Posted October 24, 2017 Please verify that you are entering this code when the editor is in Source mode. Is the site publicly viewable? If so, may we have a web address? Quote Link to comment Share on other sites More sharing options...
Hollister Posted October 24, 2017 Author Share Posted October 24, 2017 (edited) https://egecco.com/index.php Yes I was in 'Source' mode looks like the page source has it twice - show-for-medium-up - show-for-small-only Edited October 24, 2017 by Hollister Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 24, 2017 Share Posted October 24, 2017 I am not liking how the <script> is inside the <span> that is supposed to contain the badge. Please try: <span id="siteseal"></span> <script async type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=0lwpmB7U1ELUSpdGka8lmjf9eCvphf9xt56esxBvE7YRhLdmA"></script> But the real problem is that the skin template has two <div> blocks where the Copyright content is placed: one 'show-for-small-only' and one for 'show-for-medium-up'. The situation is that both instances of the fetched javascript code is getting executed. Hence, two badges. One solution is to edit the actual template (main.php and main.checkout.php). Place the <script> part along with all the other <script> tags at the bottom. Leave the <span> block in the Copyright content. Another solution is to create a code snippet that will then have the script URL loaded into the template for any skin you may want to use. Quote Link to comment Share on other sites More sharing options...
Hollister Posted October 25, 2017 Author Share Posted October 25, 2017 I tried your suggestion (currently active) with no change. It is the double div > But the real problem is that the skin template has two <div> blocks where the Copyright content is placed: one 'show-for-small-only' and one for 'show-for-medium-up' So anybody putting a java script in the 'Copyright Text" section will have this problem? Double content is also bad for Google? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2017 Share Posted October 25, 2017 I am an SEO atheist, but I would think Google cares not for SSL badges showing more than once. It certainly depends on what the javascript does, but, yes, I would say, unless the javascript tries to detect if it is already loaded, then it will be executed twice. Of the two solutions, which did you choose, if either? Quote Link to comment Share on other sites More sharing options...
Hollister Posted October 25, 2017 Author Share Posted October 25, 2017 I tried your 'Please try'. The next thing I will try this suggestion: One solution is to edit the actual template (main.php and main.checkout.php). Place the <script> part along with all the other <script> tags at the bottom. Leave the <span> block in the Copyright content. I will report back then. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2017 Share Posted October 25, 2017 (edited) Yeah, the "Please try..." ended up being nothing more than adding a bit of sanity to the code structure. It's the "But the real problem is..." that dismissed the validity of the "Please try...". Since you will be editing a template, be sure to have CubeCart clear its cache (admin, Maintenance, Rebuild tab, Clear Cache). Edited October 25, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
Hollister Posted October 25, 2017 Author Share Posted October 25, 2017 Not the best solution, but it works. Would be better in the Copyright text (I think) I put the SSL seal here /skins/foundation/templates main.php & main.checkout.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.