ozzyizzy Posted September 15, 2015 Share Posted September 15, 2015 Hi all. I put Mail chimp script in my main.php file ( in {literal})while I was still using v6.06, and it worked mostly like I wanted it to. There was one issue which was that it was not showing on my homepage for some reason, but was on all others. I was planning to mainly use it to collect subscribers as I could not work out any other way to put up a popup form in cube cart. ( very limited knowledge) . Anyway.. It worked well for a while. Next, I upgraded to v6.07, and for some reason the popup stopped showing on all pages. Using the developer tools I found the following error:Error: multipleDefineStack trace:makeError@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:119:15defineModule@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1579:20runDefQ/<@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1635:25forEach@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:106:6runDefQ@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1634:5injectModule/onLoadCallback@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1451:6req.injectUrl/onLoad@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1721:20 embed.js:1893:4src: dojoLoader embed.js:1896:6info: Object { pid: 0, mid: "//s3.amazonaws.com/downloads.mailch…", pack: 0, url: "//s3.amazonaws.com/downloads.mailch…", executed: 5, def: function (), isXd: true, isAmd: true, injected: 2, node: <script>, 5 more… } embed.js:1896:6. embed.js:1898:5Does anyone know what it all means?How do I fix this? Regards Quote Link to comment Share on other sites More sharing options...
ayz1 Posted September 15, 2015 Share Posted September 15, 2015 When you upgraded it may have overwritten the changes you made on the previous vrsion. Take a look at you main.php file and see if the mailchimp code you added earlier is there if not add it again. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 15, 2015 Author Share Posted September 15, 2015 It is still there. Just in case I went back to Mailchimp and took the code from there again. Not working. It is blocking it somehow, and I am not even sure it is an upgrade to v6.07 problem. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted September 16, 2015 Share Posted September 16, 2015 if it was working before you updated and wasnt after then logic would say it îs the update that caused it. Have you tried it on a different browser? Have you tried clearing the cache in cubecart admin? Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 Yes.. check different browser, and cleared cache in admin just now. No change... still not poppin! I don't know what the "Error: multipleDefine" means, but could it have something to to with cubecarts own newsletter signup? Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 Can we have your web address? Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 knicknacs.com.au Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 16, 2015 Share Posted September 16, 2015 I'm on 6.0.7. I don't have it set to create a popup, but open a new window. And mine is still working. See it at the bottom of each page.https://dirtybutter.com/plushcatalog Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 I want a popup as no matter how annoying they are, they do work. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 I've got an error:$.cookie is not a function.This is in /skins/knicknacs/js/2.cubecart.js, line 2.The fact there are only two lines in 2.cubecart.js tells me that maybe your skin is using javascript files from a version of Foundation several versions back.Please verify that your knicknacs skin is using the /js/ folder (and /vendor/ folder) from the latest Foundation skin. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 I have just upgraded the /js/folder to the latest foundation one ( for some reason it was not). It has not made the popup appear. I am not sure what is meant by "$.cookie is not a function". Is this the EU cookie compliance setting? I have tried to enable it in my admin although I had not enabled it in the last version either, ( no change even after clearing cache) What needs to be changed? More guidance please bsmither. Thank you for trying to help me once again! Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 The error being reported is from a function definition near the bottom of the file 2.cubecart.js. That function reads the cookie that is used to 'remember' the layout of the product panels -- grid view or list view. In the file that ships with CC607, it is line 399.When you say, "no change even after clearing cache," are you referring to CubeCart's skin cache, or your browser's page cache. Your browser may still be holding copies of those javascript files that were the probable source of the problem.Please learn how to have your browser force reload all the css files, javascript files, image files, etc and see if that solves the problem. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 I cleared both the the browser and the skin cache as well as the cloudflare cache. Do you get the popup on product or catagory page? should popup after 5 seconds. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 I just re-tried your site and the error is still there. I see the jquery.cookie.min.js file getting loaded, then the 2.cubecart.js file getting loaded. And that's all good.I am only looking at the homepage.There are some other errors I would like for you to fix:* In the <head> section of main.php, there is:<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/modernizr.min.js"async></script> <script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/jquery.js"async></script> There should be a space before async.* Somewhere, you have added:<div class="panel" id="box-adsense"> <h3></h3> <p class="title="" Maybe some stuff here??? </p> </div>There is no right-delimiter for the <p> tag.* You have also added this:<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo- config="usePlainJson: true, isDebug: false"></script>The above may be the beginning of one long line. Please verify that there is, in fact, a space between data-dojo- and config. I am not seeing that cookie I mentioned earlier. I think, for some reason, the script jquery.cookie.min.js is not getting run. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 Placed places in front of async.<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/modernizr.min.js" async></script> <script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/jquery.js" async></script> This is the whole code that is on my main.php :{literal}<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo- config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script>{/literal} so yes, there is a space between data-doja - and config. If I put the right delimiter on the adsense box it shows the wholeclass="title=""on my webpage. Come to think of it whatever changes were made during the upgrade has also stopped my adsense showing up. Adsense is not really important as I am only using it to test dynamic content. But I do wonder what happened there too. I don't really want a title on the adsense box, so leaving it empty for now. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 I mean:<div class="panel" id="box-adsense"> <h3></h3> <p class="title=""> <!-- Put right-delimiter after! the stuff that's inside the paragraph tag. --> Maybe some stuff here??? </p> </div> Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 Ha!.. Ok.. blonde moment there ( having far too many of those) :-) Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 It's strange. I visit the homepage. $.cookie is not defined. No reason for it not to be.I go to a category page. It comes in real quick. Too quick. I get jQuery is not defined and $ is not defined.It's as if these javascript files are not getting executed when I go to a different page.Please make this edit in main.php:From: <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/modernizr.min.js" async></script> <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/jquery.js" async></script> To: <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/modernizr.min.js"></script> <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/jquery.js"></script> I think the problem is the ASYNC. These javascript files MUST come in and get sorted by the browser before any of the other javascript files get executed that wants to use them. You also now have this:<div class="panel" id="box-adsense"> <h3></h3> <p class="title=""></p> </div> It should be: <div class="panel" id="box-adsense"> <h3></h3> <p class="title"></p> </div> Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 Made the changes. Still no pop!. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 16, 2015 Share Posted September 16, 2015 I have one last suggestion. After that, I have nothing else to suggest:Move: {literal} <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script> {/literal} From where it is, to AFTER the following: <script> {literal} $(document).foundation({equalizer:{equalize_on_stack:true}}); $('.bxslider').bxSlider({auto:true,captions:true}); {/literal} </script> Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted September 16, 2015 Author Share Posted September 16, 2015 I have one last suggestion. After that, I have nothing else to suggest:Move: {literal} <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script> {/literal} From where it is, to AFTER the following: <script> {literal} $(document).foundation({equalizer:{equalize_on_stack:true}}); $('.bxslider').bxSlider({auto:true,captions:true}); {/literal} </script> Yessss. That did the trick!.. my popup form is back on my product and category pages like before!. You are awesome Mr bsmither!!. I do have one more questions though. Why does it not show on my main page? ( never has). Any suggestions there? Forget the last question. It does show on my front page!.. Double awesomeness Mr bsmither!!.Thank you ! 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.