For example if you are at an category, using mobile, the scrollbar is some pages below, when i click on "Add to Cart", it should appear the greeny message and the scrollbar automatically goes to top following the greenish message right?
But this is taking too long when using mobile...
You can test here:
www.mercadoelite.com.br (at my site it taking a little bit more time)
and here
demo.opencart.com (it has the delay too)
Im testing using a s7, its a good phone
I believe it isn't the delay to "cart.add" function to process on server-side, because when you add an item to cart using Desktop(using a small window to emulate mobile version) it runs instantaneous
What possible can cause this?
Is there any way to optimize that?
But this is taking too long when using mobile...
You can test here:
www.mercadoelite.com.br (at my site it taking a little bit more time)
and here
demo.opencart.com (it has the delay too)
Im testing using a s7, its a good phone
I believe it isn't the delay to "cart.add" function to process on server-side, because when you add an item to cart using Desktop(using a small window to emulate mobile version) it runs instantaneous
What possible can cause this?
Is there any way to optimize that?
I tested using another device and got the same delay.
It not because of the animation, the delay happens also to when the buy link redirects you to the product page (in case you have options enabled in the product), but I do not understand why this does not happen by accessing the PC, only on mobile
PS: Its not the connection neither
Here is the cart.add script:
Code: Select all
var cart = {
'add': function(product_id, quantity) {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: 'product_id=' + product_id + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1),
dataType: 'json',
beforeSend: function() {
$('#cart > button').button('loading');
},
complete: function() {
$('#cart > button').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
if (json['redirect']) {
location = json['redirect'];
}
if (json['success']) {
$('#content').parent().before('<div class="alert alert-success alert-dismissible"><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 }, 'fast');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
},
Are you browsing the site in private mode / incognito ? Try turning that off.
Older android phones lack browser performance, you won't get the same performance vs a desktop browser. We build a lot of hybrid mobile apps and it's a pain to get decent performance on older android devices.
In any case - Your site works fine on a Galaxy S8 and Chrome, as well as an iPhone X .
Older android phones lack browser performance, you won't get the same performance vs a desktop browser. We build a lot of hybrid mobile apps and it's a pain to get decent performance on older android devices.
In any case - Your site works fine on a Galaxy S8 and Chrome, as well as an iPhone X .
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
The private isnt the problem, ive tested both ways
Sometimes it laggs sometimes it dont,
But most of the time it lags, it happens only when i have many CART.ADD function on same page, for example at the category.twig page
As you can see in the video, at Product page, both links works okay
But at category page, if you press button with CART.ADD(the Buy buttom), it has a boring delay, in both situations(i mean, situation 1: CART.ADD sends you to the propduct page, situation 2: it already adds the product do the cart)
Can you test again? (i believe 20% of time it works okay, 80% not)
When you click AT LINK (at the product name, or prodcut thumb, instead of buttom), it goes faster to the product page
Im trying to make the most fluid site as possible, everything was very smooth, so i found this problem now
The only possibility to fix it i'm seeing now is removing button and use it as a link, removing add to cart feature, which is bad
Sometimes it laggs sometimes it dont,
But most of the time it lags, it happens only when i have many CART.ADD function on same page, for example at the category.twig page
As you can see in the video, at Product page, both links works okay
But at category page, if you press button with CART.ADD(the Buy buttom), it has a boring delay, in both situations(i mean, situation 1: CART.ADD sends you to the propduct page, situation 2: it already adds the product do the cart)
Can you test again? (i believe 20% of time it works okay, 80% not)
When you click AT LINK (at the product name, or prodcut thumb, instead of buttom), it goes faster to the product page
Im trying to make the most fluid site as possible, everything was very smooth, so i found this problem now
The only possibility to fix it i'm seeing now is removing button and use it as a link, removing add to cart feature, which is bad
Well, instead of trying to beat the System, you could first make sure, to have
everything done, required to at least reach the system Limit!
Still, it's fast, just rather heavy on load!
Good Luck!
Ernie
---
https://gtmetrix.com/reports/www.mercad ... r/VIdSocia
---
everything done, required to at least reach the system Limit!
Still, it's fast, just rather heavy on load!
Good Luck!
Ernie
---
https://gtmetrix.com/reports/www.mercad ... r/VIdSocia
---
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.
Who is online
Users browsing this forum: Semrush [Bot] and 520 guests