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
Attachments
Last edited by ziatakis on Fri Jan 22, 2021 10:02 pm, edited 1 time in total.
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
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
Who is online
Users browsing this forum: No registered users and 21 guests