[ic] please fix this !

cfm@maine.com cfm@maine.com
Mon, 12 Feb 2001 09:22:24 -0500

On Mon, Feb 12, 2001 at 10:31:34AM +0000, Murray Gibbins wrote:
> Every time I upgrade interchange/minivend I have to hack about inside the code
> making patches because of some silly inbuilt limitations. 

We do it this way:

CommonAdjust    products:price, &{MV::scrubs::pricing;}, specials:price

That is for a single catalog, but the concept scales.  It does, however,
require one patch in Data.pm to bypass the Safe.

# cfm this allows unsafe routines in commonadjust
#                               $price = Vend::Interpolate::tag_calc($mod); # dist
                                $price = MV::MS::unsafe_tag_calc($mod);
# /cfm

I'd guess you could use a [usertag] to bypass Safe; I can't remember if they
work in CommonAdjust.  At least that way you could dump all your 
customizations into an outboard perl module.  Then you would have 
option of including that at run time or use'ing it - depending 
on how often it changes and your development/prototyping environment.
Make it your own pm and it will not get tromped on when you upgrade.  
Mike will correct me if I am wrong - what I think that amounts to is 
replacing your many precompiled CommonAdjust routines with a precompiled 
routine that calls subroutines.  In general we've not found internal pricing
routines to be a bottleneck; we **have** found outboard pricing routines
(the daemon) to be problematic because minivend looks up items so often.

We used to patch Vend/Minivend but struggle now to avoid it.  Over the last
year we've reduced patch count to less than half a dozen spots.  Rather than
patch, we build our own module.  No doubt to the unbiased eye they are just
ugly children, but to us they are beautiful and orderly.  :-)  And as
any children will do, they go way over the bounds and talk directly to
minivend internal routines.

> Please,please,please can something be done about the limits on CommonAdjust
> string/atoms.
> To illustrate here is my common adjust string ( with the shop names replaced).
> CommonAdjust	shop1:price:, shop2:price:, shop3:price:, shop4:price:,
> shop5:price:, shop6:price:, shop7:price:, shop8:price:, shop9:price:,
> shop10:price:, shop11:price:, shop12:price:, shop13:price:, 
> ==material:shop12_pricing::, ==size:shop12_pricing::, 
> ==trewbottom:shop11_pricing::, ==pcwaist:shop11_pricing::,


> "13. ``Perfection (in design) is achieved not when there is nothing more to add,
> but rather when there is nothing more to take away.''"
> God I would sooooo like to rewrite the chain_cost subroutine, please :-)

Why not?  You have a specific need and can probably do it more cleanly for
your setup than the stock version.  You just have to find the best place
to hook.



Christopher F. Miller, Publisher                             cfm@maine.com
MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
1.207.657.5078                                       http://www.maine.com/
Content management, electronic commerce, internet integration, Debian linux