[ic] setting item price by radio selection

Jim Toro interchange-users@icdevgroup.org
Tue Aug 13 22:23:01 2002


I have a customer with a big database which has several fields like
pricedesc1, price1, pricedesc2, price2, pricedesc3, price3  which are
descriptions of the SKU depending on the size you select. So for sku
001 there are three possible variants (3 pricedescs and 3 prices).
There is no true "price" field, rather 3 price fields for each item.

What I want to do is to get the price of the item from either of the three
once they select it with a radio button.

I got all the html/IC stuff done so it displays the fields, sets up the
radio buttons and shows the descs and prices but once they click a radio
button and hit the BUY button I cant figure out how to set the items price
from the value stored by the radio click.

Here is the snippet of the radio selections of the items possible
size/type choices:

[if-item-field pricetext1]
<tr>
<td>
&nbsp;&nbsp;&nbsp;
</td>
<td noWrap><font face="arial, helvetica" color="#7b3e3e"
size="2">[item-field pricetext1]</td>
<td>
<input type="radio" CHECKED value="[item-field price1]"
name="selectprice">[item-field price1]
</td>
</tr>
[/if-item-field]

[if-item-field pricetext2]
<tr>
<td>
&nbsp;&nbsp;&nbsp;
</td>
<td noWrap><font face="arial, helvetica" color="#7b3e3e"
size="2">[item-field pricetext2] </td>
<td>
<input type="radio" value="[item-field price2]"
name="selectprice">[item-field price2]
</td>
</tr>
[/if-item-field]

[if-item-field pricetext3]
<tr>
<td>
&nbsp;&nbsp;&nbsp;
</td>
<td noWrap><font face="arial, helvetica" color="#7b3e3e"
size="2">[item-field pricetext3]
</td>
<td>
<input type="radio" value="[item-field price3]"
name="selectprice">[item-field price3]</font></td>
</tr>
[/if-item-field]

The buy stuff is on the screen and when they click it does take them
to the cart page with everything set but the price.

How do I get the "selectprice" to end up as the item price in the shopping
cart?.

I fiddled with commonadjust but I dont think it works with this sort of
price manipulation.

Any ideas?.