jonah2494 Posted August 8, 2014 Share Posted August 8, 2014 Hi Guys, My site has been up and running for over 18 months now but out of the blue when you add a product to the basket then go to the basket there are now two products in the basket. Also when you go into admin there are two options in the status column. See attached pics. This has just appeared, I have made no changes to the site in over 6 months. Any help in this matter would be most appreciated Kind regards Jonah Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 8, 2014 Share Posted August 8, 2014 "When you add a product to the basket then go to the basket there are now two products in the basket. And see pics." Are the two products just a quantity of two of the same product, or two line items that happen to be the same product? What you describe is javascript powered: using tick/cross instead of 1/0, and ajax-request to add to basket. So, please look at these files to determine if they have been "doubled" (a copy of the file appended to itself): /js/common.js /js/admin.js Also please have your browser show you the HTML source of the received page. Check if the HTML may have two instances of either of these lines: <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/admin.js"></script> Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 8, 2014 Author Share Posted August 8, 2014 "When you add a product to the basket then go to the basket there are now two products in the basket. And see pics." Are the two products just a quantity of two of the same product, or two line items that happen to be the same product? What you describe is javascript powered: using tick/cross instead of 1/0, and ajax-request to add to basket. So, please look at these files to determine if they have been "doubled" (a copy of the file appended to itself): /js/common.js /js/admin.js Also please have your browser show you the HTML source of the received page. Check if the HTML may have two instances of either of these lines: <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/admin.js"></script> Thanks BSmither, the two products are the same just a quantity of two(see attached) <!-- Load JavaScript last --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.7/jquery-ui.min.js"></script> <script src="http://www.motors-direct.co.uk/js,_plugins.php+js,_common.js+skins,_mican,_js,_script.js+modules,_plugins,_GWorks_Product_Tabs,_js,_tabs2.js.pagespeed.jc.Aiqf77Vh6x.js"></script><script>eval(mod_pagespeed_euCmPkgXbC);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/js/plugins.php"></script> <script>eval(mod_pagespeed_OCyqVs7917);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/js/common.js"></script> <script>eval(mod_pagespeed_np54AGOtBv);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/skins/mican/js/script.js"></script> <script>eval(mod_pagespeed_ja9fPLLE$C);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/modules/plugins/GWorks_Product_Tabs/js/tabs2.js"></script> <script src="http://www.motors-direct.co.uk/modules/plugins/KissMyCart_Adv_Banners/skin/jquery.cycle.full.min.js+jcarousellite_1.0.1.min.js.pagespeed.jc.6NLwS5KzU5.js"></script><script>eval(mod_pagespeed_0Qhv5oMjaq);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/modules/plugins/KissMyCart_Adv_Banners/skin/jquery.cycle.full.min.js"></script> <script>eval(mod_pagespeed_OETbDezEmu);</script><script type="text/javascript" src="http://www.motors-direct.co.uk/modules/plugins/KissMyCart_Adv_Banners/skin/jcarousellite_1.0.1.min.js"></script> hope this helps?? many thanks for the super response. Dean Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 8, 2014 Share Posted August 8, 2014 Since this is happening on both the storefront and admin, I would think that the problem is isolated to a common factor. The only common factor I can see is the file /js/common.js. Make sure this file hasn't been altered. (Looks like it hasn't - other than all the newline characters stripped.) Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 8, 2014 Author Share Posted August 8, 2014 Since this is happening on both the storefront and admin, I would think that the problem is isolated to a common factor. The only common factor I can see is the file /js/common.js. Make sure this file hasn't been altered. (Looks like it hasn't - other than all the newline characters stripped.) I can definately say that no one within the company has made any changes to the file. Could this be a server side error?? what would be the best solution to resolve this?? overwrite the /js/common.js file and see if this fixes the problem?? once again many thanks for the great support Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 8, 2014 Share Posted August 8, 2014 I'm guessing that the Add to Cart button doesn't appear unless the customer is signed in? I'm happy (so far) with the contents of the common.js file. I would say not to overwrite it. "Could this be a server side error??" Adding a product twice to the shopping basket, perhaps. The double status indicators, no. "What would be the best solution to resolve this??" For adding to the basket, I would use any browser utility that would monitor the traffic going in and out of the browser (Firefox with Firebug or HTTPFox, for example). Then watch for either one or two ajax requests. For the status indicators, Firebug's script console will show how many nodes have the class of 'toggle' (javascript manages this). If you are not skilled at using Firebug (or any page diagnostic tools), you will need to find someone who is. Perhaps a trouble ticket to Devellion may be in order. I don't know if they will work on this due to the mods you have in place, but I think they wouldn't have any problems with troubleshooting the admin side. Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I'm guessing that the Add to Cart button doesn't appear unless the customer is signed in? I'm happy (so far) with the contents of the common.js file. I would say not to overwrite it. "Could this be a server side error??" Adding a product twice to the shopping basket, perhaps. The double status indicators, no. "What would be the best solution to resolve this??" For adding to the basket, I would use any browser utility that would monitor the traffic going in and out of the browser (Firefox with Firebug or HTTPFox, for example). Then watch for either one or two ajax requests. For the status indicators, Firebug's script console will show how many nodes have the class of 'toggle' (javascript manages this). If you are not skilled at using Firebug (or any page diagnostic tools), you will need to find someone who is. Perhaps a trouble ticket to Devellion may be in order. I don't know if they will work on this due to the mods you have in place, but I think they wouldn't have any problems with troubleshooting the admin side. ??? really strange. Add to basket adds two when clicked but the buy now button seems to be working correctly and if I refresh in admin it sometimes reverts to normal. I have enabled checkout for testing. many thanks dean Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I'm guessing that the Add to Cart button doesn't appear unless the customer is signed in? I'm happy (so far) with the contents of the common.js file. I would say not to overwrite it. "Could this be a server side error??" Adding a product twice to the shopping basket, perhaps. The double status indicators, no. "What would be the best solution to resolve this??" For adding to the basket, I would use any browser utility that would monitor the traffic going in and out of the browser (Firefox with Firebug or HTTPFox, for example). Then watch for either one or two ajax requests. For the status indicators, Firebug's script console will show how many nodes have the class of 'toggle' (javascript manages this). If you are not skilled at using Firebug (or any page diagnostic tools), you will need to find someone who is. Perhaps a trouble ticket to Devellion may be in order. I don't know if they will work on this due to the mods you have in place, but I think they wouldn't have any problems with troubleshooting the admin side. ??? really strange. Add to basket adds two when clicked but the buy now button seems to be working correctly and if I refresh in admin it sometimes reverts to normal. I have enabled checkout for testing. many thanks dean result of add to basket ' alt='' class='ipsImage' width="1000px" height="562px"> I'm guessing that the Add to Cart button doesn't appear unless the customer is signed in? I'm happy (so far) with the contents of the common.js file. I would say not to overwrite it. "Could this be a server side error??" Adding a product twice to the shopping basket, perhaps. The double status indicators, no. "What would be the best solution to resolve this??" For adding to the basket, I would use any browser utility that would monitor the traffic going in and out of the browser (Firefox with Firebug or HTTPFox, for example). Then watch for either one or two ajax requests. For the status indicators, Firebug's script console will show how many nodes have the class of 'toggle' (javascript manages this). If you are not skilled at using Firebug (or any page diagnostic tools), you will need to find someone who is. Perhaps a trouble ticket to Devellion may be in order. I don't know if they will work on this due to the mods you have in place, but I think they wouldn't have any problems with troubleshooting the admin side. ??? really strange. Add to basket adds two when clicked but the buy now button seems to be working correctly and if I refresh in admin it sometimes reverts to normal. I have enabled checkout for testing. many thanks dean screen print of add to basket ' alt='' class='ipsImage' width="1000px" height="562px"> Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 9, 2014 Share Posted August 9, 2014 I am seeing the double submit, but because the file common.js is scrunched, my javascript debugger cannot break at the exact spot I need it to. So, I want you to try two things: 1. Temporarily have your store use a stock CubeCart skin - not modified with this "pagespeed" thing. Test for the anomalies. 2. If still there, rename common.js to common_scrunched.js and put back the original common.js file (so the debugger can break on the line I need it to. I found a javascript deminifier that made it possible to break apart the scrunched file. I think I found that there are statements: var variable = (contents of common.js) eval(variable) as part of what pagespeed does. Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I am seeing the double submit, but because the file common.js is scrunched, my javascript debugger cannot break at the exact spot I need it to. So, I want you to try two things: 1. Temporarily have your store use a stock CubeCart skin - not modified with this "pagespeed" thing. Test for the anomalies. 2. If still there, rename common.js to common_scrunched.js and put back the original common.js file (so the debugger can break on the line I need it to. I found a javascript deminifier that made it possible to break apart the scrunched file. I think I found that there are statements: var variable = (contents of common.js) eval(variable) as part of what pagespeed does. I don't know where this pagespeed thing has come from?? I can't find any plugins that I have used but I have just noticed that the sage has been disabled in the back office?? Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 9, 2014 Share Posted August 9, 2014 "I have just noticed that the sage has been disabled in the back office??" What is a 'sage'? And by 'back office', do you mean the admin pages? Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I am seeing the double submit, but because the file common.js is scrunched, my javascript debugger cannot break at the exact spot I need it to. So, I want you to try two things: 1. Temporarily have your store use a stock CubeCart skin - not modified with this "pagespeed" thing. Test for the anomalies. 2. If still there, rename common.js to common_scrunched.js and put back the original common.js file (so the debugger can break on the line I need it to. I found a javascript deminifier that made it possible to break apart the scrunched file. I think I found that there are statements: var variable = (contents of common.js) eval(variable) as part of what pagespeed does. I don't know where this pagespeed thing has come from?? I can't find any plugins that I have used but I have just noticed that the sage has been disabled in the back office?? Tried with default skins no change "I have just noticed that the sage has been disabled in the back office??" What is a 'sage'? And by 'back office', do you mean the admin pages? Sage is the payment gateway(in admin pages), but just enabled and no change. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 9, 2014 Share Posted August 9, 2014 I hope you learn where this pagespeed stuff came from. Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I hope you learn where this pagespeed stuff came from. I can't find anything in the plugins, I have not touched any code in the site since its creation. I got a call from the owner of the site telling me about the problem yesterday. will get in touch with the host and see if they have made any changes to hosting?? many thanks bsmither Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 9, 2014 Author Share Posted August 9, 2014 I hope you learn where this pagespeed stuff came from. I can't find anything in the plugins, I have not touched any code in the site since its creation. I got a call from the owner of the site telling me about the problem yesterday. will get in touch with the host and see if they have made any changes to hosting?? many thanks bsmither Have found something about Google pagespeed for cubecart?? '?do=embed' frameborder='0' data-embedContent>> Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 9, 2014 Share Posted August 9, 2014 Here is your server's response headers: Cache-Control max-age=0, no-cache Connection Keep-Alive Content-Encoding gzip Content-Length 12392 Content-Type text/html;charset=UTF-8 Date Sat, 09 Aug 2014 23:33:17 GMT Keep-Alive timeout=2, max=100 Server Apache Set-Cookie PHPSESSID=ce989ff45da65156d3c8aade65f872c7; expires=Sun, 10-Aug-2014 00:33:17 GMT; path=/; httponly Vary User-Agent,Accept-Encoding X-Frame-Options SAME-ORIGINX-Mod-Pagespeed 1.8.31.4-4056 X-Powered-By PHP/5.3.28 p3p CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" And here is this: https://developers.google.com/speed/pagespeed/module So, I think you need to have a sit-down with your hosting provider. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 10, 2014 Share Posted August 10, 2014 This is the most relevant piece of data that I found if PageSpeed is simply not a thing you want, but your hosting provider says it will remain installed, so get your site fixed to use it. In Cubecart's .htaccess file, add this to the top: <IfModule pagespeed_module> # Turn on mod_pagespeed. To completely disable mod_pagespeed, you # can set this to "off". ModPagespeed off </IfModule> Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 10, 2014 Author Share Posted August 10, 2014 This is the most relevant piece of data that I found if PageSpeed is simply not a thing you want, but your hosting provider says it will remain installed, so get your site fixed to use it. In Cubecart's .htaccess file, add this to the top: <IfModule pagespeed_module> # Turn on mod_pagespeed. To completely disable mod_pagespeed, you # can set this to "off". ModPagespeed off </IfModule> Thank you for the great support, I can't see the .htaccess in the directory to change myself but have got in touch with my host and will let you know what response I get. Once again many thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 10, 2014 Share Posted August 10, 2014 In CubeCart's Store Settings, Search Engines tab, you have access to the existing .htaccess file (if one exists). When you click Install .htaccess, CubeCart will put that .htaccess file where it belongs. Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 10, 2014 Author Share Posted August 10, 2014 In CubeCart's Store Settings, Search Engines tab, you have access to the existing .htaccess file (if one exists). When you click Install .htaccess, CubeCart will put that .htaccess file where it belongs. Thanks bsmither, have made changes and added products to basket all seems to be working as it should be in storefront and in admin. Thank you very much for your great support. I will wait for a response from my host as to why this pagespeed was implemented without permission. Once again thank you Quote Link to comment Share on other sites More sharing options...
jonah2494 Posted August 15, 2014 Author Share Posted August 15, 2014 Hi Bsmither, here is the reply from the host LCN. I would like to thank you very much for your support in this matter. Hi Dean, Thanks for coming back to us. First of all I just wanted to send my apologies for any inconveniences this setting may have caused you. We'd had a number of queries from customers with slow sites and enabling this for the majority of sites has seen a major speed improvement. However for a very small minority this appears to have caused a problem. It's now been turned off by default. I do appreciate that being notified of this in the first instance would have saved you some time and I have requested that any changes made are looked into being communicated before-hand. Please let me know if there's anything else I can do for you. Kind regards Emma Many thanks Jonah2494 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.