Page 1 of 1

Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Wed Nov 24, 2010 2:04 pm
by efficiondave
We've got a "Vary By Cost" formula setup for calculating the shipping cost based on the order sub-total. The problem is AbleCommerce sometimes calculates against the sub-total (good) and sometimes calculates against the total (bad). I'm not sure if this is due to a customization we made or if this is a known issue with AbleCommerce. Has anyone else run into this. Where can I find the code that calculates this or is it all hidden in CommerceBuilder?

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Fri Nov 26, 2010 9:56 am
by jmestep
What build of Able? Are you using coupons. There is a bug relating to coupon/shipping calculation in builds before 7.0.5

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Fri Nov 26, 2010 10:53 am
by efficiondave
I'm using 7.0.4. And yes, we are seeing the problem when coupons are used. Is there anything that can be done to fix this in a 7.0.4 build? We've customized the store pretty heavily so upgrading to 7.0.5 could be challenging.

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Sat Nov 27, 2010 8:19 am
by jmestep
I had tried to fix it by pulling the code out of Able's source code and it was so complicated and required so many pieces that I didn't get it done. (This is a 7.0.3 site). The client ended up having us delete the coupons whenever a customer left the checkout page, changed an address on the checkout page, etc.
Here is a bug report on an issue
http://bugs.ablecommerce.com/show_bug.cgi?id=8849

and one of the comments had to do with custom viewstate, which you might feel comfortable messing with.
Comment #2 From Logan Rhodehamel 2010-04-08 17:22:31 (-) [reply] -------
Well the basket appears to be recalculated. At least one problem was that in
the one page checkout, there are cached shipping rates held in the custom
viewstate. This reduces needless round-trips to the shipping carriers for
rates. But if a coupon was applied, the cached rates were not reset.

I also made a change to make sure coupons are recalculated both before and
after shipping charges. They must be calculated before in case any shipping
methods rely on order total. They must be calculated after in case any coupons
apply to shipping.

I also adjusted the coupon dialog slightly to help ensure that when requested a
coupon is applied to the basket as early as possible in the page processing.
These changes are checked into trunk 13711 and 13712. (Checked in
CommerceBuilder.Data.DLL by mistake - it is not part of the modified set.)

FILES MODIFIED:

Bin/CommerceBuilder.DLL
ConLib/CouponDialog.ascx.cs
ConLib/OnePageCheckout.ascx.cs
It does look like it might have been patched in SR2 for 7.0.4

http://help.ablecommerce.com/upgrades/a ... _7.0.4.htm

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Sat Nov 27, 2010 1:07 pm
by efficiondave
Thanks Judy! Very helpful!

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Wed Jun 01, 2011 2:49 pm
by ZLA
HELP! Was there a patch for AC 7.0.2? My client just did their biggest coupon ever using Groupon and the first order using it is calculating the shipping *after* applying the discount.

If there isn't any patch, do you have any suggestion on work-arounds on how to fix this?

Thank you in advance.

ZLA

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Wed Aug 03, 2011 11:35 pm
by efficiondave
We have upgraded to 7.0.4 SR2 Build 14026 and it is still calculating against the total rather than the subtotal.

The calculations happen in the Basket.Recalculate function with is part of the CommerceBuilder.DLL so it doesn't seem there's anything we can do on our own without upgrading but without some kind of verification that this is fixed in a later version, I can't justify the effort of the upgrade.

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Thu Aug 04, 2011 7:44 am
by jmestep
It might have been fixed in SR2 for Able 7.0.4
http://help.ablecommerce.com/upgrades/a ... _7.0.4.htm

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Thu Aug 04, 2011 9:57 am
by efficiondave
I did upgrade to SR2 and it seems that now it consistently calculates against the total rather than the subtotal. I need it to calculate against the subtotal. So it seems they fixed the inconsistency issue but, at least for my needs, went with the wrong number. I'm guessing that with 7.0.5+ it is still calculating against the Total rather than Subtotal. Not sure what to do.

Re: Shipping: Vary By Cost:Calculating against total & sub-total

Posted: Wed Sep 14, 2011 5:01 pm
by efficiondave
My client continues to lose money are a regular basis due to this issue. It's particularly bad for "Deal of the Day" type coupons like Groupon. I'm at a loss for what I could do to resolve the issue short of buying the source code and making the change myself. Any other suggestions.