Question

I'm working on an e-commerce type web application and need to somehow handle calculation of shipping costs. Some rules I've found:

  1. Free shipping
  2. Free shipping with minimum purchase
  3. Free shipping within a certain geographic area
  4. Flat rate shipping
  5. Flat rate + set amount per product
  6. Various rates depending on speed of shipping (shipped immediately and/or how soon it gets to customer)
  7. Based on height, width, depth, weight + shipping distance
  8. Based on rates of various shippers

... and so on.

Any suggestions how to tackle such a problem? I can't be the first one to have this problem. Thanks.

Was it helpful?

Solution

I suggest you take a look at some available open source ecommerce solutions. There are a LOT of them and each one takes a stab at doing exactly what you are trying to do. If it is schema design you are after I wouldn't limit your searches to just MySQL - as long as it contains a relational database it should be easy to dig into the design. I'd take a look at nopcommerce to name just one...

OTHER TIPS

Create a framework where your eCommerce system accepts modules that define shipping rules (and interfaces and calculations, etc). Design it such that you expect these modules to be able to provide all those functions. Let the end users decide which modules to use based on their own needs, as which shipping rules to use is a business decision and not a technology one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top