[ic] Price Field, Matrix options, more info

Peter peter at pajamian.dhs.org
Thu Nov 20 21:24:00 UTC 2008


On 11/20/2008 05:54 AM, tom at readyink.com wrote:
> Thanks, Peter, that is an amazing piece of code.
> 
> $Config->{Options_repository}{Matrix}{map}{price} = 'mypricefield';
> 
> When I added it to the autoload section I got an error with the variant
> table.  So I added the same alternate price column to that table, and the
> pulldown had the correct alternate price!!
> So I was looking at a page with the correct pulldown, and the random box
> with adjusted prices as well, and I added the item to my cart, and it got
> added with the wrong default price :(.  So close,

Ok, well that *is* affected by PriceField since the variants table is 
considered a products table.  You probably should change both.  Try this 
bit of perl to change PriceField dynamically.

$Config->{PriceField} = 'mypricefield';

Alternatively, you can use the Locale directive to specify a different 
PriceField for each locale.  See 
http://www.interchange.rtfm.info/icdocs/config/PriceField.html for more 
info and an example.


Peter




More information about the interchange-users mailing list