Jump to content

Cart Block unable to update for first time add to cart.


Recommended Posts

Hi All,

I'm new user of Prestashop. I saw many solved problem at this forum that really impressive. Hereby, I'm facing some problems and need someone who able to help me with.

The problem is, when I added 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 i click minimize cart block, the cart status also show "product" word like the header. This happen only for the first click. When i refresh the webpage, all shows perfectly.

Please refer to attach file for figure where figure 1 is the original page, figure 2 shows cart status not updated, and figure 3 shows "product" word after minimize cart block.

Appreciate for your help.

Thanks & Regards,
William

32886_pGlgH0iDLBedHW3pgQ47_t

Link to comment
Share on other sites

I investigated the problem you reported. I was able to reproduced at PrestaShop 1.3.2.3 I guess it is small bug.
You can fix this problem as below

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>

Link to comment
Share on other sites

Hi Shokinro,

Thanks for your quick response. I have changed the 2 line code as given, unfortunately the problem is still there. I believe this will solve some problems for others but not for me.

I have tried to overwrite all the blockcart, and blockuserinfo files from prestashop 1.3 original code, but still no luck. Could it be the theme problems?

Thanks & Regards,
William

Link to comment
Share on other sites

  • 1 month later...

Try it in blockcart.tpl :


{$cart_qties}
{l s='products' mod='blockcart'}
{l s='product' mod='blockcart'}
{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, 4)}{else}{convertPrice price=$cart->getOrderTotal(true, 4)}{/if}
       {if $cart_qties == 0}{if $cart_qties == 0}{l s='(empty)' mod='blockcart'}{/if}{/if}

Link to comment
Share on other sites

×
×
  • Create New...