Jump to content

Limit quantity order


Charles 01

Recommended Posts

Good morning,

I am looking to make a product mix on my Prestashop store, for example, the customer must be obliged to order a minimum of 6 bottles of wine in order to validate his order.

I am currently using the opart limit quantity module on version 1.8.7.9, however, this one bugs the "validate order" button and the redirection on the order tunnel does not happen, so I have to abandon this module.

So I would like to do this mix directly through FTP coding.

Could someone tell me the procedure to follow please?

Link to comment
Share on other sites

one simple way is to put a picture of six wine bottle, put the price as total, and put product description such as “6 bottles of our Premium Wine”

alternatively. create a ‘product combination’ from back office

else, find another module

Link to comment
Share on other sites

Thank you for your solutions!

Regarding the CartController.php file, which folder should I go to in the ftp? there are two : Overide folder or Controller folder?

I will admit that I don't know much about code, could someone give me the code to fill in the file to have this famous combination please?

Thanks for your help.

Link to comment
Share on other sites

Try this solution and let me know if it works.

Goto /themes/classic/templates/catalog/_partials/product-add-to-cart.tpl file,

in product_quantity block, modify the code mentioned below:

{else}
   value="1"
   min="{$product.minimal_quantity}"
{/if}

and in div class="add", modify the condition to disable the add to cart button

{if !$product.add_to_cart_url || $product.quantity_wanted < $product.minimal_quantity}
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...