Jump to content

Update shopping cart on cart item delete


Recommended Posts

Hi guys,

 

We have a requirement to add some text to the cart page, based on the stock level of each item in the cart. If any items are out of stock at the point of checkout we want to display a warning to the customer that their order won't ship today.

 

So far, in the template itself I've managed to code up a solution which powers that at page load, so it interrogates the products variable and if any of the stock levels are zero it displays the text. So far so good.

 

 

Where I'm a little stumped is how to hide it, if the product that has no stock, is then deleted from the cart.

 

Not sure if I should add code to hide the div in cart-summary.js or if there's a more elegant way to achieve the entire solution.

 

Thanks in advance for any advice offered.

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...