Jump to content

total weight of basket


Recommended Posts

hi

To get total weight of basket, we use the following code:

{$cart->getTotalWeight()|escape:'htmlall':'UTF-8'|number_format:0} {Configuration::get('PS_WEIGHT_UNIT')}

When the user click on basket button ,the page being refreshed     
to show the total weight of basket.
My question: is there any solution to show total weight of basket without refreshing the page?

Link to comment
Share on other sites

Assuming you're using the default PrestaShop v1.6 theme, I think you'll need to add code to the updateCartSummary function in themes/default-bootstrap/js/cart-summary.js to update the total weight whenever the cart is updated using AJAX.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...