[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[ic] checking 2 email addresses with mv_order_profile
IC 4.6.1, Debian 2.2.17, Perl 5.005-03
Hi all (and Happy Boxing Day),
Slightly perplexed here trying to get an mv_order_profile to work.
I've read through the dox and scoured extensively through the mailist
but cannot find any real help there.
I've added a routine to allow users to eMail a friend about a product
(along the same lines as the stock-alert) but what I am trying to
achieve is to get the profile to check TWO EMAIL addresses...
Checking one is easy, but the second is ignored if used in the
standard way ie:
[snip etc/order.profile]
__NAME__ email_friend
your_name=required
your_email=required
friend_name=required
friend_email=required
&fatal = yes
your_email=email
friend_email=email
__END__
[/snip]
Will not work, the second email check is ignored... not surprisingly either :)
However a construct like:
[snip etc/order.profile]
__NAME__ email_friend
your_name=required
your_email=required
friend_name=required
friend_email=required
&fatal = yes
[if type=value term=friend_email op="!~"
compare="/\w+@[-A-Za-z0-9.]+\.[A-Za-z]+/"]
friend_email=required not an email address
[/if]
your_email=email
__END__
[/snip]
(THE ABOVE MAY BE WORD WRAPPED!.. sorry)
I thought "should work" as a bit of a cludge, it however does not...
it will ensure that something is there but will not do the compare
(ie a bad address structure is not stopped).
Also, setting:
friend_email=required not an email address
to:
friend_email=email not an email address
Will work, but then negates "your_email=email"... aaagghhhh
I believe I do not quite understand the structure of how the checks
are done, is that obvious or what? :)
Am I "as always" missing something really obvious here, I've moved
the structure around as in placing "&fatal = yes" at the top, in the
middle, at the bottom and placing my compare before "&fatal = yes"
and after... but all to no avail.
The other fields work as planned, can anyone help to shed some light on this?
With regards,
Dave
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users