postcode + weight x parcel size help

Thread began 11/29/2016 4:43 pm by Christopher West | Last modified 12/02/2016 10:35 pm by Ray Borduin | 393 views | 3 replies |

11/29/2016 4:43 pm  |  #1 Christopher WestCommunity Expert

postcode + weight x parcel size help

Hi hope anyone can help with some logic.

I have already created an ecommerce delivery system for client which calculates successfully the delivery cost based on total order weight x parcel size on length x width x depth the delivery cost then check on zone (and the first 2 characters of a postcode is based on what ever zone I assign it in the database) so that all works fine.

But I have come to a logically problem. the client is using 3 separate delivery companies (Royal Mail, Parcel Force and a 3rd that deals with very large deliveries).

all clients products store length, width and depth and weight in the database. so that's all fine.

However currently ParcelForce and Royal mail only use 3 zones to separate the country. And the 3rd delivery company splits the country into over 20 zones (all based on the first 4 characters of a postcode. the first 2 characters are letters and the 3rd and 4th character of the postcode are 2 numbers).

obviously it doesn't matter to the customer which of the 3 delivery companies is used.

I think the solution is to somehow use the same postcode/zone split of the country that is used for Royal Mail/Parcel Force and use that for the 3rd delivery company (rather then use the 20 odd zones that the 3rd delivery company use) By doing this then it would make the lookup easier I guess. what do you think?

Also currently Royal Mail and the 3rd delivery company provides max weight and max length, max width and max depth. BUT ParcelForce only provides max weight, max length AND combined 2nd length+max girth. So not sure what to do that calculation...any suggestions there? I don't need coding help, just the logic and I can use that logic to code the solution.

This is for a small shop furniture company. and its really frustrating me as the client changed the goal posts after some time of agreeing price of project etc. But as the delivery system is working currently with first 2 letters of postcode x max weight and max length, width, depth. I just need to enter the values into the database for costs. but I will probably need to add in some php IF statements to do a check on the parcel force combined length+girth x length sizes. and I need a way to simplify the zones. (currently I need to enter in around 2000 postcodes from around GB since parcel force have provided a 4 character postcode list of all their 3 zones.

anyone?

Chris

12/01/2016 12:26 am  |  #2 Ray BorduinWebAssist

It is likely just a series of IF statements to do the correct calculations and assessment. However it is too complex for me to really comment on without getting into the code. A premier support ticket might be your best option to get help with this.

12/01/2016 3:49 pm  |  #3 Christopher WestCommunity Expert

I thought to do a series of IF statements. I have a separate php file that does the delivery calculations, so I assume I just do all the IF statements in there, checking...
for one of the delivery companies they provided me with these calculations:

150 cm as a longest length.
300 cm length and girth combined.
30 kilos.

Any variation of the box dims that doesn’t exceed this is fine on any service.

Here are some examples
100 cm x 50 cm x 50 cm – L / W / H – The reasoning here is 50 plus 50 CM (two smallest dims – of the 3 – L / W / H) added together equals 100 – 100 x 2 = 200 and 200 – Plus the outstanding and remaining 1 dimension of 100 cm = 300 CM L and G Combined.
Another example is 60 x 60 x 60 cm – using the same maths –

do you think thats straight forward to do with a bunch of IF statements? I would need to do a first IF statement to check to see if the size falls for that particular delivery company.

12/02/2016 10:35 pm  |  #4 Ray BorduinWebAssist

Yes I would think you can do the calculations and add IF statements without too much trouble.

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.

Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

We were unable to retrieve the attached file

Close Window

Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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 --