How is mimimum purchase applied to shipments

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

How is mimimum purchase applied to shipments

Post by mfreeze » Mon May 19, 2008 10:50 am

My client has a problem that I believe is being caused by how the minimum purchase is applied to shipments.

What she wants is to have the minimum purchase amount based on the total order amount. It appears that it is currently based on the total of each shipment.

For example, if I order a product costing 149.00 that is set up to be shipped from the 'free shipping' warehouse and one or more products from another warehouse with a total of less than the minimum purchase for certain shipping methods, these shipping methods are not available for selection even though the total purchase amount of both shipments exceeds $100.00.

Am I correct in assuming that the minimum purchase amount is calculated on each shipment instead of the total order amount? If so, is there an easy way to change this behavior?
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: How is mimimum purchase applied to shipments

Post by sohaib » Tue May 20, 2008 4:03 am

Minimum purchase applies based on the 'Order Total' amount. It is not based on total of each shipment. This is how it should work.
Enforcement of minimum purchase is all done in aspx files so if you need to change anything you can easily do so.

Check the code in
ConLib/Basket.ascx.cs
ConLib/OnePageCheckout.ascx.cs
ConLib/PaymentPage.ascx.cs

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: How is mimimum purchase applied to shipments

Post by jmestep » Tue May 20, 2008 8:11 am

Sohaib, even with parts of the order being shipped from separate warehouses? I think that is the problem here, but I don't have a site to test it on.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: How is mimimum purchase applied to shipments

Post by sohaib » Tue May 20, 2008 8:31 am

jmestep wrote:Sohaib, even with parts of the order being shipped from separate warehouses? I think that is the problem here, but I don't have a site to test it on.
Yes. At least that is how it has been coded. I haven't tested this scenario myself but I see no reason why it should behave differently when there are multiple shipments from multiple warehouses. The code gets the order total for comparison using

Code: Select all

Token.Instance.User.Basket.Items.TotalPrice()
It shouldn't change based on how shipments are setup.

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: How is mimimum purchase applied to shipments

Post by mfreeze » Tue May 20, 2008 11:17 am

The way it seems to be working is:

1. A product is ordered from the 'free shipping' warehouse and qualifies for free shipping
2. A product is ordered from another warehouse with a total of less than $100.
3. The order is broken into 2 shipments, one from the 'free shipping' warehouse and one from the other warehouse
4. On the shipping page, the first product presents a shipping dropdown with only the free shipping choice, which is correct. The other product presents a shippng dropdown with only the choices that apply to the shipping zone that do not have a minimum purchase of $100.00

To see how it works, go to http://d271510.h39.alotlooney.com; select the Buffalo Gal Sampler from the Meat Gift Packs Category and add it to your cart, then select Bison Bratwurst from the 'Bison Sausage' category. Under the shipping choices for the bison bratwurst, you will see only 3 shipping methods, the 3 $100 minimum purchase methods (UPS Ground, UPS 3-day, and FedEx Ground) do not appear as choices even though the total order is over $100.00.
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: How is mimimum purchase applied to shipments

Post by sohaib » Tue May 20, 2008 11:49 am

OK. So you are talking about Minimum Purchase for a shipping method and I am talking about Order Minimum Amount (See Store Settings).

For shipping methods minimum purchase takes into account the total of the shipment that is being shipped using the shipping method. If you see the tool tip on Minimum Purchase in ship methods it says "The minimum purchase value of a shipment required for this method to be valid."

Changing the behavior so that it considers purchase value of the order rather than purchase value of the shipment would require modifications in the back-end code.

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: How is mimimum purchase applied to shipments

Post by mfreeze » Tue May 20, 2008 12:28 pm

That was what I thought was happening but the explanation wasn't 100% clear. My client needs it to work from order total so I am going to need to dig into the code.

Thanks
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: How is mimimum purchase applied to shipments

Post by sohaib » Tue May 20, 2008 12:55 pm

If you have got the source code you just need to modify ShipMethodDataSource.LoadForShipment method

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: How is mimimum purchase applied to shipments

Post by mfreeze » Tue May 20, 2008 1:00 pm

It looks like the code for the calculations is in the ShipMethod class and can't be changed without a recompile, which I don't really want to do due to upgrade and support issues. There is nothing obvious we can do in the conlib files to alter the behavior.

Guess we will need to find another way.
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: How is mimimum purchase applied to shipments

Post by jmestep » Tue May 20, 2008 2:41 pm

If you have got the source code
Is the source code out now? I've been waiting........
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply