Forums / Built-in Shipping and Payment Modules / Percentage or Flat rate shipping whichever is greater

Percentage or Flat rate shipping whichever is greater

Locked

Views: 3,427

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
12 Sep 2007, 4:38 PM
#1
ptbarr avatar

ptbarr

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Percentage or Flat rate shipping whichever is greater

I am attempting to set up a shipping module for the non contingent USA that will charge either $17.95 or 35% whichever is greater...is this possible and if so how do I go about doing it? I have the table rate set up for the 48 states and just need this for the rest of them. Any help??:unsure:

12 Sep 2007, 4:43 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Percentage or Flat rate shipping whichever is greater

You could clone the Flat Rate flat shipping module and code it to make this calculation for you and return the correct value ...

For tips on cloning flat.php do a search on:
clone flat

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Sep 2007, 4:46 PM
#3
ptbarr avatar

ptbarr

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Re: Percentage or Flat rate shipping whichever is greater

any tips on how to code it....I'm pretty new to all this

13 Sep 2007, 4:51 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Percentage or Flat rate shipping whichever is greater

Just check if 35% of the total is > 17.95 ... if so set the cost to that calculation ... otherwise use the 17.95 as defined ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Nov 2007, 5:52 PM
#5
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Percentage or Flat rate shipping whichever is greater

huh, geez, Linda, I know he didn't find your answer to be helpful since he knows less than I. I need to do this for a customer and will add to contributions if you'll give me a hint or two more.

Fully integrated would mean an install query to add the percentage input box in admin and a box to put the total amount and then incorporate that into the flat module with an if statement to use percentage if over the total amount. So - the queries are easy enough for me. Otherwise would it be just adding another function to the module?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

14 Nov 2007, 6:06 PM
#6
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Percentage or Flat rate shipping whichever is greater

ahem, I've made all the other changes to the script

'cost' => MODULE_SHIPPING_FLAT_PERCENTAGE_COST)));

I believe this where I need to make the coding changes. Am I on the right track?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

14 Nov 2007, 7:00 PM
#7
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Percentage or Flat rate shipping whichever is greater

never mind. I got it and I'll post it to the downloads section shortly.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo