Skip to main content

I need the coupon to be applied to some items only

13 years 3 weeks ago #131025 by abasel
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

Please Log in or Create an account to join the conversation.

13 years 3 weeks ago #131041 by Xavier
Sorry but I'm lost :(

In this post: www.hikashop.com/forum/checkout/863146-i...rt=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 :)

Please Log in or Create an account to join the conversation.

13 years 3 weeks ago #131119 by abasel
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.



The two course listed in the previously mentioned in www.hikashop.com/forum/checkout/863146-i...rt=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).

Please Log in or Create an account to join the conversation.

13 years 3 weeks ago #131161 by Xavier
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

Please Log in or Create an account to join the conversation.

13 years 3 weeks ago #131244 by abasel
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 or Create an account to join the conversation.

13 years 3 weeks ago #131280 by Xavier
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 ;)

A little plugin should be sufficient, the plugin must be based on the function "onBeforeCouponLoad(&$coupon,&$do)" and you have to get the cart content thanks to
Code:
$cartClass = hikashop_get('class.cart'); $fullCart = $cartClass->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

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum