Re: Coupon error at checkout
My coupon is setup the following way:
Discount: 5.99
Minimum: 14.97
Free Shipping: NOT Checked
Dates are correct
RESTRICTIONS:
TOP- Deny
Product: Allowed
Using v1.50
I tried some troubleshooting on my own for awhile. If I remove the denied TOP, deny the category that the product is in, the coupon works. If I go to my cart and remove the product that is allowed, the coupon still deducts the amount.
Any help would be great!
Re: Coupon error at checkout
Have you an URL to your site where we could perhaps test this coupon?
What products_id is this Discount Coupon Valid for?
NOTE: Minimum is referring to the value of the Product(s) settings that are valid for the Discount ...
Re: Coupon error at checkout
Site: www.svgattic.com
Product id: 255
Thanks for replying!
Re: Coupon error at checkout
The Product that you allow is priced at: $5.99
However, you want a Minimum at $14.97 ...
The Minimum is meant to be the minimum of the Price(s) of the Products Allowed, not the Minimum of the Order ...
You would need to customize the code to work with the validation for the Minimum to be the Minimum of the whole Order and not the amount of the Valid Allowed Product(s) ...
Re: Coupon error at checkout
I want to be able to offer the free gift with a minimum purchase of $9.98. This is exactly how I did the coupons in v1.39, I recently upgraded to v1.50. Was there a change? I don't remember seeing documentation on it. Anyhow, I don't understand your response about me having to customize the code. If you could point me in the right direction that would be great because I thought I was customizing it in the restrictions.
Thanks in advance!
Re: Coupon error at checkout
Also, everything I have read up on in this forum tells me that the minimum is the minimum of the total order you want your customer to spend before the discount is allowed to be applied.
Re: Coupon error at checkout
Quote:
Originally Posted by
Ajeh
The Product that you allow is priced at: $5.99
However, you want a Minimum at $14.97 ...
The Minimum is meant to be the minimum of the Price(s) of the Products Allowed, not the Minimum of the Order ...
You would need to customize the code to work with the validation for the Minimum to be the Minimum of the whole Order and not the amount of the Valid Allowed Product(s) ...
Ajeh,
I went in and changed the minimum order amount to the item amount per your suggestion that the coupon would then work. Unfortunately, I am still getting the error, except now it says I must spend at least $5.99. Any help would be great.
Thanks again!
Re: Coupon error at checkout
You can try this ...
Update the code in:
/includes/modules/order_total/ot_coupon.php
And add the code in RED to the function get_order_total:
Code:
if (DISPLAY_PRICE_WITH_TAX != 'true')
{
$orderTotal -= $order->info['tax'];
}
// bof: calculate Order Total less shipping and tax
// change what total is used for Discount Coupon Minimum
$orderTotalFull = $order->info['total'];
//echo 'Current $orderTotalFull: ' . $orderTotalFull . ' shipping_cost: ' . $order->info['shipping_cost'] . '<br>';
$orderTotalFull -= $order->info['shipping_cost'];
//echo 'Current $orderTotalFull less shipping: ' . $orderTotalFull . '<br>';
$orderTotalFull -= $orderTotalTax;
//echo 'Current $orderTotalFull less taxes: ' . $orderTotalFull . '<br>';
// add $orderTotalFull to array
return array('totalFull'=>$orderTotalFull,'orderTotal'=>$orderTotal, 'orderTaxGroups'=>$orderTaxGroups, 'orderTax'=>$orderTotalTax, 'shipping'=>$order->info['shipping_cost'], 'shippingTax'=>$order->info['shipping_tax']);
// eof: calculate Order Total less shipping and tax
}
Next, change the code by reversing the commented code in the function collect_post from:
Code:
// left for total order amount vs qualified order amount just switch the commented lines
// if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
to be:
Code:
// left for total order amount vs qualified order amount just switch the commented lines
if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
// if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
and see if this now works for you based on the Total of the Order (less shipping and tax) vs the Total of the Products allowed ...
Re: Coupon error at checkout
Thank you Ajeh,
Unfortunately that did not work. It says "Congratulations your discount was accepted" or something like that, but it does not discount the coupon at all.
And it slowed down a lot after adding that code in.