- Posts: 100
- Thank you received: 1
Coupon minimum order value not working as expected
11 years 3 months ago - 11 years 3 months ago #206728
by reders
Coupon minimum order value not working as expected was created by reders
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4
Hi,
I have created a coupon with the code 10OFF, please see screenshot 'couponConfiguration' attached for the full configuration.
The minimum order value is set to 29.99 but if I add 1 product to the cart with a value of £26.99 I can successfully apply the coupon, please see screenshot 'couponError1' attached.
However, if I increase the minimum order value to £300 the coupon cannot be applied, please see screenshot 'couponError2' attached.
Please note - the website is in offline mode so I will need to supply you log in credentials if you wish to check the issue.
Thanks in advance
Alex
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4
Hi,
I have created a coupon with the code 10OFF, please see screenshot 'couponConfiguration' attached for the full configuration.
The minimum order value is set to 29.99 but if I add 1 product to the cart with a value of £26.99 I can successfully apply the coupon, please see screenshot 'couponError1' attached.
However, if I increase the minimum order value to £300 the coupon cannot be applied, please see screenshot 'couponError2' attached.
Please note - the website is in offline mode so I will need to supply you log in credentials if you wish to check the issue.
Thanks in advance
Alex
Last edit: 11 years 3 months ago by reders.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 3 months ago #206793
by Mohamed Thelji
Replied by Mohamed Thelji on topic Coupon minimum order value not working as expected
Hello Alex,
Does it works if you change the value of the "Apply discounts" option via "Hikashop->System->Configuration->Main" ?
Does it works if you change the value of the "Apply discounts" option via "Hikashop->System->Configuration->Main" ?
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206886
by reders
Replied by reders on topic Coupon minimum order value not working as expected
Hi, Thanks for your quick response.
That did the trick.
Thank you
Alex
That did the trick.
Thank you
Alex
Please Log in or Create an account to join the conversation.
11 years 2 months ago - 11 years 2 months ago #207249
by reders
Replied by reders on topic Coupon minimum order value not working as expected
Hello,
Its seems my response was to quick the bug is still happening.
What else can I do to fix this?
Thanks
Alex
Its seems my response was to quick the bug is still happening.
What else can I do to fix this?
Thanks
Alex
Last edit: 11 years 2 months ago by reders.
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207393
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Coupon minimum order value not working as expected
Hi,
Can you please remove the "category" restriction on your coupon ?
It might not be related but I don't see the interest to "waste" some processing to filter the products if you want to include all products.
The management of the setting "discount_minimum_order" is made in the class "discount" (administrator/component/com_hikashop/classes/discount).
In that file you can find the function "check" ; in that function please replace
By
So we will be sure that the main product won't be also include in the total amount.
You are adding a variant and both of your variant and his main product have price.
That patch will be include in the next release.
Regards,
Can you please remove the "category" restriction on your coupon ?
It might not be related but I don't see the interest to "waste" some processing to filter the products if you want to include all products.
The management of the setting "discount_minimum_order" is made in the class "discount" (administrator/component/com_hikashop/classes/discount).
In that file you can find the function "check" ; in that function please replace
Code:
$total_amount = 0;
if(!empty($coupon->products)) {
foreach($coupon->products as $product) {
$total_amount += @$product->prices[0]->$var;
}
}
Code:
$total_amount = 0;
if(!empty($coupon->products)) {
foreach($coupon->products as $product) {
if($product->cart_product_quantity > 0)
$total_amount += @$product->prices[0]->$var;
}
}
You are adding a variant and both of your variant and his main product have price.
That patch will be include in the next release.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: reders
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207457
by reders
Replied by reders on topic Coupon minimum order value not working as expected
Hi Jerome,
That has worked, thank you for your reply.
Good support as always!
Thanks
Alex
That has worked, thank you for your reply.
Good support as always!
Thanks
Alex
Please Log in or Create an account to join the conversation.
Time to create page: 0.187 seconds