Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Flat Rate with Per Item Shipping

Flat Rate with Per Item Shipping

Locked

Views: 1,551

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Mar 2009, 4:50 AM
#1
vdivito avatar

vdivito

New Zenner

Join Date:
Mar 2009
Posts:
6
Plugin Contributions:
0

Flat Rate with Per Item Shipping

I have been searching a while now and have not found an answer to this.

I am using version 1.3.8a. I am trying to set up two different shipping methods for two separate categories of products. Items in category A will ship for a flat fee of $5.00 no matter what the quantity might be. Items in category B will ship for $5.00 per item. If the customer orders 10 items from category A and two items from category B then the shipping charge should be 5 + 5 + 5 = 15. I currently have the per item and flat rate shipping modules installed.

Any help with this is greatly appreciated.

24 Mar 2009, 4:38 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Flat Rate with Per Item Shipping

You would really need to customize a shipping module to do this sort of calculations as you cannot use total items in the cart in the calculation as total items is incorrect ...

You cannot use the Flat Rate alone, as that is incorrect ...

What you need is to know how many are from Category B * 5.00 and if there is at least 1 Product from Category A then add 5.00 ...

There are functions in the shopping_cart.php class where you could use the master_categories_id to determine how many Products * Qty come from each Category ...

The results would be:
Products in Categories A >= 1 add 5.00
Products in Categories B add 5.00 * quantity

So a customized shipping module would be the best method to do this ...

20 Apr 2009, 8:42 PM
#3
kauai avatar

kauai

New Zenner

Join Date:
Mar 2008
Posts:
13
Plugin Contributions:
0

Re: Flat Rate with Per Item Shipping

I too would like to do this and am a total newbie and I share the same problem. Where is the file located where we need to make the changes?

Cat A to be flat shipping: $5 flat fee no matter how many quantities
Cat B to be per item: $14.95 per item

If purchase from Cat A and B= $5 + $14.95 shipping.

Any help would be appreciated thanks.

21 Apr 2009, 3:39 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Flat Rate with Per Item Shipping

I'd use the Item Rate item shipping module as the basis for this customization ...

Count how many items in the cart are from master_categories_id A and reduce the item count by that many * the amount per item set ... then add 5.00 to the total cost ...

This is based on the assumption that all Products in Category A use the same master_categories_id number ...