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

http://nemops.com/prestashop-cart-rules-specific-category/

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?

Regards

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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