Jump to content

Limiting the total amount of products in the cart


Recommended Posts

I am currently working on a beer selling shop, and one very specific requirement requirement is giving me issues:

The user can only checkout if the total amount of products in the cart is in a multiple of 6 (Example: If the user is buying 3 beers, it can't checkout, if the user is buying 6 beers, it can checkout, if the user is buying 7 beers it can't checkout, if it is buying 12, it can, etc..)

I assume something like that could be implemented by doing something like
if($cartamountvar%6!=0){
           *greys out checkout button*
}

But I'm having trouble finding the part of the code were I can add this

I am using prestashop 1.7.6.1

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