Page 1 of 1

3 zone shipping mod

PostPosted: Sat Nov 08, 2008 3:44 am
by DartZmaN
Hi eveyone
I have been going through the posts re shipping but I am unable to find what I need

I need 3 zone shipping fixed shipping per item at checkout

Zone 1 shipping UK is 2.00 per item fixed (2 items = 4.00 and so on)
zone 2 shipping EUROPE is 3.00 per item fixed (2 items = 6.00 and so on)
zone 3 shipping REST WORLD is 4.00 per item fixed (2 items = 8.00 and so on)

I DO NOT need a weight or size Shipping mod
I am just after 3 zone shipping with fixed prices per item

I am using the latest version of Nopcart and PayPal as my gateway

Thanks in Advance

Kevin

Re: 3 zone shipping mod

PostPosted: Sat Nov 08, 2008 4:35 pm
by Randy
Set a quantity variable at the top of ManageCart function -- about line 556:
var fQty = 0;

Add the variable to count the number of items in the cart about line 592:

fQty += (parseInt(fields[1]);

Now, make your shipping calculations just before the line that shows the Shipping Row, stick them in radio buttons and go from there.
You will have to carry the cost of shipping over to checkoutCart function similar to the way TAX is done.

Take a look at the mods for zone shipping for ideas or cut and paste code -- :-)

Randy

Re: 3 zone shipping mod

PostPosted: Tue Nov 11, 2008 9:03 am
by DartZmaN
THanks for that Randy, however I am totally lost after

fQty += (parseInt(fields[1]);

I have no idea what to even look for to cut and paste, I would REALLY aprreciate a bit more comprehensive information (Dummies Guide) maybe even the code I need to add and where to add it

Re: 3 zone shipping mod

PostPosted: Thu Nov 13, 2008 6:37 am
by DartZmaN
any ideas anyone?

Re: 3 zone shipping mod

PostPosted: Thu Nov 13, 2008 1:59 pm
by Randy
Since fQty is the running total of the products in the cart, fShipping = fQty * (fShippingCost);

fShippingCost will be selected by the customers depending upon where they want it shipped.

Take a look at this post for UPS shipping by weight and zone:
viewtopic.php?f=5&t=727&p=2737&hilit=UPS+by+weight+and+zone#p2737
It will give you all kinds of ideas! You only want the zone part, and only 3 of them, so the mod becomes a lot easier.

Also search for "Shipping by zone" in the mods section -- maybe someone has had all the fun of developing just what you need.

Don't forget that once you have it working, post the code and spoil everyone else's fun!

R