[ic] Setting PriceField on the fly

Stefan Hornburg racke at linuxia.de
Tue Mar 13 09:10:11 EST 2007

Grant wrote:
> Hello, I'm trying to set PriceField on a page like this:
> [perl no_return="1"]
>     $Config->{PriceField} = 'other_price';
> [/perl]
> but it doesn't seem to be working.  I'm using this technique to set
> VendURL and SecureURL on the fly and it works perfectly.  I do have
> the field "other_price" in my products table.  How can I get this to
> work?

You might also need to adjust CommonAdjust.

I have the following code in one of my projects:

	if($record->{price_level} =~ /([b-n])/) {
		$Scratch->{price_level} = $1;
		$Config->{PriceField} = "price_$1";
	} else {
		$Scratch->{price_level} = 'a';
		$Config->{PriceField} = 'price';
	$Config->{CommonAdjust} = "products:$Config->{PriceField}, 
[calc-price], ; ==options:pricing:options";
	$Config->{PriceField} = 'noprice';


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list