Re: [PHP] related products, how to's best practices

2003-12-04 Thread Richard Davey
Hello Jon,

Thursday, December 4, 2003, 12:42:28 PM, you wrote:

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

When they add the products in the first place, couldn't they put them
into groups? You could then code something to select 3 random products
out of the same group, they would, by their grouped nature, be
related and no-one has to admin anything.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
Hi,

Why should I not use drop downs ?? are they generally out of favour now 
?? why ???

I ask because I was thinking of having each categories products listed 
in a drop down !

Thanks,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media designer / developer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 4 Dec 2003, at 13:05, Richard Davey wrote:

Hello Jon,

Thursday, December 4, 2003, 12:59:17 PM, you wrote:

JB They are in groups (type, category) but the problem is the way 
their
JB products relate doesn't correspond to their type (book, video etc) 
or
JB their category (like Classic Books, Rewarding Social Skills etc) 
and
JB some products appear in more than one category as well.

Not much choice then - you have to present them an interface to all of
the products for them to select from. Alphabetical sorting perhaps,
with a small search field so they can search on product title perhaps,
or filter out specific categories.
You can't have them in a drop-down (well, technically you could, but
this isn't a PHP issue anymore, it's a user-interface one).
--
Best regards,
 Richardmailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
They are in groups (type, category) but the problem is the way their 
products relate doesn't correspond to their type (book, video etc) or 
their category (like Classic Books, Rewarding Social Skills etc) and 
some products appear in more than one category as well.

Any other ideas ??

Thanks,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media designer / developer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 4 Dec 2003, at 12:46, Richard Davey wrote:

Hello Jon,

Thursday, December 4, 2003, 12:42:28 PM, you wrote:

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

When they add the products in the first place, couldn't they put them
into groups? You could then code something to select 3 random products
out of the same group, they would, by their grouped nature, be
related and no-one has to admin anything.
--
Best regards,
 Richardmailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] related products, how to's best practices

2003-12-04 Thread Justin French
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 productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
...
input type='checkbox' name='foo' value='1' /A productbr /
/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


Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
Would I be right in thinking that php alone can't change the content of 
a dropdown once the browser has loaded the file without a page refresh 
??? In which case I need to source out some javascript, anyone got 
anything that might help me (code, tute, urls etc) as I'm not having 
much luck with google ??

Thanks,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media designer / developer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 4 Dec 2003, at 14:57, Jon Bennett wrote:

How about a dropdown for each category (max 25 products per cat I'd 
think) with either a series of radio buttons or another dropdown to 
determine the order of preference (1,2 or3), how would something like 
that stand up to the user interface and usuability bods ??

Dang, that wouldn't work, because it would only give you the option to 
add one product from each category, bugger! Could only do the above if 
I repeated all the dropdowns for each cat 3 times!

How easy is it to change the content of a dropdown without page 
refreshes ??? I could then have a dropdown for categories and a 
dynamic dropdown for the products in that category, that would be much 
easier to repeat.

Thanks,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media designer / developer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 4 Dec 2003, at 14:02, Justin French wrote:

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 productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
...
input type='checkbox' name='foo' value='1' /A productbr /
/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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] related products, how to's best practices

2003-12-04 Thread Matt Matijevich
** Low Priority **

snip

 Jon Bennett [EMAIL PROTECTED] 12/4/2003 9:43:53 AM 
Would I be right in thinking that php alone can't change the content of

a dropdown once the browser has loaded the file without a page refresh

??? In which case I need to source out some javascript, anyone got 
anything that might help me (code, tute, urls etc) as I'm not having 
much luck with google ??
/snip


Try the hidden iframe method.  I have used it in a couple projects and
it works great
http://developer.apple.com/internet/javascript/iframe.html 

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



Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
How about a dropdown for each category (max 25 products per cat I'd 
think) with either a series of radio buttons or another dropdown to 
determine the order of preference (1,2 or3), how would something like 
that stand up to the user interface and usuability bods ??

Dang, that wouldn't work, because it would only give you the option to 
add one product from each category, bugger! Could only do the above if 
I repeated all the dropdowns for each cat 3 times!

How easy is it to change the content of a dropdown without page 
refreshes ??? I could then have a dropdown for categories and a dynamic 
dropdown for the products in that category, that would be much easier 
to repeat.

Thanks,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media designer / developer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 4 Dec 2003, at 14:02, Justin French wrote:

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 productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
input type='checkbox' name='foo' value='1' /A productbr /
...
input type='checkbox' name='foo' value='1' /A productbr /
/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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] related products, how to's best practices

2003-12-04 Thread Ajai Khattri
On Thu, Dec 04, 2003 at 03:43:53PM +, Jon Bennett wrote:

 Would I be right in thinking that php alone can't change the content of
 a dropdown once the browser has loaded the file without a page refresh
 ??? In which case I need to source out some javascript, anyone got
 anything that might help me (code, tute, urls etc) as I'm not having
 much luck with google ??

I have done this in JavaScript - but I dont have any code handy.

Basically you will need to pre-generate a series of JavaScript arrays for each
category of product at the top of the web page. Then you have a JavaScript
event handler in the category pulldown that changes the product pulldown to a
different array whenever the category changes (use something like onClick or
onChange or a similar relevant event).

Works pretty well - I once worked on a project which pulled data from Access
via ODBC (I was coding in ASP - bleh! Never again... ;-) and generated the web
page with the arrays and JavaScript functions at the top to handle the
switching of the pulldowns.

-- 
Aj.
Sys. Admin / Developer

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



RE: [PHP] related products, how to's best practices

2003-12-04 Thread Chris W. Parker
Justin French mailto:[EMAIL PROTECTED]
on Thursday, December 04, 2003 6:03 AM said:

 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.

I like this idea best. Except let me suggest a few changes.

Let's say you have a section of page like this (this is the part on the
product page where the customer chooses the related products).

+++--+
| ID | Product ID | Category | aAdd Item/a
+++--+

When the user clicks the Add Item link a popup will appear. This popup
will allow the user (like Justin describes) to find their product using
any number of methods (searching, scrolling through dropdowns, etc.).
When the user has chosen their product they will click an Add Item
button. This popup will POST to another page that will add an entry to
your related item's table for the specific product loaded in the parent
window. The add related item popup will then refresh to a blank page
ready for more searching.

When the user is done adding products (let's say they've added 15
related products already*) they have two options. One is to click a link
titled Finished Adding Products and two is to click the X on the
window to close it. Your js will be setup in such a way that when the
window gets closed (either by method 1, or method 2) it will instruct
the parent window to reload. Upon reload the parent window will now
display all the related products and the categories those related
products are in (along with their order) like my picture shows above.

Make sense?


HTH!
Chris.

* You'll want to make sure you use a seperate table for the related
items so that the user can add as many as they want and are not limited
to a specific number (i.e. 3).
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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