Post by ziatakis » Fri Jan 22, 2021 7:33 pm

Hello,
OC 3.0.3.1
adding to cart from product page, needs refresh to show the product on cart. Add to cart on category page works fine.
Trying since yesterday to find what we did wrong, with no luck.
Find attached product.twig and common.js
Last edited by ziatakis on Fri Jan 22, 2021 10:02 pm, edited 1 time in total.

New member

Posts

Joined
Mon Oct 09, 2017 11:29 pm

Post by ziatakis » Fri Jan 22, 2021 10:01 pm

Solved

To anyone has the same problem
on catalog/view/theme/yourtheme/template/product/product.twig
we found this line
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');

replace it with this
setTimeout(function () {
$('#cart button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); }, 100);

Before change anything, read this post : viewtopic.php?t=186083

New member

Posts

Joined
Mon Oct 09, 2017 11:29 pm
Who is online

Users browsing this forum: No registered users and 18 guests