[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Porting the MV v3 Sample demo checkout profile to MV v4
****** message to minivend-users from "Alexei Yakimovich" <alex@del.donetsk.ua> ******
Hi,
Is there any easy way to port MV v3 sample checkout_profile to MV v4.
I mean the extended perl checking routing for state and zip_code.
One of them to use GlobalSub, but can I do thet inside the checkout
page? The problem is there are a lot of the fields for checking.
Here is the checkout profile:
[snip]
[set checkout_profile]
name=required
address=required
city=required
country=required
[perl values config]
$state = $Safe{'values'}->{state};
$country = $Safe{'values'}->{country};
$zip = $Safe{'values'}->{zip};
$state_ok = $state =~ /^\s*[A-Za-z][A-Za-z]\s*$/;
$country =~ s/\W//g;
$zip_ok = ($zip =~ /^\s*\d\d\d\d\d(-\d\d\d\d)?\s*$/);
$us = ($country =~ /^(usa?|unitedstates)$/i);
if (! $us) {
return '';
}
$out = <<EOF;
&set = mv_Not_a_state $state_ok
&set = mv_Not_a_zip_code $zip_ok
EOF
return $out;
[/perl]
email=required
phone_day=phone
email=email
&fatal = yes
[if value fax_order]
&set = mv_payment Call Us
[elsif config CreditCardAuto]
&set = mv_payment Credit Card ([default mv_credit_card_type])
[comment]
mv_credit_card_info=required
[/comment]
[/elsif]
[else]
&set = mv_payment Credit Card ([default mv_credit_card_type])
[/else]
[/if]
&final = yes
&set=mv_email [value email]
[/set]
Thanks in advance,
Alexsei
-
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