Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Shipping Different for each item

Shipping Different for each item

Locked

Views: 2,008

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
13 Sep 2006, 8:36 PM
#1
cgcullen avatar

cgcullen

New Zenner

Join Date:
Sep 2006
Posts:
3
Plugin Contributions:
0

Shipping Different for each item

I have a customer that wants to use zen cart but has a strange shipping arrangement. Each item may have a different shipping cost. I figured that I could use the per unit module and set the shipping cost in the weight field, but here's the catch:

If someone order 2 or more items, she wants the highest shipping amount + $2.50 for each additional item.

For example, if someone orders 2 items - the first costing $8.50 to ship and the second costing $5.50 to ship, she wants me to take the $8.50 + $2.50 for the additional item.

I wish I could combine the per unit and per item methods. :)

Is there a way to do this in zen cart?

If not, can you point me to the place where I could change the code? I am a php programmer, but I figured you could point me to the correct file to change quicker than I could find it. :)

Thanks,

Cindy

13 Sep 2006, 9:30 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: Shipping Different for each item

<rant> Geeze, clients that come up with this ridiculously complicated shipping things... </rant>

Sorry I can't help you with the code.

14 Sep 2006, 2:08 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Different for each item

It could be done ... but would take some customization to the code ...

This is not currently an available Shipping method as I do believe your client ..,. ummm ... made it up ... :eek:

But, it can be written to behave in this manner if you really need to have the custome code working in this fashion ... just depends on how much your client is willing to invest in having it customized ... :smile:

14 Sep 2006, 2:16 AM
#4
cgcullen avatar

cgcullen

New Zenner

Join Date:
Sep 2006
Posts:
3
Plugin Contributions:
0

Re: Shipping Different for each item

Is this something I could change? If so, can you tell me which part of the code I should change? Like I said, I'm a php programmer, but not familiar with zen cart. Can you point me to the code I would need to customize?

And yes she did make it up. I was going to write a custom shopping cart, but ran across zen cart and liked what I saw. I think it will come awfully close to what she wanted me to write.

Thanks,

Cindy

14 Sep 2006, 3:00 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Different for each item

You would use something like perweightunit.php and see how it manages a differnt type of calculation on the weight ...

You would need a totally different calculation for this to determin the highest charge then calculate from there ...

Then you can use the products_weight as the actual shipping charge and your calculation would determin who is highest of all the products, then use that to build your calculation ...

20 Sep 2006, 8:53 PM
#6
cgcullen avatar

cgcullen

New Zenner

Join Date:
Sep 2006
Posts:
3
Plugin Contributions:
0

Re: Shipping Different for each item

Ajeh:

You would use something like perweightunit.php and see how it manages a differnt type of calculation on the weight ...

You would need a totally different calculation for this to determin the highest charge then calculate from there ...

Then you can use the products_weight as the actual shipping charge and your calculation would determin who is highest of all the products, then use that to build your calculation ...

I got it working! Thank you very much!

Just for the record, I had to change shopping_cart.php class to add a variable for the highest_shipping_price

I changed the calculate method to find the highest shipping weight (price)

I changed the checkout_shipping header to add a global variable for the highest shipping price

And I changed the perweightunit to calcluate the highest shipping weight + (number of items - 1) * 2.50 + handling

Works like a charm. :)

Now I just need to figure out how to take the shipping weight off the product listing screen so that it doesn't confuse the buyer. I could go through all the templates, but I'm guessing there is a switch somewhere in zen cart to keep the shipping weight from showing. I just haven't found it yet.

Thanks again,

Cindy