Post by fab26x » Wed Mar 30, 2011 7:11 am

Hi Everyone,

I'm having some issues with using the free shipping. Here is the bug:

We are giving FREE SHIPPING for orders above $90.00
We have a coupon for $30.00 discount for orders over $100.00
___________
SCENARIO

A. Client buys $105.00 worth items. ( which means FREE SHIPPING ) no problem here yet.
B. Client uses Discount Coupon for $30.00 ( Order total = $105 ).
New order total after coupon discount = $75.00
There should be NO FREE SHIPPING for orders less than $90.00

System is not looking new total and still honoring the FREE SHIPPING, even thought the new order total after "Coupon Discount" is less than what FREE SHIPPING is set at which is $90.00

If I look at index.php?route=checkout/shipping
Cart shows:
Item 1 Shirt $105.00
Coupon (-30.00): -R$30,00
Sub-total: R$105,00
Total: R$75,00

For Shipping, it will show FREE SHIPPING, though TOTAL is less than $90.00. Looks like Free Shipping is looking into Sub-total and not Total.

Can you guys help ? I'm on v.1.4.8b

Newbie

Posts

Joined
Mon Oct 18, 2010 10:32 pm

Post by Qphoria » Wed Mar 30, 2011 7:49 am

Subtotal should always be sorted first
Total should always be last.
Try setting the shipping after the coupon total. That should work

So you'll have:

Subtotal: 105.00
Coupon: -25.00
Shipping: 10.00
Total: 90.00

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fab26x » Wed Mar 30, 2011 8:51 pm

How do I set shipping after the coupon ? Because I've done refresh the cart, and page.. while total shows the total amount correct, it still giving FREE SHIPPING while the total is less than what is set for FREE SHIPPING.

Thanks for the help

Newbie

Posts

Joined
Mon Oct 18, 2010 10:32 pm

Post by Johnathan » Wed Mar 30, 2011 9:20 pm

The original poster is right -- coupons aren't taken into account. The Free Shipping model file uses:

Code: Select all

$this->cart->getSubTotal() 
to compare the totals, which just adds all the product totals together. There needs to be some type of "check coupon" routine within getSubTotal() in order for it to calculate properly.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by fab26x » Wed Mar 30, 2011 10:48 pm

Johnathan,
I've found that code within model/shipping/free.php
$this->cart->getSubTotal() and you are correct. There should be some kind of code which will take in consideration Total and not SubTotal . I've tried
$this->cart->getTotal() When I use 'echo' I get the same result for getSubTotal() and getTotal(). Which is strange since while looking at the shopping cart they have different values.

Does anyone know how to get the result from Total and not SubTotal ?

Newbie

Posts

Joined
Mon Oct 18, 2010 10:32 pm

Post by fab26x » Wed Mar 30, 2011 10:51 pm

Within model/shipping/free.php: "if ($this->cart->getSubTotal() < $this->config->get('free_total'))"

echo $this->cart->getSubTotal();
and
echo $this->cart->getTotal();

Results are the same.

I would like to be able to read TOTAL that shows the correct value, which is in the shopping cart.

Any ideas ?

Newbie

Posts

Joined
Mon Oct 18, 2010 10:32 pm

Post by Qphoria » Wed Mar 30, 2011 11:24 pm

fab26x wrote:How do I set shipping after the coupon ? Because I've done refresh the cart, and page.. while total shows the total amount correct, it still giving FREE SHIPPING while the total is less than what is set for FREE SHIPPING.

Thanks for the help
You set the sort order in the Extensions->Order Total area.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Mar 30, 2011 11:36 pm

The real issue here is bigger than just subtotal.. the fact is you choose shipping BEFORE entering a coupon so there is an order-of-operation issue. This will likely being easier to address in 1.5.0 when the new one page checkout is easier to sync better. Then we can be sure that coupon changes are before the shipping.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fab26x » Thu Mar 31, 2011 12:34 am

Yes, changing the order of items in "Extensions->Order Total area." does not fix the issue. Which is FREE SHIPPING calculated based on subTotal and not final Total. Also while playing around with the items order I noticed some of the calculations get messed up.

As far changing the order of the items it did not fix the problem I'm having. My purchase amount is less than what's set for FREE SHIPPING ( subTotal - cupom = new total ) and the system is giving FREE SHIPPING. The way I look at it, is FREE SHIPPING should calculate using TOTAL and not SubTotal.

