[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: shipping.asc - criterion with multiple values
Quoting Gaelyne Gasson (gaelyne@videocam.net.au):
> G'day,
>
> In a message I found in the archives, Mike wrote that the "criteria"
> field in the shipping file can hold more than just a field name, and
> the docs show that you can use more than one type of criteria - for
> example the sample in the docs uses:
>
> upsg UPS Ground weight [value state] 0 0 e No items selected
> upsg UPS Ground AK HI 0 150 u Ground [value zip] 12.00
> upsg UPS Ground 0 150 u Ground [value zip] 3.00
>
>
> I have weight and subtotal as two that need to work together but I
> need for the subtotal to be able to use a min/max range as well as the
> weight.
>
> The logic of it is:
>
> If the weight is between 1 and 500, and the subtotal is from 100 to
> 199, the formula to use is 15.00 + 1.00.
>
> At present, I have need for three of these sets for the subtotal
> (100-199, 200-299, 300-399). I have far more weights to cope with in
> the shipping.asc file than subtotal variations.
You can't use two *values*, except...this might be a good illustration
of chained shipping modes which exists but has never been documented.
by_weight Shipping weight 1 10 m "[set base]10[/set]" >>by_sub
by_weight Shipping placeh 10 20 m "[set base]20[/set]" >>by_sub
by_weight Shipping placeh 20 9999 m "[set base]30[/set]" >>by_sub
by_sub Shipping [subtotal noformat=1] 1 100 f [scratch base]
by_sub Shipping placeholder_it_is 100 1000 f [scratch base] - 5
by_sub Shipping placeholder_it_is 1000 10000 f [scratch base] - 10
(placeholder is just an illustration that criteria doesn't matter here.)
When the chained shipping mode >>by_sub is returned, the base cost is
adjusted based on subtotal, with larger orders getting reduced shipping
cost.
--
Regards,
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
"The U.S. Senate -- white 131 Willow Lane, Floor 2 | || _ \
male millionaires working Oxford, OH 45056 | || |_) |
for YOU!" -- Dave Barry <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\