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

#   I need the coupon to be applied to some items only

##

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

Less More

- Posts: 139
- Thank you received: 1
-
-

13 years 3 weeks ago [\#131025](#131025) by [abasel](/forum/user/6302-abasel "View abasel's Profile")  Replied by *[abasel](/forum/user/6302-abasel "View abasel's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131025 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Hi... sorry I had changed an alias setting that broke the link.

Here goes again... I have just tested and it works now: [ www.discoverylabs.co.nz/index.php/contact-us/login](http://www.discoverylabs.co.nz/index.php/contact-us/login)

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 3 weeks ago [\#131041](#131041) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131041 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Sorry but I'm lost ![:(](/media/kunena/emoticons/22.png ":(")

In this post: [ www.hikashop.com/forum/checkout/863146-i...rt=0&amp;start=20#130381](http://www.hikashop.com/forum/checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only.html?limitstart=0&start=20#130381)

The screenshot seems to be ok for me now. Only the discountable product got the discount.
Thanks to make it clear again for me ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

- Posts: 139
- Thank you received: 1
-
-

13 years 3 weeks ago [\#131119](#131119) by [abasel](/forum/user/6302-abasel "View abasel's Profile")  Replied by *[abasel](/forum/user/6302-abasel "View abasel's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131119 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Hi, only one product is a full day (discountable course) and because there is only one of them there should be no discount .

The following screenshot shows which products are discountable.

[ ![ha79896f.jpg](/forum/attachment/13469) ](/forum/attachment/13469 "ha79896f.jpg")

The two course listed in the previously mentioned in [ www.hikashop.com/forum/checkout/863146-i...rt=0&amp;start=20#130381](http://www.hikashop.com/forum/checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only.html?limitstart=0&start=20#130381) are

- Rigs and Animation (This is a full day and included in the 1 Day catefory)
- Android Apps and Game Development (Beginners) (this is a half-day course, not to be confused with the full day "Android Apps and Game Development (Pro)"

Based on the coupon options there should be not discount if these two are selected (the first coupon kicks in when the minimum order of day-1 category items (ie full day courses) is $200 or more).

- [ ![ha79896f.jpg](/forum/attachment/13469) ](/forum/attachment/13469 "ha79896f.jpg") [ ](/forum/attachment/13469?download=1 "ha79896f.jpg")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 3 weeks ago [\#131161](#131161) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131161 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Ok I remember the problem.

But it's a normal behavior, the "minimum order value" is applied on the whole order. Not only on the amount of the product of the category X or Y.
In your current configuration, everything is working fine, but to have what you need, it will require custom code.

And it require a lot of check, you have to make many calculation to know the price of the product of a certain category, etc.

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

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

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

Less More

- Posts: 139
- Thank you received: 1
-
-

13 years 3 weeks ago [\#131244](#131244) by [abasel](/forum/user/6302-abasel "View abasel's Profile")  Replied by *[abasel](/forum/user/6302-abasel "View abasel's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131244 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Hi thanks for that, surely its a simple comparison, if the product is in the 1-day category (the one specified in the coupon) then if applies the discount to that item?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 3 weeks ago [\#131280](#131280) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[I need the coupon to be applied to some items only](/forum/27-checkout/863146-i-need-the-coupon-to-be-applied-to-some-items-only?start=20#131280 "I have created a non-publish category called discounts.  I then have created a coupon that applies a 10$ discount if 2 or more items from this category have been selected. The coupon has the following set to yes &quot;Auto load in cart if possible&quot; and &quot;Coupon percentage applies to product only&quot;.  However when I get to checkout, the discount has been applied to everything.")*

Hi,

The check is not to apply the discount only on the products of "1-Day", that's already the case, it's to check the amount of the products of the "1-Day" category in the cart to know if we apply or not the coupon ![;)](/media/kunena/emoticons/24.png ";)")

A little plugin should be sufficient, the plugin must be based on the function "onBeforeCouponLoad(&amp;$coupon,&amp;$do)" and you have to get the cart content thanks to Code:

$cartClass = hikashop_get('class.cart'); $fullCart = $cartClass-&gt;loadFullCart();

Then check the products and set "$do" to false if the conditions are not met, or true to apply he coupon.

Here is some documentation:
[ www.hikashop.com/support/documentation/6...entation.html#coupon](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#coupon)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MzE0Ni1pLW5lZWQtdGhlLWNvdXBvbi10by1iZS1hcHBsaWVkLXRvLXNvbWUtaXRlbXMtb25seT9zdGFydD0yMCZ0bXBsPW1hcmtkb3du) 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.075 seconds

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