[ic] item-accessories tag
Webmaster - ICG.Onlink
interchange-users@icdevgroup.org
Tue Jun 10 16:24:01 2003
Hi folk,
I searched the list archives but I didn't find a way to solve this
problem. If somebody can help me I will be very grateful.
I have two databases:
products - for the master products with columns: *sku, title, cat, img,...
subprod - for version products like, size, color, material, etc with
four columns: *code, *sku, description, price
(*) are indexes and sku is foreign key in products
I have been used options table before, but the queries become very slow,
near 2 minutes to show the results page and IC was using 98% of CPU. They
are 5k products with IC 4.8.6 in Linux RH 7.2.
When the user chooses the master product in products table, I need to show
in the flypage.html, the master data with all the subproducts for that
sku, basically two columns of the table subprod: description and price.
The user then should select in a combo box one of the available
subproducts (there are about 5/30 registers in subprod for each sku of the
master product).
I see everything except the combo box to select and send it to basket. The
price will be used to make the payment. I'm using this piece of code:
----------
[item-accessories code=sku
attribute=description
type=select
column=description
table=subprod
name=mv_order_description ]
----------
I tried several variations, but I can't get the widget to work. But I can
get all the correspondent subproducts listed in the flypage using a loop
search:
----------
[if file products/subprod.txt]
[loop search="
fi=subprod.txt
st=text
sf=sku
se=[item-code]
op=eq
tf=description
co=yes
rf=code,sku,description,price
"][on-match]
<tr>
<td style="contentbar1" colspan=2><img src="bg.gif" alt=""
height=3>
</tr>
[/on-match]
[list]<tr>
<td style="contentbar1">
<B>[loop-param description]:</b>
</td>
<td>
[loop-param price]
</td>
</tr>
[/list]
[on-match]
<tr>
<td style="contentbar1" colspan=2><img src="bg.gif" alt=""
height=3>
</tr>
[/on-match]
[/loop]
[/if]
--------
These last code works well but I need the combo box to select the option
Has anyone a suggestion of how to solve this problem?
Thanks a lot...
Erick Eas
==============================================================
ICG.Onlink www.onlink.com.br
webmaster@onlink.com.br ICQ 427.166