MiniVend Akopia Services

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

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



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

>>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.
>>
>
>Barry,
>
>        My word, you're way over my head!

Duh.  I'm not too proud to admit that, that is why I've asked for help!  I can accomplish what I want by hacking
the Data.pm file, but that limits what I need to do to a single catalog per source and I'd like to run more than
one catalog with different pricing from the same source.

>I'm confused because lib/Vend/Config.pm
>declares itself (package) as Vend::Config not Vend:Cfg.  Have you stumbled
>onto something that is deprecated?

I don't think so, look at Data.pm and the snippet of the item_pricing routine I included in the post!  As for
Vend::Cfg, these are defined and used throught the system, but yes, ItemPriceRoutine doesn't appear to be
defined and that was one of my questions, what internal routine does item_pricing call then?  and how do you
redefine ItemPriceRoutine on a catalog basis?

>I can't even find ItemPriceRoutine in
>Config.pm.
>

Christopher Miller's message this morning made reference to a subroutine call from CommonAdjust.  Chris, can you
post a sample of your ClientPricing code?  This may be a method that is more flexible than my hardcode hack...

Thanks...

Barry

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