This is a discussion on Re: Shopping Cart P&P within the PHP Language forums, part of the PHP Programming Forums category; Why not: For each database inventory item include a nullable 'shipping_cost_factor.' If not set, it defaults to a well known ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Why not:
For each database inventory item include a nullable 'shipping_cost_factor.' If not set, it defaults to a well known value. This allows setting a higher than default factor for large volume or heavy products (300 cubic feet of styrofoam, and/or five gallons of epoxy resin both cost more to ship than a tube of tooth paste). Then, at calculate-shipping-cost-time, you take the factor, for each item, and multiply it by a second number, which comes from a lookup table, indexed by the customers Zip code (distance from your warehouse), and then multiply that times a dollars-per-cost factor, to arrive at the final price. shipping_cost_factor * zip_distance_from_ware_house * dollars_per_factor == final_cost. |
|
|||
|
"RG" <Me@NotTellingYa.com> wrote in message news:<3f30bfa0$0$46009$65c69314@mercury.nildram.ne t>...
> Thanks for your input, it is appreciated. > The problem I have is that I need to build this system with mulitiple > clients in mind, and needless to say, they will all want to calculate it > differnetly. > I need to somehow build an admin facility that keeps everyone happy. > Joe Bloggs Printing Machinery will no doubt want to do it by weight X > location whilst Foo Bar CD's will only want to do it by amount X location > > This is going to do my head in me thinks, but thanks for the input. > RG > Put as many calculation factors into the process as you need, for all customers. For those customers that want to ignore distance from warehouse, set that factor to one. Then all you need is a little forms based GUI to set global calculation factors for each discreet customer (all of which use the same schema). How do you want to load new inventory items? From a delimeted file? Or from another administrative form? Either way the loading process would provide a mechanism for initializing the cost factors (weight, volume, distance, whatever else). All such factors could be one (ignored) or set to higher value. Then you could custom tailor the cost calculation on an individual basis, using the same mechanism for all. No sweat. |
|
|||
|
Thanks for your input, it is appreciated.
The problem I have is that I need to build this system with mulitiple clients in mind, and needless to say, they will all want to calculate it differnetly. I need to somehow build an admin facility that keeps everyone happy. Joe Bloggs Printing Machinery will no doubt want to do it by weight X location whilst Foo Bar CD's will only want to do it by amount X location This is going to do my head in me thinks, but thanks for the input. RG "pittendrigh" <sandy@montana-riverboats.com> wrote in message news:fadd89e6.0308060010.7ce296ed@posting.google.c om... > Why not: > > For each database inventory item include a nullable 'shipping_cost_factor.' > If not set, it defaults to a well known value. > This allows setting a higher than default factor for > large volume or heavy products (300 cubic feet of styrofoam, > and/or five gallons of epoxy resin both cost more to ship than a > tube of tooth paste). > > Then, at calculate-shipping-cost-time, you take the factor, > for each item, and multiply it by a second number, which > comes from a lookup table, indexed by the customers Zip code > (distance from your warehouse), and then multiply that times > a dollars-per-cost factor, to arrive at the final price. > > shipping_cost_factor * zip_distance_from_ware_house * dollars_per_factor > == final_cost. |
|
|||
|
"pittendrigh" <sandy@montana-riverboats.com> wrote in message news:fadd89e6.0308060623.3715f378@posting.google.c om... > "RG" <Me@NotTellingYa.com> wrote in message news:<3f30bfa0$0$46009$65c69314@mercury.nildram.ne t>... > > Thanks for your input, it is appreciated. > > The problem I have is that I need to build this system with mulitiple > > clients in mind, and needless to say, they will all want to calculate it > > differnetly. > > I need to somehow build an admin facility that keeps everyone happy. > > Joe Bloggs Printing Machinery will no doubt want to do it by weight X > > location whilst Foo Bar CD's will only want to do it by amount X location > > > > This is going to do my head in me thinks, but thanks for the input. > > RG > > > > Put as many calculation factors into the process as you need, > for all customers. For those customers that want to ignore > distance from warehouse, set that factor to one. > > Then all you need is a little forms based GUI to set global > calculation factors for each discreet customer (all of which use > the same schema). > > How do you want to load new inventory items? From a delimeted > file? Or from another administrative form? Either way > the loading process would provide a mechanism for initializing > the cost factors (weight, volume, distance, whatever else). > All such factors could be one (ignored) or set to higher value. > Then you could custom tailor the cost calculation on an individual > basis, using the same mechanism for all. > No sweat. Thanks for the input, I think I has sussed it now. Just for the record, I am going to add 2 tables to the database: Country, Zone Zone, Weight, Cost. Then I'm going to add a field to the product table: Weight In regards to the packaging, I think a standard cost will be enough for most carts. Then do the calculation: Get the total weight zone cost and add the packaging cost. How does this sound? Anything I have missed? TIA RG |