On Thursday, December 4, 2003, at 11:42 PM, Jon Bennett wrote:

I'm currently working on my first e-commerce site and would like to offer my client the option of adding, maybe 3, related products for each product using the CMS I'm developing. I guess this would be much like Amazon et all.

I don't think getting the info into the db will be a problem, what I see as a problem is how an admin will select 3 out of 200+ products. Obviously a drop down is a bad idea, but so would a alphabetical list. has anyone got any insight into the best way to solve this.

Why is a drop-down a bad idea? My only concerns would be


a) bloated code (200 options at 20 chars each = 4000 chars (4k?)
b) a long list to scroll through for the user
c) combo boxes wouldn't allow the user to choose the order of the three related products -- you'd need 3 drop-down menu's for that :)


Perhaps it could be a series of drop-downs (CDs|Books|Videos or A-K|L-Z etc)


The other solutions I have depend on your target market -- for a CMS in a controlled environment and limited user group, you might be able to get away with the following ideas:


1. Using CSS2's overflow property to create a little scrollable area. Again, these could be broken into categories to make it easier for the user.

<div style='height:50px; overflow:auto'>
<input type='checkbox' name='foo' value='1' />A product<br />
<input type='checkbox' name='foo' value='1' />A product<br />
<input type='checkbox' name='foo' value='1' />A product<br />
<input type='checkbox' name='foo' value='1' />A product<br />
...
<input type='checkbox' name='foo' value='1' />A product<br />
</div>

2. Javascript pop-up -- you could take this part of the process out of the main window, and into a JS pop-up window which let's the user dig through categories, do searches, WHATEVER to find each product. Then some JS code on the pop-up could talk back to the main window and 'fill in' 3 text-fields / hidden fields with the related product ID's / descriptions / etc.

You'd need to know a fair bit about JS, or get some serious help here, but IT CAN BE DONE.


Justin French


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to