Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] 4.03 How to add user defined format check routines?



******    message to minivend-users from "Ton Verhagen" <ton@verhagen.net>     ******

Hi all,

I am wondering how I could add additional format check routines
to the ones already defined in Order.pm.

I'd like to implement  some extra routines (eg. isbn) in the same
way as the phone, state, province, and email check routines are
implemented, so I would be able to use them in an order profile
like:

__NAME__      my_order_profile
my_field=isbn
my_email=email
&fatal=yes
__END__

Of course I could simply add my routines to the source code of
Order.pm but that's not what I am looking for, as this is not a
desirable solution (for me that is).

I've tried to define my routines in the order_profile definitions
but that won't do the trick.
Like:
[perl]
sub _isbn {
    <code>
}
[/perl]

Also tried to define a Sub in minivend.cfg without success.
No matter what I tried I always got the same result: 'No format
check routine defined for 'isbn'. This simply means MV couldn't
find the _isbn
tine.:-( 


There should be a pragma &format according to the code of Order.pm, but I couldn't figure that one. Do I need &format to define additional format check routines?

I am pretty sure that the great MV has an elegant  way of adding user defined format checking routines, the only thing left is to know how to do it.

Has anyone done this before, or does anyone know how to go about?

Many thanks in advance for your kind cooperation.

All the best,

Ton.







-
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


Search for: Match: Format: Sort by: