Example:
Item A added to cart - Item A Shows up in cart at the top of the page correctly.
Item B added to cart - Cart total is correct and shows two items. Click on cart button and only Item A shows up with the total of only item A.
Click Refresh Page - Both Items A & B show up with correct total.
Click Cart button at top and delete Item A - Cart at top of page shows one item and correct amount.
Click cart button at top - Cart shows both Items A & B.
Click Refresh button - Cart shows only item B
It seems to be either an ajax issue or a caching issue, but I can't figure it out and can not find help online for OpenCart Version 3.0.1.1.
Thank you!
It is also occurring when you view cart from the mini cart - it only showed 1 product in the cart until I refreshed the page when the second suddenly appeared.
Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
The fix:
I did another clean install of OpenCart 3.0.2.0 and imported my database dump and voila!
I'm thinking maybe the previous version I downloaded was a different build than the lated I used.
---------------------------------
This might be an OpenCart bug?
I've been working to find the culprit, at first I though it was the Journal Theme causing the issue. I contacted their support and told them the issue, along with videos and necessary issue reporting. But even after setting the Default Theme of OpenCart, same issue occurs.
Issues:
1. Adding products does not update/refresh the mini cart. The part which shows the product image, sub-total and total.
2. Removing products by clicking on the 'x' button does not update/refresh the mini cart. To remove them, remove products one by one, by clicking x button then reload the page, then do the same for the rest of the products.
My Setup:
- OpenCart 3.0.2.0 - downloaded from OpenCart.com
- VPS running Ubuntu 16.04, PHP7.0, VestaCP Control Panel
- storage/ directory is outside of public_html
- Multi-store setup, sub-domain for each multi-store.
What I've tried:
- Did another setup on the same VPS, but different domain name, and single store setup only.
- Installed Journal Theme and Imported a demo.
- Mini cart works fine as it should
Ernie
---
Notice of addition
Displays a notice about adding goods to the cart, wishlist, compare.
https://www.opencart.com/index.php?rout ... n_id=32459
---
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Unfortunately, no solutions for me right now. viewtopic.php?f=202&t=205891#top
I found this https://github.com/opencart/opencart/issues/2980 for another version, but may be that means, that there should be some server requierements that are not metionned.
Any way, 3.0.2 dowloaded on the 24/07/18 still have this issue for me.
I am same issue Opencart Version 3.0.2.0 Journal 2.16.2.
when change add to cart qty or delete product from cart page don't update.... I have to hard reload or ctrl+f5 many times then after it get updated pages.
NO CACHING ACTIVE , OPENCART CACHE DISABLE , JOURNAL CACHE DISABLE , SERVER CACHE DISABLE .HTACCESS CACHE DISABLE. ALL DISABLED
any one have solution ? path please reply thx in advance.
I made it. Problem fixed, because of my web hosting guy. He did not explained what he did exactly, but since this guy came into play the whole updating cart/coupons/payment methods and other stuff, is updating just the right way.
Here is my original post. viewtopic.php?f=202&t=205891
as soon as i have an explanation, i will post it in that topic because this is the one i opened.
Thanks again for your attention.
I am also facing the same issue. I have tried a lot, My hosting (Hostgator Cloud) support replied that, it's a bug from Opencart !!
What to do now ??
in add function
Code: Select all
if (json['success']) {
$('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
// Need to set timeout otherwise it wont update the total
setTimeout(function () {
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
}, 100);
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
Code: Select all
if (json['success']) {
$.ajax({
url: 'index.php?route=common/cart/info',
dataType: 'html',
cache: false,
success: function(html) {
$('#cart > ul').html($(html).find('#cart > ul').html());
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
});
}
Code: Select all
// Need to set timeout otherwise it wont update the total
setTimeout(function () {
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
}, 100);
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {
location = 'index.php?route=checkout/cart';
} else {
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
Code: Select all
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {
location = 'index.php?route=checkout/cart';
} else {
$.ajax({
url: 'index.php?route=common/cart/info',
dataType: 'html',
cache: false,
success: function(html) {
$('#cart > ul').html($(html).find('#cart > ul').html());
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
});
}
Code: Select all
// Need to set timeout otherwise it wont update the total
setTimeout(function () {
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
}, 100);
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {
location = 'index.php?route=checkout/cart';
} else {
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
Code: Select all
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {
location = 'index.php?route=checkout/cart';
} else {
$.ajax({
url: 'index.php?route=common/cart/info',
dataType: 'html',
cache: false,
success: function(html) {
$('#cart > ul').html($(html).find('#cart > ul').html());
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
});
}
v.2.x Bootstrap Themes, and yoohan-2031 + yoobeat-2031 worked,
but the yoobento-2302 Theme makes use of the $product['cart_id']
Variable, wich prevented, in my Case and OC-Version, products to be removed
from the header CART again.
So, make sure, if you use any Custom Theme, that this $product[' xxx '] Variable
meets your OC Version 'standard', to so at least solve one potential problem, related
with this. But I also could not yet find out, why it shows Products in this Cart, but it
still only tells you, that the cart is empty, if clicked on, in some test installs at
least...
Please note: The Image only displays the Value, not working in MY OC Version, so,
check in your own OC Version, wich one needs to exist, before changing anything.
or then, just REMOVE the cart.tpl file from the Custom Theme, then, the default
Theme .../template/common/cart.tpl File automatically will be used instead!
Just in case, but DON't do it with Journal - Pavo - and other heavy loaded Theme
Extensions, they are built differently, and may no longer function after such !
Ernie
---
It now works! (PEKU's OC-2.0.3.1 Theme enhanced OC v.1.5.6.5 EDGE used)
http://www.ipcam.li/shop/en/Components/ ... 25c28.html
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
wondering about the Fact, that the cart.tpl file has been moved from
the Theme module/... Directory to the Theme common/...
Directory from OC v.2 up.
But I forgot about this, up to now, by finding out, that a few of my OC-2 Custom
Themes only 'Header-Cart-autoupdate-function' as planned, if I let OC use
the default Theme product.tpl file instead, by simply removing the Custom
Theme product.tpl, on my latest Multitheme Test Site:
http://www.ejacob.ch/shop/index.php
---
It might at least be of some help for those, mixing 1.5.6.x Version Source with later
Version responsive Themes ! But if one has a working (default) Theme, and only
problems with Custom Themes on this, just either remove the Custom Theme product.tpl,
or replace it with the working Theme product.tpl file, to probably make it work.
Ernie
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
to solve any existing problem ... ....
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Well, tell that the Server, if takes minutes momentarely,Nor to double-post on the same replies.
to get it wo work .....
Ernie
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Reply was edited and double-quotes removed by moderator on the above. Not my reply.straightlight wrote: ↑Thu Dec 03, 2020 12:28 amWell, tell that the Server, if takes minutes momentarely,Nor to double-post on the same replies.
to get it to work .....
Ernie
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 40 guests