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