Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help creating custom categories box.


blueline

Recommended Posts

Posted

Hey everyone,

 

I am trying to create a site for a customer. They sell truck parts and accessories. What I would like the capability to do is have a dropdown box that allows the customer to select a make (Like Ford) and from that, a new dropdown box will appear that lists the models (Like Mustang) that apply to that make, and then again a new box will appear that shows the ranges of the years that parts fit for (Like 1997-2000).

 

Any idea how to script this, and then implement it into osC? I figured that I would just create a new box that will go in the left column, but I am not really experienced with PHP yet, and really appreciate the help.

 

Thanks a lot,

Chris

Chris Sullivan

Posted
Hey everyone,

 

I am trying to create a site for a customer. They sell truck parts and accessories. What I would like the capability to do is have a dropdown box that allows the customer to select a make (Like Ford) and from that, a new dropdown box will appear that lists the models (Like Mustang) that apply to that make, and then again a new box will appear that shows the ranges of the years that parts fit for (Like 1997-2000).

 

Any idea how to script this, and then implement it into osC? I figured that I would just create a new box that will go in the left column, but I am not really experienced with PHP yet, and really appreciate the help.

 

Thanks a lot,

Chris

 

1. Either you have a server trip with a variable set to what they picked and populate the second dropdown based on that on the server side.

or

2. You download all the data for all makes, models, and years, in a big javascirpt array, and use javascript to change it.

 

I don't recommend #2. I've seen it done, it's brittle, not that nice. Just live with the server trip would be my suggestion - it's what the categories box does now...

 

Hmm, has anyone done this before? It's the categories box with dropdowns instead of links.... Hmmm...

 

Tim

Posted

Thanks Tim.

 

I can say one thing...Anybody interested in making and contributing a mod? ha ha ha

 

-Chris

Chris Sullivan

Posted

I've done it partially.. only the root categories that have 0 as their parent... it's in my quick_stockupdate contribution. And I did it in one go.

But it will still show you how to get a certain category into a dropdown.

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...