Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anyone seen something like this?


deroguy

Recommended Posts

Has anyone come across a contribution or seen a osc site that uses drop down boxes for customers to pick products?

 

For example I have a site that sells ink for printers and I want to be able to have a a series of drop down boxes like

 

Printer manufacturer>>>Printer Model>>>>>which then displays compatible ink cartridges.

 

 

This is obviously the easiest way for customers to select which ink fits their printer. But it would require the second drop down box being populated with models of the selected manufacturer(selected in the first drop down box).

 

If anyone has any ideas can you please post...Thanks a lot :D

Edited by Christian Lescuyer
Link to comment
Share on other sites

I haven't seen anything that tells you how to add additional dropdown boxes anywhere but I do have a similar problem.

 

If I find anything I'll let you know... likewise if anyone else can help it would be greatly appreciated.

 

Thanks

 

Jane

:D

Link to comment
Share on other sites

Has anyone come across a contribution or seen a osc site that uses drop down boxes for customers to pick products?

 

For example I have a site that sells ink for printers and I want to be able to have a a series of drop down boxes like

 

Printer manufacturer>>>Printer Model>>>>>which then displays compatible ink cartridges.

This is obviously the easiest way for customers to select which ink fits their printer. But it would require the second drop down box being populated with models of the selected manufacturer(selected in the first drop down box).

 

If anyone has any ideas can you please post...Thanks a lot :D

 

 

as a general structure:

 

you put the drop down boxes on a form and use them with a form submit on change.

 

when entering the page you test the post variables for manufacturer and model.

 

on first entry they will not be set.

 

so in pseudo code :

 

if given a manufacturer from post variables {

manufacturer = the given one

} else {

manufacturer = (please select)

}

 

select all manufcturers from the database table

 

if given a manufacturer from post variables {

manufacturer = the given one

} else {

manufacturer = (please select)

}

 

create the manufacturers box with manufacturer as the selected one

 

if manufacturer is not (please select) {

select all models from the database where manufacturer = manufacturer

 

if given a model from post variables {

model = the given one

} else {

model = (please select)

}

 

create the models box with model as the selected one

 

if given a model from post variables {

display the product information for the model

}

}

 

this means that at first you will get a manufacturers box with the default selected like please select.

if you select a value, the onchange commands will submit the form and come back with the selected manufacturer in the post variable.

then the manufacturer box is displayed again with the selection and the model box is filled with all models for that manufacturer. if you then select a model from the list again the page is refrashed with the manufacturer and the model in the post variables and then both boxes are displayed and also the info for that model.

Treasurer MFC

Link to comment
Share on other sites

hhhmmm...this may be able to be done without reloading the page by using a Javascript XML HTTP Request Object with a PHP script backend.

 

This method would be faster with less server overhead than multiple page requests...but will only work on JS enabled browsers. There would have to be a NOSCRIPT counterpart that will most likely use the multiple page request method.

 

Bobby

Edited by Chemo
Link to comment
Share on other sites

  • 3 weeks later...

I have created a table to house which products are suitable to which models. Now I am getting to display the relevant results. What would be the easiest way of doing that.

 

For example I have Manfacturer >>>>Model

 

and from there want to be able to display parts that are relevant to the model chosen from the drop down box.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...