I need a custom Zen Cart shipping module as follows:
1) I ship several different products which use a varying number of bulk parts. Each product has a unique Zen Cart product code. There are about 10 unique products/codes. There are no size or other characteristics associated with each product/code. Each code uniquely specifies the product and parts count.
2) The bulk parts encompassing a product always ship in plastic jars of the same size. Depending on the quantity of parts for each fixed product, a particular product may use between one and six jars. The number of jars is always the same for a particular product code.
3) I ship from the US. The only shipping method used is USPS (United States Postal Service) Flat Rate Priority Mail. USPS Flat Rate Priority Mail utilizes special boxes provided by USPS. I use two sizes of these boxes, medium and large. The medium box can contain exactly two of the above mentioned jars. The large box can contain exactly three of the above mentioned jars.
4) When using USPS Flat Rate Priority Mail and the special boxes, weight is not an issue (within maximum limits not relevant to this discussion).
5) The shipping cost is fixed (for a particular zone) regardless of weight, for each box size (medium and large in this case). There are three zones, US, Canada and Mexico, and the rest of the world. Thus there are six shipping prices fort the boxes and zones that the shipping module needs to be aware of, specifically, three different zone prices for each of the two different box sizes.
6) The total order may have a variable number of jars depending on the number of jars per product, and the number of products of each type ordered. Any quantity of the various products may be ordered. A combination of medium and large boxes is used with the following goals in mind:
a) Jars containing parts for different products may be combined in the same box or spread across multiple boxes as required.
b) The total number of boxes is to be minimized.
c) The large boxes are to be used, if they can be filled with three jars, as much as possible, with any overflow being shipped in the medium boxes (which can accommodate two jars max).
d) Boxes are to be filled as completely as possible. For example an order with four jars, would ship in two medium boxes, not a large box and a half-filled medium box.
1 medium box is used if 1 jar is shipped.
1 medium box is used if 2 jars is shipped. (This fills the medium box)
1 large box is used if 3 jars are shipped. (This fills the large box.)
2 medium boxes are used if 4 jars are shipped,
1 large and 1 medium box is used if 5 jars are shipped.
2 large boxes are used if 6 jars are shipped.
2 large boxes and 1 medium box are used if 7 jars are shipped
2 large boxes and 1 medium box are used if 8 jars are shipped.
3 large boxes are used if 9 jars are shipped.
8) It may be possible to devise an elegant algorithm or formula to derive the required number of medium and large boxes to accommodate a particular number of jars, but I would prefer to use a table driven approach, where two arrays are used, one for the medium box count, and one for the large box count, driven by an index which is the number of jars to be packed. I will edit/modify/expand these arrays per the examples in (7) above and as needed. There are also special situations I will wish to consider in these arrays, or I may devise my own algorithm or equations, so I would like the count for the two boxes to be table driven as described above. Do not waste your time devising a special algorithm or equation.
9) I currently make use of the Zone shipping module and the weight option to approximate my current shipping costs. Due to the unique considerations above, the current approach is inadequate and problematic. However, I do want to make use of the three zone information.
10) I do not require a perfected module with perfect interfaces for commercial use that I will need to install. What I would like to do, is use the existing:
includes/modules/shipping/[url removed, login to view] module to make use of the zones detection logic and already entered zones countries, and modify it minimally as necessary, merely commenting out superfluous code, and then simply save a backup and write over the old [url removed, login to view] with the new modified version to avoid reinstallation. Thus, you will also not have to be concerned with the install method and so on - only the calculation logic. Please only comment out irrelevant code, do not delete it, as I may make mods later and the existing code will help me establish context as I am already familiar with it.
11) To summarize:
a) Orders may consist of an arbitrary number of products, each of which is shipped in a number of jars that is fixed for each product code. Weight is irrelevant. Within each product type, there are no additional selections for style, color, etc.
b) A total number of jars will be derived by iterating through the order items, and multiplying the quantity of jars for a particular product, by the number of jars for that product. The number of jars per product will be hard-coded and initialized from within the shipping module using an associative array. I do not want this table to be stored in a mySQL table.
c) The total number of jars determined in (11)(b) will be used as an index to look up the number of medium and large boxes required in two additional arrays. These arrays will also be hard coded and initialized from within the shipping module and will not be stored in a mySQL table.
d) The existing code of the [url removed, login to view] module that determines the zone from the existing country code lookup will be utilized. Based upon the zone of the shipping address country, the total shipping price will be determined using the flat rates for the medium and large boxes in those zones by multiplying the number of required large and medium prices, by the relevant prices for shipping the boxes to those zones. These prices will be stored in one or more arrays (a 2D array would be ideal but several 2D arrays will be fine to simplify code) which will be initialized and hard coded in the shipping module. I do not want this information to be stored in a mySQL table. The table data is as follows:
Zone for US:
Medium: 10.20, Large 13.95
Zone for Canada and Mexico:
Medium: 25.60, Large 32.25
Zone for all other countries:
Medium: 41.28, Large 53.15
e) No modification should be required to:
includes/languages/english/modules/shipping/[url removed, login to view]
f) You will test with your own test Zen Cart installation. Access will not be granted to my live Zen Cart installation.
I would like to get this module quickly (a few days). It is pretty simple if you know the shipping module class structure and interface, and how to access order items. I am a PHP programmer but am currently committed to another project.
I am looking forward to your bids, and thank you very much!