Jump to content

Add discount for out of stock products when adding to cart


abdullacm

Recommended Posts

Hi all,

 

I want to add 10% discount to all out of stock products when the item is added to cart. For example a product A is out of stock and is having 20% of discount from some other specific prices, when the user add the item to cart additional of 10% discount to be added to the price.

How can i do it, i have tried to modify the pricecalculation method of Product class, but modifying that affects the entire site where the price is shown. I want the additional discount price only when adding to cart and in cart items.

 

 

Thanks,

 

Edited by Abdulla CM (see edit history)
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...