Zen Cart Logo

Shipping Add On Cost

Locked

Views: 614

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
14 Aug 2010, 6:35 AM
#1
wildmike avatar

wildmike

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Shipping Add On Cost

Here's the situation,

I have some products that I have on hand and other items that I use from a drop shipper.

My drop shipper bases their shipping this way:

Carrier Charge(USPS) x 1.2 + $1.00 = Shipping Charge For example, $4.80(USPS) x 1.2 + $1.00 = shipping charges of $6.76

Is it possible for me to multiple the shipping cost this way and add on the $1.00

Or would I be better off doing a flat rate total order percentage to cover the extra expense?

14 Aug 2010, 3:01 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Add On Cost

Do you want to do this for ALL Products in the Order?

If so, then it would not be a difficult customization ...

However, if you try to separate the Products based on who gets the extra charges and who does not, then it will get very complicated ...

14 Aug 2010, 3:14 PM
#3
wildmike avatar

wildmike

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Re: Shipping Add On Cost

It would be on every product

14 Aug 2010, 3:20 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Add On Cost

Then this would make it a simple processes of customizing the file:
/includes/modules/shipping/usps.php

and increasing the cost received from the USPS server in the quote function ...

For the Handling of $1.00, you can set that on the USPS shipping module itself in your Zen Cart Admin when you edit the settings for the module ...

14 Aug 2010, 5:38 PM
#5
wildmike avatar

wildmike

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Re: Shipping Add On Cost

I'm looking through the file and can't see what needs to be changed, what is the quote area that needs to be changed, the only thing I saw was for a quote and a -1

what would I need to change and to what?

Thank you for your help

14 Aug 2010, 6:00 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Add On Cost

In the function quote, you will see this line:

          $cost = preg_replace('/[^0-9.]/', '',  $cost);

That is converting the $cost to a value ...

Beneath that, before the array is build for the $methods, you can add additional code to raise this price so that it is now 1.2 times the cost received from USPS ...

Something like:

$cost = $cost * 1.2;

would raise ALL quotes from USPS by 20% ...

14 Aug 2010, 7:26 PM
#7
wildmike avatar

wildmike

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Re: Shipping Add On Cost

thank you that did it :)

15 Aug 2010, 4:49 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Shipping Add On Cost

Thanks for the update that this was able to work for you ... :smile: