Shipping has become a high priority for us recently, so I've had to put the reporting class on the back burner (although its only a few hours away from releasing to the community).
I have started a new "zone" system as follows.
Zone - Fields: Classification & Value
Group - Fields Group Name
GroupZone - links many Zones to a group (zones can belong to more then 1 group).
So far thats basically what we have in ZenCart.
ShippingModule - Zone : Fields ShippingModule_Id, Group_Id, InclusionFlag.
Now for example:
Zone - Classification can be PostalCode, Province/State, Country, City
Value - is a wild card value so things like T4C-1L6 can be done as T?C-*
So if I wanted all people in the city of Calgary to have flat pricing I can do that by saying I want the group "Calgary" included for this shipping module. I can then say I want the group "Calgary exluded from CanadaPost.
so what I have been building as step one is a class that can be linked into any existing shipping modules to allow more flexibility when it will show. THe problem with the current system is you can only select a single "zone".
What I have done is create my own set of tables for this so I'm not going to break any existing modules.
Now What RYK said is interesting as it falls into my next question, which is what types of shipping requirements are needed and then I want to create a "generic" set of classes that can be initially linked into existing modules, but eventually I want those to be re-written as well to be more flexible.
Now the discovery componend of this exersize:
-
Product requirements
- Products should be able to link to different shipping methods, OR be excluded from shipping methods (individually or based on category).
- Not sure what product groups are, so not sure how to implement on prod groupings.
-
Shipping criteria (on order).
Attributes to manage:
- Total Shipment (Size, Weight, & Cost)
- Individual Product Size. Weight & Cost
- Distance to ship.
Each of the above can affect the shipping costs, and what shipping modules should be shown.
Every shipment could have a component from each of these:
- we control the shipping cost, or
- 3rd Party controls (UPS, FedEx, Postal Service).
Types of shipping:
We have
* Free Shipping,
* Flat Rate per Region,
* Based on Purchase Cost
* Based on weight / size (total order or individual items)
* or totally based on 3rd Party.
So what other factors need to be considered?
What other conditions do we need to be concerned with? such as I want product a shipped free when linked to product B. Or if order is over X then shipping is free, etc.
Please list all you can think of and an importance factor to you. I will categorize them. and will try and plan out a way of implementing a core set of them. Now not all conditions will be implemented.
Once I have made a list then I'll ask for feedback on the recomendations. Then based on my non-existant time I'll work at implementing a module to make this work. (or beg other people to support this initiative and do some of the coding....hint..hint...hint...)