close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

setting up different shipping cost depending on dimensional weight and zones

Thread began 1/08/2010 1:10 am by teethirty | Last modified 1/14/2010 2:50 pm by Eric Mittman | 2539 views | 6 replies |

teethirty

setting up different shipping cost depending on dimensional weight and zones

Hi there,
How do I setup different shipping cost depending on dimensional weight ( (L*W*H)/3500 ) and zones.

Let's say I have item 1 which has a dimension of 6,552 (36*14*13) and item 2 which has a dimension of 13,320 (37*24*15). Total dimension would be 19,872 (6,552+13,320) and total dimensional weight would be 5.68kg (19,872/3500).

Here are the rates the shipping company gave me:

per kg-----zone 1-----zone 2-----zone 3
0-1----------90----------95---------95
1.1-1.5-----105---------110-------110
1.6-2 -------125---------140-------140
2.1-2.5-----150---------175-------175
2.6-3-------180---------190-------210
3.1-3.5-----200---------210-------245
3.6-4-------215---------225-------280
4.1-4.5-----225---------260-------315
4.6-5 -------250---------300-------350
5.1-5.5-----265---------325-------370
5.6-6-------280---------350-------390

How do I set this up?

Thanks!
Dave

Sign in to reply to this post

Eric Mittman

How are the zones for these values defined? You will need to know what criteria to use to determine what the zone is. If it is based on something like the zip code then you will need to know all of the zip codes that belong to a particular zone. Do you have this information in a table in your db? Please post back and include all the details you can about the zones and how this information is stored.

Sign in to reply to this post

teethirty

they gave me a list of what cities are included in a zone. For example:

Zone 1
Kalookan
Las Piñas
Makati
Malabon
Mandaluyong
Manila
Marikina
Muntinlupa
Navotas
Parañaque
Pasay
Pasig
Pateros
Quezon City
San Juan
Taguig
Valenzuela

Zone 2
Bataan
Batangas
Bulacan
Cavite
Laguna
Nueva Ecija
Pampanga
Rizal
Tarlac
Zambales

Zone 3
Abra
Albay
Aurora
Benguet
Cagayan
Camarines Norte
Camarines Sur
Catanduanes
Ifugao
Ilocos Norte
Ilocos Sur
Isabela
La Union
Masbate
Marinduque
Mindoro Occidental
Mindoro Oriental
Nueva Viscaya
Pangasinan
Quezon
Quirino
Romblon
Sorsogon
Virac

Zone 4
Aklan
Antique
Biliran
Bohol
Capiz
Cebu
Eastern Samar
Guimaras
Ilo-Ilo
Leyte
Negros Occidental
Negros Oriental
Northern Samar
Palawan
Siquijor
Southern Leyte
Western Samar

Zone 5
Agusan Del Norte
Agusan Del Sur
Basilan
Bukidnon
Camiguin
Compostella Valley
Davao Del Norte
Davao Del Sur
Davao Oriental
Lanao Del Norte
Lanao Del Sur
Maguindanao
Misamis Occidental
Misamis Oriental
North Cotabato
Saranggani
South Cotabato
Sultan Kudarat
Surigao Del Norte
Surigao Del Sur
Zamboanga Del Norte
Zamboanga Del Sur
Zamboanga Sibugay

Regarding how the info is stored, I haven't done anything about that yet. Is making a database the only way to make this work?

Sign in to reply to this post

teethirty

Hi again, I tried making a table for the zones and the rates, I don't know if I did it right. Below are the screenshots of the tables.

Sign in to reply to this post

Eric Mittman

Good work getting this info into your db. There is one part of this that you will need to update though in order to make use of this info. Instead of having separate tables in your db for each zone you should have this info in a single table. There should be an extra column in this table to hold the zone though.

So this table in the end will list all of the cities available to ship to, then for each city there will be a zone listing. This way when the user checks out and they enter the name of their city in the form you can do a lookup for the zone by searching this table for the matching city. I hope that makes sense.

When you get this part worked out let us know and I can cover some examples of using this information in your shipping rule to return the proper value. Please also post back with some more info about how you calculate the dimensional weight, weather this is done on a per item basis then accumulated or done for the whole cart at once and any other details that you can think of.

Sign in to reply to this post

teethirty

Hi, I attached images of how the tables look like now. I hope it's correct this time.

I added a dimensions column (shown below) in ecart then i'll just input the dimensions per item. The dimensional weight is the total of the all the items' dimensions divided by 3500.

Let's say the first item's dimensions is 6,552 (36(L)14(W)13(H)) and second one is 13,320 (37(L)24(W)15(H)) adding them up totals to 19,872 then dividing it by 3500 gives as the dimensional weight (5.68kg)

I have another question, how do I define weight classes? As you can see in my weight_class column in the shipping_rates table, weight class is numbered 1-15. How do I define that class 1 is .01kg to 1kg, class 2 is 1.01kg to 1.50 kg and so forth. Do I need to make another table for this?

Sign in to reply to this post

Eric Mittman

You are on the rite track, the table for the cities and zones looks good. There is a problem with the way the weight classes and zones table is setup though. Rather than have columns for 1, 2, 3 with the prices in them you should instead have the columns like this:

weight_class, zone, price

The table will hold the same amount of info but it will have a unique record for each weight class and zone combination. When the rule is created you will have some custom code on your confirm page that will do the following:

The first thing you do is filter a recordset on the user entered city and store the zone for that city in a session variable. Next you will calculate your dimensional weight and store that result in a session variable. Finally you will have another recordset that will search your new weight_zones table that will be filtered on the zone and dimensional weight stored in the session variables. This will give you the shipping cost that you can store in a session variable.

The final part will be to create a shipping charge rule that will apply a flat rate shipping based on the value of this shipping cost session variable.

There is another part of this that needs to be addressed also, is this weight based on a per line item basis, or do you multiply based on the quantity. If you multiply based on the quantity then you should add a new calculated column to your cart for total dimensions. This will multiply the dimensions column you added by the quantity to give you a total dimensions for that item.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...