Any ideas ?

Newbie

Posts

Joined
Mon Oct 18, 2010 10:32 pm

Post by Qphoria » Thu Mar 31, 2011 2:34 am

fab26x wrote:Also while playing around with the items order I noticed some of the calculations get messed up.
As long as subtotal is first and total is last the rest should work fine.. except for coupon. As I said, it is a "cart before the horse" issue at this point and not much really can be done about it easily without changing the order of checkout which is planned for 1.5.0

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mberlant » Thu Mar 31, 2011 10:03 am

I would not want to test for the free shipping threshold from the "Total", either, because I don't want taxes or handling charges to push the cart value over the limit for free shipping.

Please use proper English at all times, so that all members may understand you.


User avatar
Active Member

Posts

Joined
Sun Mar 13, 2011 8:33 pm

Post by hopec » Thu Sep 08, 2011 9:25 pm

Hi,

I am experiencing the same issue.

For example, I have free shipping for orders over $50. A customer's order total is $55. They enter a coupon for $10 off. The total is now $45 with free shipping. The shipping module does not recalculate to remove the free shipping. I read that this issue would be addressed in 1.5, which is the version that I'm using, and I was just wondering what the status is.

Thank you for all your help!

1.5.1

Newbie

Posts

Joined
Thu Mar 31, 2011 12:02 am

Post by Seuldieu » Thu Dec 01, 2011 7:44 am

Any developments on this? I'm using 1.4.9.3 and the "order of operations" is definitely buggered.

I was thinking of attempting an overhaul, where coupons and customer information are entered first... and then on the order confirm page, you select your shipping options—I'm not that confident of an Opencart developer though, haha... gonna have to do some trial runs.

New member

Posts

Joined
Fri Dec 10, 2010 7:21 am

Post by Qphoria » Thu Dec 01, 2011 2:36 pm

Seuldieu wrote:Any developments on this? I'm using 1.4.9.3 and the "order of operations" is definitely buggered.

I was thinking of attempting an overhaul, where coupons and customer information are entered first... and then on the order confirm page, you select your shipping options—I'm not that confident of an Opencart developer though, haha... gonna have to do some trial runs.
This has nothing to do with this topic.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dizarter » Wed Dec 21, 2011 1:32 am

Now that we have 1.5.1.3 is this any easier to address? Because this can be seen as a severe bug.

New member

Posts

Joined
Tue Oct 11, 2011 7:33 am

Post by Qphoria » Wed Dec 21, 2011 2:02 am

dizarter wrote:Now that we have 1.5.1.3 is this any easier to address? Because this can be seen as a severe bug.
This has already been addressed when we moved the coupon to the cart page before the shipping step. There should be no issue if you set the coupon order total before the shipping order total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dizarter » Wed Dec 21, 2011 2:19 am

Hi Q, and thanks for such a prompt answer.

They say a picture says more then a thousand words, so I am attaching a screencap of "checkout/cart" page.

Free shipping is set to be available if Sub-total is at least $51.

You can see that everything is set as it should be, yet free shipping still appears as an option, even though sub-total is less then $51 after applying a coupon.
free_shipping_coupon_bug.jpg

free_shipping_coupon_bug.jpg (93.72 KiB) Viewed 4832 times


New member

Posts

Joined
Tue Oct 11, 2011 7:33 am

Post by dizarter » Wed Dec 21, 2011 2:57 am

The problem seems to be that module has absolutely no idea if coupons are applied or not (not to mention tax and other stuff),
thus $this->cart->getSubTotal() returns the same value as $this->cart->getTotal().

New member

Posts

Joined
Tue Oct 11, 2011 7:33 am

Post by dizarter » Wed Dec 21, 2011 3:45 am

Solved!

New member

Posts

Joined
Tue Oct 11, 2011 7:33 am

Post by nickt15 » Fri Jan 06, 2012 11:21 pm

Can you tell me how you solved this, I am having the same problem, I did everything the Q sd as far as the sort order, etc.. & my free shipping coupon will still not work, the UPS charges still show up at the end of check out, help someone !!

New member

Posts

Joined
Tue Jan 25, 2011 8:50 am
Who is online

Users browsing this forum: Bing [Bot] and 6 guests