deroguy Posted April 23, 2005 Share Posted April 23, 2005 (edited) 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 April 23, 2005 by Christian Lescuyer Quote Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2005 Share Posted April 30, 2005 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 Quote Link to comment Share on other sites More sharing options...
boxtel Posted April 30, 2005 Share Posted April 30, 2005 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 <{POST_SNAPBACK}> 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. Quote Treasurer MFC Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2005 Share Posted April 30, 2005 (edited) 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 April 30, 2005 by Chemo Quote Link to comment Share on other sites More sharing options...
Jumping Rabbit Posted April 30, 2005 Share Posted April 30, 2005 Hi, This one might do it for you DropDownMenu v2.0 Hope this helps..... Quote Faster Checkout - osCommerce Knowledge Base - Anyone meet offline?, Has anyone of you cyberkids meet offline? For newbees do atleast read this 4 points: Basic info - Search tips and help - Posting tips and help - Basics for Design Link to comment Share on other sites More sharing options...
deroguy Posted May 21, 2005 Author Share Posted May 21, 2005 Hi, This one might do it for you DropDownMenu v2.0 Hope this helps..... <{POST_SNAPBACK}> Yeah that is similar. But I need to be able to choose a type of printer which then displays the ink cartridges for the printer choosen Quote Link to comment Share on other sites More sharing options...
deroguy Posted May 27, 2005 Author Share Posted May 27, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.