Shopify themes, liquid, logos, and UX
When I add and item to the cart. (Mobile) it doesnt immediately show in the updated sticky cart bar. Please help. www.shopcuzzo.com
@Mrstepwell you need to add code for updating the cart to the sticky bar as well like header.
Can you help?
Off course it will need some custom code which can be done my me.
Thanks soooo much!!! let me know what I need to do
Ok let me code and share it with you shorty.
No Problem
still working on it?
Still coding?
Just sharing today no worries
Thx again
@Mrstep you can add below code into your main.js file at the end which is located in the theme > assets files and hopefully it will work.
$(document).ready(function() {
// Function to update the cart count
function updateCartCount(delay) {
setTimeout(function() {
// Get the current cart count from the cart icon bubble
var cartCountText = $('.cart-count-bubble span[aria-hidden="true"]').html();
// Update the #mycount element with the new cart count
$('#mycount').html(cartCountText);
}, delay); // Delay passed as an argument
}
// Bind event to product form submit button
$('.product-form__submit').on('click', function() {
updateCartCount(2000); // 2 second delay for the form submission
});
// Use event delegation for dynamically rendered plus and minus buttons
$(document).on('click', '.cart-quantity button[name="minus"]', function() {
updateCartCount(3000); // 3 second delay for quantity minus
});
$(document).on('click', '.cart-quantity button[name="plus"]', function() {
updateCartCount(3000); // 3 second delay for quantity plus
});
$(document).on('click', 'cart-remove-button .button', function() {
updateCartCount(3000); // 3 second delay for quantity plus
});
});
thanks
Can you send me a screenshot to show me were to input?
In header.liquid before {% schema %} tags
Not sure if i'm putting it in the wrong place or its just not working
Ok let me do it?
ok let me know what you need
Collaborate code
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025