Jump to content

How to add product discount as percentage of profit, not total price?

Recommended Posts

Hello, I currently need to deduct x% of the profit of all products when cart quantity is greater than 2.

I tried using Product Catalog rules for that, but I could only set the discount as either a fixed amount or a percentage of the product's *total amount* (I could figure out the cart quantity part though).

How can I set a discount based on profit instead (i.e. retail price minus cost)? Something like:

New price = Old price - 10% of profit

How can I achieve this? I am a developer so I don't mind some coding (not a Prestashop expert though !).


P.S.: If this can actually be done using product catalog rules, I would definitely prefer to have one general rule for all products - not one rule for each product, as I have lots of products in my shop (otherwise I would have just hard-coded a fixed discount amount for each product). Thanks in advance!

Edited by anis_r (see edit history)

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.

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