thenox Posted July 25, 2013 Share Posted July 25, 2013 (edited) I have a fresh installation of Prestashop 1.5.4.1 with default theme. I have added the cart_block to my display right column, My problem is following: If my cart is empty, and add a product to it, the ammount and shipping is being updated, but the productline stays on "no products". If I go to another page, the product line is being updated. If I have products in the cart, there seems to be no problems. If I delete my products from the cart, the line of "no products" doesn't come back. Any Idears ? url to my testsite is www.gnubbi.dk/shop Edited July 25, 2013 by thenox (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 25, 2013 Share Posted July 25, 2013 take a look: for me everything works fine there, wierdy what browser you're using? Link to comment Share on other sites More sharing options...
thenox Posted July 26, 2013 Author Share Posted July 26, 2013 I have tried ie, chrome and Firefox. Does it update instant or after you go to another page? Link to comment Share on other sites More sharing options...
vekia Posted July 26, 2013 Share Posted July 26, 2013 i see products in the block right after click on "add to cart" button, right after the animation Link to comment Share on other sites More sharing options...
thenox Posted August 1, 2013 Author Share Posted August 1, 2013 Is it the basket in the header section og at the right column.... it looks like its the header basket your have taken ss from... Link to comment Share on other sites More sharing options...
aegisdesign Posted August 2, 2013 Share Posted August 2, 2013 I can confirm I'm seeing the same problem. The basket in the header updates but the block in the right column does not. If you remove the cartblock hook from displayTop, then the cart block in the right column will correctly update BUT hovering over the cart in the header will no longer work. It would seem you can not have both working at the same time. I would guess the ajax is getting conflicted on which id to update. It would be very useful to have both working. Link to comment Share on other sites More sharing options...
vekia Posted August 3, 2013 Share Posted August 3, 2013 without modification of the ajaxcart js file it isn't possible. moreover, it will be problematic while, for example, you will remove the products etc. Link to comment Share on other sites More sharing options...
Ricarditu Posted August 5, 2013 Share Posted August 5, 2013 Hello all, I've been searching for a solution for this exact same problem... But it only happens with the ajax_add_to_cart_button. The input in the product page doesn't create the same issue. Everything works fine with the top cart module, adding, deleting, hovering, all. Every action on the cart products happens instantly without any problem. But with the right module, if it's empty, the values update but the "No Product" line remains. And if I delete all the products, this line won't come back in... Only if the cart already has at least one product and I add another one, it updates. But it won't update back to the "No Products" if I delete all of them. It's just a question of updating the product lines in the right cart module, because in the values lines and in the top module, all the information is there and accurate. Here's the link if you want to check it out: http://174.132.166.124/~virtuall/loja/br/ (it's in portuguese and it's still in development). The ajax_add_to_cart_button shows up when you hover the images in the homefeatured module. It's the green square on the right. I've been playing a bit around the homefeatured.tpl and the ajax_cart.js but couldn't solve it. Really need a hand here. Ah! Here's the code in the homefeatured.tpl: <div class="img_align_center"> {if (($product.id_product_attribute == 0) || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && ($product.minimal_quantity == 1) && ($product.customizable != 2) && !$PS_CATALOG_MODE} <div class="hover_over" style="position:relative;"> <a class="product-cart" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}"></a> {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="product-testar ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart'}"></a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {/if} </div> <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" /> </a> </div> Thanks! 1 Link to comment Share on other sites More sharing options...
aegisdesign Posted August 5, 2013 Share Posted August 5, 2013 without modification of the ajaxcart js file it isn't possible. moreover, it will be problematic while, for example, you will remove the products etc. Having had a play about with the javascript today, I'd agree. I've ditched the header hook and what happens is the cart block in the header will update the number of items just fine but hovering stops working. You can still click on it to go to the cart page. The cartblock in the right column also works great too. On the site I'm working on, since it's a grocery store, it's more important that the shopper sees a list of items, like a till receipt, than hover working on the header. Link to comment Share on other sites More sharing options...
Ricarditu Posted August 5, 2013 Share Posted August 5, 2013 I tried removed the header cart module but the ajax_add_to_cart_button wasn't working properly anymore, it would link directly to the cart page. I reactivated the cart header module and now it works fine in both hooks... Great! Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 hello you mean that problem is solved? it is possible to test it? im so curious Link to comment Share on other sites More sharing options...
Ricarditu Posted August 6, 2013 Share Posted August 6, 2013 Hi! vekia, nevermind... I noticed now that I'm experienced the same as aegisdesign... I remove the hook from displaytop, that's why the right module started working ok. However, just as him, the hovering function on the top module stopped working. Fortunately for me, my client wants a fully functional right cart module and on the top having the product quantity shown is enough. However, having all of them working fine would be the perfect scenario. Still no solution right? Link to comment Share on other sites More sharing options...
N@D33M Posted September 19, 2013 Share Posted September 19, 2013 Hi! vekia, nevermind... I noticed now that I'm experienced the same as aegisdesign... I remove the hook from displaytop, that's why the right module started working ok. However, just as him, the hovering function on the top module stopped working. Fortunately for me, my client wants a fully functional right cart module and on the top having the product quantity shown is enough. However, having all of them working fine would be the perfect scenario. Still no solution right? Having the same issue any update with the bug? Link to comment Share on other sites More sharing options...
aegisdesign Posted September 19, 2013 Share Posted September 19, 2013 Having the same issue any update with the bug? It's not a bug really. It's just not designed to work that way. The code only lets you have the cart in one location, not two. Link to comment Share on other sites More sharing options...
Soumya Swain Posted January 23, 2014 Share Posted January 23, 2014 hi i am using PrestaShop 1.5.5.0, in header dropdown cart add quantity plz.help me Link to comment Share on other sites More sharing options...
vekia Posted January 23, 2014 Share Posted January 23, 2014 hello, you need customization and in addition it's not related to main case in this thread. please create new topic with your request. Link to comment Share on other sites More sharing options...
deonderd Posted July 23, 2014 Share Posted July 23, 2014 It's not a bug really. It's just not designed to work that way. The code only lets you have the cart in one location, not two. hi i have the same problem.. after update to newer version of ps i'm now using1.5.6.2 it worked with 1.5.0 so the in "one location" comment ..is not correct.. anyway.. icannot get it resolved.. if i add a product to the cart.. the cart does not update correctly in the right column (it states no products) if u update the page.. then its in the cart on the right site.. and every product u add from then.. will appear coorectly in both carts But still cannot find a solution grtz http://www.deonderdelenshop.be Link to comment Share on other sites More sharing options...
millien Posted November 10, 2014 Share Posted November 10, 2014 (edited) do we have any solution ? it works 40% of the time with safari ( mac ) Edited November 10, 2014 by millien (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2015 Share Posted July 10, 2015 (edited) Hi. This did the trick for me: http://forge.prestashop.com/browse/PSCFV-7606 - Just check if block cart is hooked to Top of pages and unhook it. That's all. Edited July 10, 2015 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts