[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: More Complex (i.e. real world) Shipping Calculations
On Wed, 23 Jun 1999, Ryan Hertz wrote:
> ****** message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com> ******
>
> Christopher, have you gotten anywhere on this subject?
>
>
> At 03:09 PM 6/17/99 , Thompson-Jordan wrote:
> >****** message to minivend-users from "Thompson-Jordan"
> <Thompson-Jordan@mindspring.com> ******
> >
> >I need shipping calculations that:
> >
> >- Divides the order into boxes and does individual UPS shipping
> >calculations for each box, as this is how UPS charges.
I have code that does this, but for DHL. I calculate the number of boxes
based on the number of items. I was able to simplify things a little
because all our items are basically the same size and weight (that won't
last). I had to create my own UserTag/GlobalSub to do it and have it
called from shipping.asc.
> >- Be able to associate a "ship from" ZIP code with items and do a UPS
> >lookup based on where the box is shipped from.
Hmm, haven't done this. This should not be that hard. Add a field to the
products database that states what warehouse/fulfillment house this is
coming from:
code .... price color warehouse_zip
...
1-35456-J ... 98105
In the GlobalSub for shipping, grab this data for each item, or place it
on the line for the shipping type:
shipping.asc:
ups UPSGround weight ... s my_ups weight, warehouse_zip ...
That way, it will get placed into the hash that is passed to my_ups().
In my_ups, use the zip associated with the item to figure out the UPS
cost.
This is problem something a fairly experienced coder should attack.
> >I think these must be fairly common shipping needs, because not all
> >shipping is "one box from my location." I don't believe that Minivend can
> >do this currently, if I am wrong please let me know.
> >
> >My initial thought was to do this manually. I would add "shippedfrom" and
> >"boxsize" fields to the Products database. The "shippedfrom" field would
> >contain the UPS table from which to lookup the shipping. The "boxsize"
> >field that would contain the percentage of a box the item needs (e.g. 0.5
> >for half, 0.25 for a quarter). If these fields were empty or not present
> >it would assume one box from the default location.
D'oh. I should read all the message before I write :-)
> >On the Checkout page, as I looped through [item-list], I would
> >
> >1. Divide items into lists using the "shippedfrom" field,
> >2. Further divide these lists into boxes by adding up the "boxsizes"
> >3. Calculate the weight for each box
> >3. Do an individual shipping calculation for each box based on its "from"
> >and "to" ZIP codes
> >4. Sum the cost to ship each box into the shipping total.
> >
> >Questions:
> >
> >- Can Minivend do this within its current shipping model?
I think only through GlobalSubs, but what you mentioned might work.
Shipping is one of the "magic" tags. I.e. when you have [shipping] in
your page code it calls through the shipping.asc file looking for possible
matches. Since I am by nature a coder, I tend to think of doing this in
code.
> >- Has anyone implemented this, and if so, would you make the code
> >available?
I could spit out some code that I used for DHL. I would want to clean it
up and comment it a bit first. I have some fairly hairy deadlines, so I
can't really do this now, but if someone pings me in a week or two...
> >- If this hasn't been done, and others are interested in it as well, could
> >a group of us come up with some UserTags to do these type of shipping
> >calculations and make them available to all?
> >
> >If this hasn't been done I will probably plow ahead and would appreciate
> >help from any Perl monkeys in the crowd.
I definitely wouldn't call myself a Perl monkey but I have been coding for
about twenty years :-) Perl is ... interesting. To my horror I find that
I am starting to like it :-)
Best,
Kyle