Rimesta7 Posted July 9, 2013 Share Posted July 9, 2013 Hello, I'm using Presta 1.5.4.1, i made a fancybox in product list, to have a quick view of selected product. I use Link_product&content_only=1 . My problem is while click add to cart, the product is added but when i close the fancybox the ajax cart doesnt refresh automatically, until i refresh the whole page. I cant wait for suggestions.. Link to comment Share on other sites More sharing options...
ionutanghel Posted February 4, 2015 Share Posted February 4, 2015 Hy, I have some problem in prestashop 1.6.06 . Have somebody resolv that? Link to comment Share on other sites More sharing options...
SandraNanou Posted May 27, 2015 Share Posted May 27, 2015 (edited) same here, has anyone found a solution? Edited May 27, 2015 by SandraNanou (see edit history) Link to comment Share on other sites More sharing options...
jaytech Posted September 5, 2015 Share Posted September 5, 2015 +1 Using Presta 1.6.1. I would love a solution to this. Has anyone has any success with? I am using the Quick View fancybox as an alternative to be able to "Add to Cart" items with attributes. Ideally, I would prefer that the fancybox closes after clicking "Add to Cart" from the quickview, and then calls a refresh on the AJAX blockcart on the parent page. Any guidance or a 'point in the right direction' would be most appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
jaytech Posted September 5, 2015 Share Posted September 5, 2015 So I've made a good start and got this in my product.tpl $("#product.content_only #add_to_cart button").click(function(){ setTimeout("parent.$.fancybox.close()", 1000); parent.$.ajaxCart.updateCart(); /* - TypeError: parent.$.ajaxCart is undefined */}); The quickview closes nicely but I don't know how to call a refresh on the BlockCart. Surely this should be easy enough, but I'm a bit novice. Thank you kindly Link to comment Share on other sites More sharing options...
tanatosmx Posted April 13, 2016 Share Posted April 13, 2016 any solution? HELP ! Link to comment Share on other sites More sharing options...
useasdf_4444 Posted September 9, 2016 Share Posted September 9, 2016 So within the ajax-cart.js file (it should be either within the theme folder in js/modules/blockcart or the general modules/blockcart folder), there's an event around line 50 like this: $('#add_to_cart').unbind('click').click(function () { ... ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); ... }) I changed it to: $('#add_to_cart').unbind('click').click(function () { ... if (!selectedCombination.unavailable) { var productpage = $(this.closest('#product')); if (productpage.hasClass('content_only')) { parent.ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); parent.$.fancybox.close(); } else { ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); } } ... }); And it works like a charm! 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