Min price fails if product/category coupon

  • Posts: 37
  • Thank you received: 1
9 years 1 week ago #220868

-- url of the page with the problem -- : maxmon.co.uk/buy/products
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5

I'm trying to offer a coupon which applies to a low-cost item (20m audio cable - £15) when purchased with a more expensive item (£310). I created a coupon with a min order value of £300, associated it with the low-cost product item, added both the expensive and inexpensive items to my basket and went to the checkout. When I try to add the coupon it complains "Notice: The voucher code you entered cannot be used in an order under £300.00" despite the more expensive item being over £300. Same issue if I associate the coupon with a category.

When I lower the coupon min order value to below the value of the inexpensive item it works. So it looks like when a coupon is associated with a product or category then the min order value is not of the total order (which I think is logical) but only of the to-be-discounted items?

Help!

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
9 years 1 week ago #220963

Hi,

In your case, what I would do is associate the coupon with the £310 product and set a minimum order quantity of 2 and a minimum order amount of £325 and a discount value of £15.
That way, the coupon would work only i the £310 product is in the cart and that there is another £15 product as well in it (or any other more expensive product.
That's the closest you can get with the options available by default in Hikashop.

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

  • Posts: 37
  • Thank you received: 1
9 years 1 week ago #221068

I'm not totally convinced by that workaround, and I'm completely baffled now by what is intended by associating discounts with specific products or categories. Surely the min order value should refer to the total order value, not the discounted portion of an order?

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
9 years 1 week ago #221106

Hi,

That's right. That's why I said to put 325 in put while associating the coupon to only the £310 product.

If the "min order value" field would refer to the discounted portion of the order, then I wouldn't see the point of having that option since it would based itself on the price of the discounted products which is known.

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

  • Posts: 37
  • Thank you received: 1
9 years 1 week ago #221154

Hi Nicolas:

I think HS must have some logic that says if the checkout includes a coupon associated with a product then the min order value must be greater than BOTH the coupon min order value AND the coupon-product price.

Test case:
- Product HICOST £300
- Product LOCOST £15
- Coupon TEST (min order value £200, associated with LOCOST)
- Add HICOST, LOCOST and coupon TEST to checkout => min value warning

I have to reduce coupon TEST min order value to <= £15 (i.e. the price of the associated LOCOST product) in order for the coupon to be accepted. This prevents what seems to be a very useful use case for coupons, namely to provide coupons for LOCOST items that can only be used when purchased in conjunction with HICOST items, i.e. buy something expensive, get something less expensive for free. This would seem to be enabled by removing the apparent constraint that the min order value must be >= the coupon-product price. Why is that constraint there? Min order value should just be min order value.

It's got to be a bug when you are looking at a basket with £385 of goods in it and see an error message saying 'Notice
The voucher code you entered cannot be used in an order under £300.00'. No?

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

  • Posts: 37
  • Thank you received: 1
9 years 1 week ago #221175

Digging deeper ...
In administrator\components\com_hikashop\classes\discount.php: function check(&$coupon, &$total, $zones, &$products, $display_error = true) you check a coupon against the cart contents
Towards the bottom of the function you assemble a list of products (in $coupon->products) that match the products or categories associated with the coupon (or all the products in the cart if there is no product or category restriction). This list is used to sum up the value of the order for comparison with $coupon->discount_minimum_order.
IMO that's a bug. The min order value compared should be that of ALL the products in the cart, not just the products associated with a coupon category or product restriction. What is the rationale/benefit for the current behaviour?

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
9 years 1 week ago #221197

Hi,

That allows you to have several coupons auto loaded with different discount values for different amounts of products being purchased in a specific category.
For example:
10% discount for at least $100 purchased in the "computer" category, and 15% discount for at least $300 purchased in that same category.
You can do that with two auto loaded coupons.

Note that the behavior of coupons can be changed with the development of a small HikaShop plugin thanks to the "coupon" api:
www.hikashop.com/support/support/documen...entation.html#coupon
So if you prefer another behavior you can change it thanks to that.

Alternatively, you might want to look at AWO Coupon, which integrates with HikaShop and offers more options to setup coupons for HikaShop:
awodev.com/products

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

  • Posts: 37
  • Thank you received: 1
9 years 1 week ago #221306

Thanks for prompt responses but I'm not really convinced. I think the HS coupon system has become unintuitive and could do with an overhaul. Adding a plugin doesn't seem too hard, but I think I'll investigate simpler workarounds like custom fields first. I'm not sure I like the idea of adding a paid third tier (Joomla - HS - AWO) just for this.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum