[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Shipping Lookup
****** message to minivend-users from cfm@maine.com ******
On Wed, Nov 22, 2000 at 07:25:14AM -0500, Victor Nolton wrote:
> ****** message to minivend-users from Victor Nolton <ven@pragakhan.com> ******
>
> Been looking through the archives for help on this one.
>
> I have setup a page about shipping charges the company charges.
>
> I have setup the page to look and see if there are items in the cart
> if there is, it prints more info. In the info I'd like it to take the
> subtotal and run it through the shipping routine.
>
> For instance I'd like it to show the current cost of shipping for
> USPS First Class, USPS Priority Mail, USPS Express Mail.
>
> Is there a way to do this with Minivend 4 or even Minivend 3?
>
Interesting, I've not done that.
You could use that same trick you have for the subtotal, save the
shipping mode, set it to each of those and display it in order, then
reset it.
It would be a lot easier to do it in perl calling this
from Interpolate.pm to iterate the options:
sub tag_shipping {
my($mode, $opt) = @_;
$opt = { noformat => 1, convert => 1 } unless $opt;
$Ship_its = 0;
if(! $mode) {
$mode = $opt->{handling}
? ($::Values->{mv_handling})
Schematically something like
{
my(@OUT);
for ('USPS First Class','USPS Priority Mail','USPS Express Mail') { # use abbrv names
push @OUT,&Interpolate::tag_shipping($_);
}
return "@OUT";
}
Doesn't even look like you need to reset anything; mode overrides
what is set.
--
Christopher F. Miller, Publisher cfm@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
1.207.657.5078 http://www.maine.com/
Database publishing, e-commerce, office/internet integration, Debian linux.
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list