Smartadmin.cgi category when editing products individually : LUSENET : S-Mart Shopping Cart : One Thread

When I pull up a product to edit with smartadmin, all the info is filled in each respective field, but the category is not marked, and I have to re-mark it (them) each time or the product is "lost" and does not show up anywhere. Has anyone written a patch to solve this problem? Some products have multiple categories, and it is difficult to remember quickly all that apply with over 250 products in the database now.

Any help is much appreciated, and please forgive me if this is a stupid question. :-)

-- Todd Miller (, July 22, 1998


Well, I figured it out myself. The following code will fill in the category when an item is selected to edit in smartadmin.cgi: my(%ITEM); ($ITEM{'itemid'}, $ITEM{'name'}, $ITEM{'price'}, $ITEM{'descrip'}, $ITEM{'image'}, $ITEM{'weight'}, $ITEM{'itemurl'}, $ITEM{'group'}) = split(/\|/,$LINES[$i]); if ($group eq $ITEM{'group'}) { print " $groups{$group}
\n"; } else { print " $groups{$group}
\n"; } Insert the lines above in place of line 228 ( print " $groups{$group}
\n"; ) Remember to fix the fields if you have inserted or removed other fields. Todd Atrios Systems Research

-- Todd Miller (, August 12, 1998.

Moderation questions? read the FAQ