musicmaster Posted September 16, 2013 Share Posted September 16, 2013 I am preparing a shop and suddenly I had the problem that the shopping cart in the left column spontaneously disappears. This happened when I moved the mouse over it and then away again. So it looks like there is some "mouseout()" routine on the cart_block that switches the css "display" setting of that block to "none". Problem: I don't know how to see which routines are connected to that block or when some code runs. Firebug has a "debugger" but that shows only what runs from a specificied script. I want to know how I can find out which script is running. Link to comment Share on other sites More sharing options...
PascalVG Posted September 16, 2013 Share Posted September 16, 2013 Hi mm, I don't see the problem happen in your shop. (Chrome and FireFox) Did you try with another browser already? If it doesn't happen in the other one, maybe clear the cache of your current browser? My 2 cents, pascal Link to comment Share on other sites More sharing options...
musicmaster Posted September 26, 2013 Author Share Posted September 26, 2013 (edited) I found that it is an universal problem that even happens with fresh 1.5.5 installations without other modifications than having a shopping cart in the left column. So I wrote a bug report: http://forge.prestashop.com/browse/PSCFV-10497 Edited September 26, 2013 by musicmaster (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2013 Share Posted September 26, 2013 solution here: http://www.prestashop.com/forums/topic/276687-solved-basket-keeps-disappearing/ Link to comment Share on other sites More sharing options...
musicmaster Posted September 26, 2013 Author Share Posted September 26, 2013 Vekia, thank you for the post. Unfortunately it helps only half. Mouseover for the shopping cart in left column now no longer gives problems. But when you move your mouse over the text in the top bar "shopping cart: x items" you still see the left column cart appear and disappear. Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2013 Share Posted September 26, 2013 you're talking about website from your signature? i don't think so because it is 1.4 probably. can you share url to your store? i will give you solution within several minutes Link to comment Share on other sites More sharing options...
musicmaster Posted September 26, 2013 Author Share Posted September 26, 2013 It is a shop on a localhost so I can't give you an url. I am trying to upgrade to 1.5.5 but I meet an endless stream of problems. Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2013 Share Posted September 26, 2013 so i launched it on localhost too. okay, in the ajax-cart.js file please comment this code: $("#shopping_cart a:first").hover( function() { $(this).css('border-radius', '3px 3px 0px 0px'); if (ajaxCart.nb_total_products > 0 || cart_qty > 0) $("#cart_block").stop(true, true).slideDown(450); }, function() { $('#shopping_cart a').css('border-radius', '3px'); setTimeout(function() { if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) $("#cart_block").stop(true, true).slideUp(450); }, 200); } ); should help 1 Link to comment Share on other sites More sharing options...
Gregory Roussac Posted October 8, 2013 Share Posted October 8, 2013 Dear all, I am bit surprised by this bug, this seems to be a regression. Will investigate further. This commit should fix this issue. https://github.com/PrestaShop/PrestaShop/commit/008c6ce75925cb8f66034252faa64710dcc3bbd0 Best regards Link to comment Share on other sites More sharing options...
Dreamtheme Posted October 10, 2013 Share Posted October 10, 2013 The problem is in the ajax-cart.js which is calling universally classes for the drop-down cart instead of the specificly call it. This is old bug reappeared again which is reported here: http://forge.prestashop.com/browse/PSCFV-7495 Or you just need to replace it with this file ajax-cart.zip Link to comment Share on other sites More sharing options...
vekia Posted October 10, 2013 Share Posted October 10, 2013 in addition, please check this github input: https://github.com/PrestaShop/PrestaShop/commit/1652f3575c10995b8e088c5cf185b9f8ee77d32a Link to comment Share on other sites More sharing options...
CrossY Posted October 27, 2013 Share Posted October 27, 2013 I'm not sure what to do here, I've replaced the ajax-cart.js with the code from Github, but it fails to update the right-menu cart properly. http://www.smartphonehandschoenen.nl Adding products seems to be working well, but as soon as I try to delete an item from the rightmenu-block, it seems to first remove the price, then after a second click (on the remove button) it deletes the product. It seems to lag behind one click each time (not properly refreshing). Also, when all items are deleted, there is no message such as "no items in cart" as there used to be. Simply add/remove a bunch of items a couple of times and you'll see what i'm talking about. Please compare to http://www.topsnoep.nl/ (where it does seem to function properly). What am I missing here..? Regards, Dave Link to comment Share on other sites More sharing options...
musicmaster Posted October 27, 2013 Author Share Posted October 27, 2013 Sounds like you are having the shopping cart in two locations - what is the standard setting. If you look under modules->positions you will very likely see that the shopping cart is both in the header/top and in the left column. You need to delete one of the two. 1 Link to comment Share on other sites More sharing options...
vekia Posted October 27, 2013 Share Posted October 27, 2013 i checked your website and i can easily: - add products to cart - remove them with one click method all prices, total cart value and also top right cart information are changing well too, i think that i can't reproduce issue Link to comment Share on other sites More sharing options...
musicmaster Posted October 27, 2013 Author Share Posted October 27, 2013 In my site the top cart has been removed from "positions". There is still a link visible but it no longer automatically enlarges to an overview of the content of the cart when you move the mouse over it. Link to comment Share on other sites More sharing options...
Gregory Roussac Posted October 27, 2013 Share Posted October 27, 2013 (edited) Dear all, Please also see this recent commit https://github.com/PrestaShop/PrestaShop/commit/4c484afda11ce2527befaaf878cb9473e6ebc6d6 As musicmaster said, because of original bad design, this module can not be hooked twice on the top and on a column at same time. You have to choose just one place. Best regards Edited October 27, 2013 by Gregory Roussac (see edit history) Link to comment Share on other sites More sharing options...
CrossY Posted October 27, 2013 Share Posted October 27, 2013 I´ve done two things: - Removed "Top of pages" hook from positions - Copied and replaced the full Github file posted by Vekia (https://github.com/PrestaShop/PrestaShop/blob/1652f3575c10995b8e088c5cf185b9f8ee77d32a/modules/blockcart/ajax-cart.js) The top of pages hook is still displaying, and the right menu is collapsing on mouse-over (the original problem I believe?). What am I doing wrong? Link to comment Share on other sites More sharing options...
Gregory Roussac Posted October 27, 2013 Share Posted October 27, 2013 Hi, Did you clear smarty cache ? Did you clear your browser cache ? Regards Link to comment Share on other sites More sharing options...
CrossY Posted October 27, 2013 Share Posted October 27, 2013 (edited) Hi, Did you clear smarty cache ? Didi you clear your browser cache ? Regards I've now tried it with your Github file (i'm not sure how Github works), and it seems to work (https://raw.github.com/PrestaShop/PrestaShop/4c484afda11ce2527befaaf878cb9473e6ebc6d6/modules/blockcart/ajax-cart.js) Cleaned smarty and browser cache. However, the top pf pages hook is still showing, but doing pretty much nothing. How would I make that invisible? Edited October 27, 2013 by CrossY (see edit history) Link to comment Share on other sites More sharing options...
Gregory Roussac Posted October 27, 2013 Share Posted October 27, 2013 Hi, Did you try to remove it from Top hook in Modules Positions Tab in back office ? Regards Link to comment Share on other sites More sharing options...
CrossY Posted October 27, 2013 Share Posted October 27, 2013 Hi, Did you try to remove it from Top hook in Modules Positions Tab in back office ? Regards Yes, it's only hooked to Header of Pages and Right Column. Link to comment Share on other sites More sharing options...
PascalVG Posted October 27, 2013 Share Posted October 27, 2013 CrossY, It MUST be hooked to the header of Pages, as this is NOT visible code on your page which is positioned, but the place where PrestaShop adds all CSS/JavaScript code (for optimization purpose). So it's not the TPL file which is hooked here, only css/js files. So please make sure you DO have it in header of Pages AND the column of your choice. For your info, pascal 1 Link to comment Share on other sites More sharing options...
CrossY Posted October 27, 2013 Share Posted October 27, 2013 CrossY, It MUST be hooked to the header of Pages, as this is NOT visible code on your page which is positioned, but the place where PrestaShop adds all CSS/JavaScript code (for optimization purpose). So it's not the TPL file which is hooked here, only css/js files. So please make sure you DO have it in header of Pages AND the column of your choice. For your info, pascal It is hooked to Header of Pages, as well as Right Column... Link to comment Share on other sites More sharing options...
musicmaster Posted October 27, 2013 Author Share Posted October 27, 2013 Pascal, you are wrong. If that was true my site wouldn't work. Link to comment Share on other sites More sharing options...
vekia Posted October 27, 2013 Share Posted October 27, 2013 displayHeader hook isn't mean displayTop hook. Here are differencies between Header and Top section. Huge differencies. In my opinion displayHeader is one of the most important hooks in the store. I checked sources of your minified js file and you've got code from ajax-cart.js file there. It mean, that your module use displayHeader hook mentioned by Pascal. It's necessary Link to comment Share on other sites More sharing options...
PascalVG Posted October 27, 2013 Share Posted October 27, 2013 Thanks for your confirmation of my story and further explanation, Vekia. :-) Link to comment Share on other sites More sharing options...
musicmaster Posted October 28, 2013 Author Share Posted October 28, 2013 Sorry, I was wrong. It is indeed displayTop that must be removed while displayHeader must stay. Link to comment Share on other sites More sharing options...
musicmaster Posted March 21, 2014 Author Share Posted March 21, 2014 I am not sure whether it is related but I am experiencing a related problem with this same configuration. When I am on my checkout page (one-page checkout) and I change the order (deleting an item or changing its quantity) the two shopping baskets both become empty. The content is still there and re-appears after a refresh. 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