[ic] Trying to customize item options display
Mike Barber
mike.barber at educara.com
Fri Jun 25 14:24:35 EDT 2004
For testing, I am using the Tools data that comes with IC5. When one
views an item that has different options -- let's say Putty Knives :
Spackling Knife (sku os28011) -- there are a number of options to chose
from )handle and blade material in this case).
This item is set to display options using the "Simple" formate, which is
what we want. Thus we have two selection boxes: one for the handle and
one for the blade material. Perfect. The problem is in how they
appear. If there is no price differential, all that is displayed is the
option label. If there is a price differential it is given after the
option label, but only telling you what to add or subtract. For example:
Wood handle
Ebony handle (add $20.00)
and
Plastic blade (subtract $1.22)
Steel blade
Titanium blade (add $100.00)
The base price for this item is $14.99. What I would love is if we
could have it appear like this:
Wood handle - $14.99
Ebony handle - $34.99
and
Plastic blade - $13.77
Steel blade - $14.99
Titanium blade - $114.99
In fact I know how to achieve this feat. However, problems arise
afterward. What I did was edit line 76 of the /Vend/Options/Simple.pm
module from:
option_template => '{LABEL}
{PRICE?}({NEGATIVE?}subtract{/NEGATIVE?}{NEGATIVE:}add{/NEGATIVE:}
{ABSOLUTE}) {/PRICE?}'
to:
option_template => '{LABEL} {PRICE:} [item-price]{/PRICE:} {PRICE?}
$[calc][item-field price noformat=1]+{PRICE_NOFORMAT}[/calc]{/PRICE?}'
Things work fine on the flypage. However, after selecting an option
(let's say just the Ebony handle, adding $20.00 to the $14.99 base
price... which is displayed at $34.99) and adding the item to our cart
we are whisked away to the order.html page to view our cart. Here we
would expect the options widget to be the same as on the flypage, but it
is not. What we see is that the value of the differential (in this case
$20.00) has been added to all the prices in the option widget (for that
particular item).
I have been searching documentation and mail-list archives, but to no
avail. If I do not find a solution soon, my master will surely thrash
me within inches of my life. I am too new to Interchange, I cannot do
it alone. Would anyone have any insight as to what I can do?
More information about the interchange-users
mailing list