Sunday, November 7, 2010

PrestaShop Tips - How to fix cart summary issue

At PrestaShop 1.3 or later (but it will be fixed in ver 1.4), there is a bug at summary of cart block. It does not display correct information when you only have products.

Problem
When you add a product to cart, cart status on header shows “product” but doesn’t show the updated product numbers and its total amount. At the same time, when you click minimize cart block, the cart status also show “product” word like the header.

Solution:
You can fix this problem as following

Find following two lines at modules/blockcart/blockcart.tpl


<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockcart'}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockcart'}</span>


Replace above two lines with following two lines


<span class="ajax_cart_product_txt_s{if $cart_qties != 1} hidden{/if}">{l s='products' mod='blockcart'}</span>
<span class="ajax_cart_product_txt{if $cart_qties < 2} hidden{/if}">{l s='product' mod='blockcart'}</span>

1 comment:

Anonymous said...

Thanks!