MiniVend Akopia Services

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

Pricing Routines to perform Unit Price conversions before used in sub/totaling



******    message to minivend-users from Barry Treahy <treahy@mmaz.com>     ******

Ok...  I've seen posted on the list many times on this list (and in the
documentation) that if we start getting close, the experts that be may
speak.

I am attempting to do on the fly currency conversion to foreign prices
from a US$ based price list.  Creating price lists for each supported
currency is not an option nor dealing with the flucuations on a regular
basis with a 'hard-coded' list will not work.

We've been encouraged to try UserTag's but everything I've attempted
fails to manipulate the item-subtotal or subtotal fields, I can only
presume this will not work because the order of precedence is too late.

I've been pouring through the code with two Perl books open, taking a
crash course, and I came across an undocument reference in Data.pm
regarding pricing which appears to be a configuration option;
ItemPriceRoutine.

>From the little that I have learned about Perl, this routine from
Data.pm:

sub item_price {
        &{$Vend::Cfg->{ItemPriceRoutine}}(@_);
}

is being passed parameters, the item-code and the item-quantity as well
as an optional pricing database.  I've also learned that the & in Perl
is a reference pointer to a procedural routine entry point.  So it would
seem that calls to item_price is just a generic dispatch to a
configurable pricing routine.

Great, but I have been unable to put together, based on looking at
Config.pm, what the default pricing routine is, to use this as a
template to construct a custom one nor do I know how to correctly
reference it in the configuration file...

How about some help now... Please?

Barry

Ps. I'm not the only one that will benefit from this.  I've had e-mails
sent to me directly asking for the very same thing if I can get it
going...

-
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: