Shipping using multiship + weightgreenspun.com : LUSENET : S-Mart Shopping Cart : One Thread |
Using v1.9.2I would like to use a combination of multishipping and weight shipping in my webstore.
The multishipping should read from the shipping.db where the fields [0][1][2] will be defined as: 1000|NZ Economy Mail - Zone NZ|1| 1001|NZ Airmail - Zone NZ|2| 1002|France Economy Mail - Zone 5|5| 1003|France Airmail - Zone 5|6|
where field [2] is defined as a zone number option and not a dollar value. This has to be set in the shipping.db for each country of the world.
In the smart.cgi the shipping weight option needs to read: if (shipping eq '3') { %shipping1 = ('1.00','13.00','.8','11.00','.6','9.00','.4','7.00') %shipping2 = (.....similar to above) %shipping3 = etc etc %shipping4 = etc etc %shipping5 = etc etc %shipping6 = etc etc } and so on for all the available options(10) as defined in the S-Mart.cgi shipping routine as defined by" elsif ($shipping eq '3') {...etc etc}
When the shipping zone number is set and re-calculated in the sub list_items routine, whatever zone number is defined from the shipping.db has to use the relevant %shipping1 or %shipping2 etc weight values to calculate the postage/shipping total on weight.
This may involve re-writting the routines set in S-Mart.cgi
If anyone ( or Barry) can assist or if you want to assist and cannot understand what I have written above, please email me at wkolln@cia.com.au
Thanks in advance
-- William Kolln (wkolln@cia.com.au), March 12, 1998
Hi Barry For your interest I have figured out how to work the weights on each zone for each country.in the sub_list_items at 'if ($usership eq $ship[0]) {print "selected "; $totalprice+=$ships[2];} i replaced $totalprice etc with $zone = $ships[2]
then down in 'elsif ($shipping eq '3') { etc.... i created another if/elsif condition stating: if ($zone eq '0') { my($low,@weights,$weight); @weights = sort number keys %shipping; etc. etc..... elsif ($zone eq '1') { my($low,@weights,$weight); @weights = sort number keys %shipping1; etc. etc.
The shipping table is defined as 1000|NZ - Air Z1|1| 1002|NZ - Econ Z1|2|
Each option selected from the postage options defines the zone and uses the appropriate %shipping = (...) table in smart.cgi .
When I have it all sorted out properly and fully notated I will send you a copy of the all the scripts for you to look over...perhaps this is another method you might like to incorporate into your shipping methods in the next version.
-- William Kolln (wkolln@cia.com.au), March 15, 1998.