Jump to content
Rafa TTT

Create free shipping from € 80 but only for a specific category

Recommended Posts

I explain myself, I want that from 80€ in the cart of some products of a specific category A be free shipping but in such a way that if I add products of any other category they do not add up to the total amount and do not make me the discount

I have created a cart rule for that category and that minimum amount but, for example, if I put a product of € 50 of category A in a cart and then put another of € 31 in the cart of category B or X or the one be ... I get free shipping and I don't want that !! I want free shipping only if I get € 80 or more of products of category A, any help?

I've been looking at the CartRule.php and Cart.php but I can't find where to put my hand

My prestashop is 1.6

Share this post

Link to post
Share on other sites
2 hours ago, NemoPS said:

Intente adaptar este


Puede usar identificadores de productos en lugar de categorías si eso es lo que necesita:)

Thanks for your answer. I have taken that link as a base but I have 2 problems:

  • The first is that the code is only executed when you click on the "Apply coupon" button in the cart and I need a continue execution
  • The second, I have created a coupon for a category A, with free shipping from € 80, with your code I do not put the free shipping include putting a product with 3 units in a cart of € 240 and also if I put a product from a category B gives me the error "One or more products in your cart are not compatible with this discount" that I don0t show, I do not care that there are products in the cart of other categories

What modifications would have to be made in your code to work as I want?


Share this post

Link to post
Share on other sites

For the second issue, you must use a cart rule ID, so that the others are not blocked.
For the first it should be enough not to generate a code for the voucher, and it will be automatically applied

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More