3 zone shipping mod

Completed modifications to the NOP Shopping Cart. Additions, modifications, and more.

Moderators: Koibito, Stefko, Randy, Rosey

3 zone shipping mod

Postby DartZmaN on Sat Nov 08, 2008 3:44 am

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
DartZmaN
WebMaster
 
Posts: 8
Joined: Sun Feb 15, 2004 3:06 am
Location: Melbourne, Australia

Re: 3 zone shipping mod

Postby Randy on Sat Nov 08, 2008 4:35 pm

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
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario

Re: 3 zone shipping mod

Postby DartZmaN on Tue Nov 11, 2008 9:03 am

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
DartZmaN
WebMaster
 
Posts: 8
Joined: Sun Feb 15, 2004 3:06 am
Location: Melbourne, Australia

Re: 3 zone shipping mod

Postby DartZmaN on Thu Nov 13, 2008 6:37 am

any ideas anyone?
DartZmaN
WebMaster
 
Posts: 8
Joined: Sun Feb 15, 2004 3:06 am
Location: Melbourne, Australia

Re: 3 zone shipping mod

Postby Randy on Thu Nov 13, 2008 1:59 pm

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
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario


Return to Modifications

Who is online

Users browsing this forum: No registered users and 1 guest