[Skip to main content](#vessel-content)

#   auto discount for second buy

##

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 9 months ago -  5 years 9 months ago [\#328318](#328318) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328318 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")* was created by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")*

hi.
Is it possible to get an automatic discount for the second purchase of a product with Hikashop?
for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible?
this is for registered user only.

Last edit: 5 years 9 months ago by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

5 years 9 months ago [\#328323](#328323) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328323 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi,

So you mean that you want a discount to apply on the second order of a product ? Do you need different discount percentages for different products ? Or is that only for one product that you want that capability ?
What should happen if the user directly purchases 2 of the product ? 3 of the product ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 9 months ago [\#328351](#328351) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328351 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

> nicolas wrote: Hi,
>
> So you mean that you want a discount to apply on the second order of a product ?

yes i mean discount for second order of that product a user already purchases in the past. (my product is course and we update our course content monthly and i want when that user want reorder that course, then he/she pay less than original price of that course if he purchase in the past)

> nicolas wrote: Do you need different discount percentages for different products ? Or is that only for one product that you want that capability ?

maybe but it is not very important if it is problematic way. but if you can advise me about this.

> nicolas wrote: What should happen if the user directly purchases 2 of the product ? 3 of the product ?

we set to user only can one quantity per order. we only need implement discount for second order.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

5 years 9 months ago -  5 years 9 months ago [\#328374](#328374) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328374 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hello,

Maybe there is a way to do this, I will describe you step by step the way to do this :
- First you have to create a **sub user group**, this mean that to access this discount user have to be registered.
**=&gt;** Let's call this group premium customer by example.
**- Registered
- - Premium Customer**

- Create a **Mass Action** that will automatically mute regular customer (registered) to premium customer **if** the have some order **with your relative product**
[ ![alt](https://i.ibb.co/2PXCcfK/mass-action.png) ](https://i.ibb.co/2PXCcfK/mass-action.png "alt")

from these first prerequisites, **2** solutions :
- You directly in your relative product set, a second price only for your premium customer group :
[ ![alt](https://i.ibb.co/M5Xwvy6/price-acl.png) ](https://i.ibb.co/M5Xwvy6/price-acl.png "alt")

**Or**
- You create a Coupon and use ACL to restrict only for your premium customer group, and with the "**Auto load in cart if possible**" option to "**Yes**".
[ ![alt](https://i.ibb.co/JrN1bvG/coupon-acl.png) ](https://i.ibb.co/JrN1bvG/coupon-acl.png "alt")

Both solution, can allow you to have what you request, hope this will fit your needs.
regards

Last edit: 5 years 9 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 9 months ago [\#328425](#328425) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328425 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

very thanks a lot Philip.
have you any advise to use what Trigger?
"After an order is updated" or "Every days".
can you give me a little describe what is better for my need? what is more safe?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

5 years 9 months ago [\#328438](#328438) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328438 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi,

It would be best to user the "after an order is updated" trigger. It will do less processing every day, and it will allow for the change to happens immediately instead of having to wait for the mass action to trigger once a day.

The following user(s) said Thank You: [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 9 months ago -  5 years 9 months ago [\#328625](#328625) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328625 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi again @Philip @nicolas
i use your way and it is good idea but i have another problem... when i add a user to a usergroup for example "premium customer group" then that user can give discount(or second product's price) for other product too. i want the user that purchase product A only want repeat purchase can use discount and if he want purchase product B, then must use orginal product B price.
for example product A is 10 $ and product B is 20$. if user purchase product A in hist first order he must purchase with 10 $ and if he want pusrchase product A again, then he must pay 5$ and if he want purchase product B , then need to pay 20$. means each product can use it's own order history for discount. need to create separate usergroup for each product?
thank you and wait for you...

Last edit: 5 years 9 months ago by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

5 years 9 months ago -  5 years 9 months ago [\#328649](#328649) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#328649 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hello,

This is a huge nuance, from this new needs, we see only 1 possibility, create a coupon for **each of your required products**.
And as well your need to have some sub **user group for each product** as well.

Like this example :
- premium customer
-- premium customer A
-- premium customer B
-- premium customer C
-- etc...

From this we hope that you haven't to much product that required this feature.
Plus, there are an important point to note, if a customer that are from "**premium customer A &amp; B**" =&gt; Only **1 coupon** will be available.
Hope this won't be an issue for fill your needs.

Regards

Last edit: 5 years 9 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 6 months ago [\#332473](#332473) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#332473 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi again @Philip @nicolas after long time.
i want write my own plugin to resolve my problem instead use predefined tools in hikashop, because my products maybe go to more and more and i can not moderate that. please advise me about that.(i already create hikashop plugin for custom filtering and other thing)
now i say my need again for reminder:
i want if my user buy product A for second order or more, he pay less than original price of product A. but not any affect on product B.
for example A=20$ but in second order he must pay 15$.
i have two solution according my search in hikashop forum:
1- create plugin (or override core) for coupon system (for example i add more restrict option to ADVANCED RESTRICTIONS tab and set coupon to autoload if it is possible ) for detect users has confirmed order in the past.
2- create plugin (or override core) for reduce product price to which i want for each product differently but where administrator can set percentage of discount (or set second price ) for each product? can i add new Price Restriction option to product page with my own plugin to restrict new price according my own rule? (now my own rule is second price for second order)
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

5 years 6 months ago [\#332475](#332475) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#332475 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi,

I think that the first solution will be the simplest to implement. The trigger onDiscountBlocksDisplay(&amp;$element, &amp;$html) can be used to push extra options to the coupon form interface. And if you create new columns in the database for them, you can let the system auto save them if their name attribute is Code:

data[discount][xxx]

where xxx is the column name in the hikashop_discount table.
And then you have the trigger onAfterCouponCheck( &amp;$coupon, &amp;$total, &amp;$zones, &amp;$products, &amp;$display_error, &amp;$error_message, &amp;$do ) where you can set $do to false to invalidate a coupon if your check says it can't be used.

The following user(s) said Thank You: [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 6 months ago -  5 years 6 months ago [\#332512](#332512) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#332512 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

thank you nicolas.
i do that and return feedback and if i can create my own plugin , attach here for future users and qualify my code according your comment.

Last edit: 5 years 6 months ago by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

5 years 6 months ago -  5 years 6 months ago [\#332636](#332636) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#332636 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

> nicolas wrote: Hi,
>
> And then you have the trigger onAfterCouponCheck( &amp;$coupon, &amp;$total, &amp;$zones, &amp;$products, &amp;$display\_error, &amp;$error\_message, &amp;$do ) where you can set $do to false to invalidate a coupon if your check says it can't be used.

i can add successfully advance restricted option for coupon system. is there any trigger like onAfterCouponCheck for discount system? if no, how to implement option for discount if user has canfirmed order in the past, then he can use discount?
(also i can not use coupon because coupon can not show decreased price of product in the list of products or in the list of renewal subscriptions price or other product price page before go to start checkout process. so i need use discount system )

Last edit: 5 years 6 months ago by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

5 years 5 months ago [\#332648](#332648) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto discount for second buy](/forum/46-discount-coupon/901669-auto-discount-for-second-buy#332648 "hi. Is it possible to get an automatic discount for the second purchase of a product with Hikashop? for example a user buy a product with 20$ and if user go to reorder that product one month later(not only at the same time), then user get 40% auto-discount and need to pay 12$. is it possible? this is for registered user only.")*

Hi,

For discounts, you have the trigger onSelectDiscount(&amp;$product, &amp;$discountsSelected, &amp;$discounts, $zone_id, &amp;$parent) that you can use.
- $product contains the information of the current product
- $discountsSelected contains the discounts that the system found as valid for the current product. After that trigger, the system will sort these based on the keys of the array and will use the first one on the prices of the product
- $discounts contains the discounts in $discountsSelected plus some others that were loaded from the database but filtered out based on the categories / products restrictions on them
- $zone_id contains the current zone of the user (based on his address, his geolocated IP address (if geolocation is activated) or the "main tax zone" setting of the HikaShop configuration.
- $parent contains the main product data when $product contains the data of a variant (different variants can potentially have different discounts)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDE2NjktYXV0by1kaXNjb3VudC1mb3Itc2Vjb25kLWJ1eT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.078 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
