[ic] multi-tiered item db?
Mike Heins
mikeh@minivend.com
Thu, 24 Aug 2000 10:01:20 -0400
Quoting Doug Alcorn (doug@lathi.net):
> I am setting up a site that has a somewhat complex item catalog
> (although I think it is fairly common). Basically, the item
> categories have three tiers and the lowest level is common for all
> combinations of the upper two tears. Specifically, we sell
> accessories for other products. So product X from manufacturer Y will
> have an accessory of type Z. In addition product A from manufacturer
> will have an accessory of type Z. These two accessories are
> individual products and not compatible with the products from other
> manufacturers.
>
> So, what I really want to do is query the customer for what
> manufacturer and product they have and then limit their shopping to
> products that are compatible with that product. I have already
> written the JavaScript to dynamically update a drop down list of
> products based on the selection in a drop down list of manufacturers.
> I need to have the html <body> tag call onload="initialize()".
>
> I figure if I add a table for manufacturers and another table for
> products where the products have a unique id then I just need some
> place on the item table to list which product it is compatible with.
Interchange allows you to add fields at any time; there should be
no side effects. You can structure it however you want....
>
> Would all of this require the modification of the interchange perl
> modules themselves, or can it be done within my catalog? It seems
> like the admin UI would have to change to support these new fields on
> the new item page. I would appreciate you experiences with similar
> type catalogs. BTW, I grok perl/SQL fairly well.
No, the UI is flexible in that regard. You can set the Knar value
UI_ITEM_FIELDS to determine the fields to display in the item editor.
(UI_ITEM_BREAK determines where the lines between sections go, setting
the ui_break_before variable).
In addition, you can make flex_editor calls such as found in
lib/UI/pages/admin/customer_view.html:
<A HREF="[area
href=admin/flex_editor
form=|
item_id=[loop-data userdb username]
mv_data_table=userdb
page_title=Customer: [loop-data userdb fname] [loop-data userdb lname]
ui_data_fields=username company fname lname address1 address2 city state zip country email phone_day phone_night
ui_hide_key=1
ui_return_to=admin/customer_view
ui_return_to=mv_arg=[cgi customer]
|
]"><u>[loop-data userdb fname] [loop-data userdb lname]</u></A>
This URL calls the database editor with the named fields in ui_data_fields.
At any time, you can copy pages from lib/UI/pages/admin into the pages/admin
in your own directory to make custom versions that override the distribution
ones. You only need copy the page you want to override; the rest are automatically
picked up from lib/UI/pages.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>
Clothes make the man. Naked people have little or no influence on
society. -- Mark Twain