[ic] Wildchar for accessories display

Michael Mangeng interchange-users@interchange.redhat.com
Thu Aug 30 06:24:00 2001


Hi

A little question...
i`ve written a little script which adds all products from a textfile with
all needed information (including accessories) to the database. because of
the fact that i want this complete dynamically and as simple as possible, i
add the accessories/modifier as in the example below: (i do not group
accessories together) therefore:

product has 2 modifier ->
    check if modifier are existing
        yes -> insert modfifiername to modifiername(column) in products
table and
                    insert modifiervalue to modifiername(column) in pricing
table
        no -> alter table products add column (modifiertable)
(hehe.. sql is nice)
                    alter table pricing add column (modifiertable)
                    insert modfifiername to modifiername(column) in products
table
                    insert modifiervalue to modifiername(column) in pricing
table

because of the fact that the needed database for this product is rather
small, i say that the content manager has to simply change the textfile and
update all products each time. (this needs about 2 seconds on a p 233...)..
i generate too the UseModifier Line and the CommonAdjust line and echo them
into a file.. catalogroot/usemodif  (filename) and include this file at the
bottom of catalog.cfg

ok... i know.. interchange needs to be restarted... the rest here is all
added dynamically... the problem comes now with the display of the
accessories in flypage.html
Is there a way to add all accessories which are mentioned at the product
line and at the "UseModifier" variable ?

for example...
i mean... if the following line would work... it would solve my problem:
[item-accessories [item-code] *]

the code i have to insert should simply search all availible modifier for a
product and display the required checkboxes on the flypage.

I think i could make a workaround with [perl].. but this needs time which i
only plan to take if there is no other possibility...

thanx,
mike