Jump to content

Conditional based Display product Quantity


prestashop-new

Recommended Posts

Hi ,

 

I have a products with multiple attributes

 

For Example :

Product A has 4 options :

18oz (let this options quantity is 2)

19oz (let this options quantity is 4) 

20oz (let this options quantity is 6)

21oz (let this options quantity is 10)

I want to get the $product->quantity for the individual options BUT it is giving me the total numbers of all fours.

My pseudo code is for Product A:

 

if $product->quantity < 3 then do not display the Quantity

else if $product->quantity is between 4 to 8 then $product->quantity =$product->quantity/2

else if $product->quantity >8 then Display $product->quantity as it is.

 

Please guide.

 

 

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