[ic] accessories tag: price_data parameter not working for me

John1 list_subscriber at yahoo.co.uk
Wed Jun 16 17:41:13 EDT 2004

I have written a very simple bespoke options module, extraoption.pm (by
cribbing from simple.pm and matrix.pm).

The option module doesn't need to retrieve any info from a database table -
everything is hardcoded.

i.e.  If the option type "extraoption" is enabled for a particular product
then I want the customer to be able to choose "Yes" or "No" from a select
box.  If "Yes" is select then an additional £9.99 is to be added to the

I don't want to set up this +£9.99 price data in a database table - instead
I just want to hard-code it by passing the parameter price_data to my call
to tag_accessories from within extraoption.pm

To clarify...

Extract from extraoption.pm:

$out .= Vend::Interpolate::tag_accessories(
        attribute => 'extraoption',
        default => undef,
        extra => $opt->{extra},
        item => $item,
        js => $opt->{js},
        name => $ishash ? undef : "mv_order_extraoption",
        price => 1,
        price_data => 'No=0,Yes=9.99',
        passed => 'No,Yes',
        type => $opt->{type} || 'select',
       $item || undef,

Extract from catalog.cfg:

UseModifier extaoption
CommonAdjust    :sale_price, ;:price, ;products:sale_price:mv_sku,
;products:price:mv_sku, ;$, ==:options
Options extraoption  table  options

The option module appears to work fine, and the customer can choose "Yes/No"
from a select box.  The problem is that I can't get £9.99 to be added to the

i.e.  [item-price] in the cart component is still just returning the base
product price, without the additional £9.99.

What am I missing?  Maybe I need to change my CommonAdjust?  I am really
stuck on this so any help would be greatly appreciated!



More information about the interchange-users mailing list