Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newbie Help


an0key

Recommended Posts

Posted

Hi all,

 

apologies in advanced if this is documented elsewhere, but I haven't a clue what I should be looking for.

 

Basically, long and short of it, I'm putting together a store for wheels and tyres.

 

The products will be grouped by brand, but what I want to be able to do is to search the products, by say car model.. is this possible? and if so, is it documented (naturally will understand will be general).

 

Thanks in advance, and love the Sware...

  • 2 weeks later...
Posted
anyone??

I answered a question similar to this a while back, and have seen auto stores out there with this functionality, but by default, osc can't do this... However, with the addition of a few database fields, you can make it do this... You'd probably want to add a products_make, products_model, and maybe even a products_year field to your products table, depending on how specific your items will be... You may also want to create say, some tables like this:

 

auto_makers - with id value and maker's name

auto_models - with id value, model name, and year field

auto_models_to_auto_makers - with id value, and id references to auto_makers and auto_models, similar to products_to_categories table

 

You could also store all make, model, and year data in 1 table with either a unique id key for each row, or a 3-way primary key between all 3 fields to prevent duplicate entries...

 

Then you could use those tables to generate dropdown menus in your product editting pages so that you could just select the make, model, and year data for each product, and you could have your search pages search these additional fields in the products table so your customers could search on that stuff... Another neat feature I saw in this store that I can't remember the name of, was that in their left column, they had a place for the customer to just select their own make/model/year, which would then get stored in the session data, and the store would only present products from that point forward that were a match for that particular car... At any given time the customer could click a button in the left column to change their car, in case they wanted to look for other stuff...

 

Richard.

Richard Lindsey

Posted

Hi Richard,

 

Cheers for the reply.

 

Dont suppose you have any source for the search do you?

Posted
Hi all,

 

apologies in advanced if this is documented elsewhere, but I haven't a clue what I should be looking for.

 

Basically, long and short of it, I'm putting together a store for wheels and tyres.

 

The products will be grouped by brand, but what I want to be able to do is to search the products, by say car model.. is this possible? and if so, is it documented (naturally will understand will be general).

 

Thanks in advance, and love the Sware...

 

Have you installed your store yet? i have a good car parts template that you might want to use, you will still need to modify it to suit your needs but its a good looking template. pm me if you want it.

 

Kathryn.

Posted
Hi Richard,

 

Cheers for the reply.

 

Dont suppose you have any source for the search do you?

If you mean source code, no I don't, sorry... But once you get the backend built, it shouldn't be too hard to add that functionality to the source, just go into your search files in osc (I can't remember if it's in advanced_search.php or advanced_search_results.php) and look for where the "where_str" is constructed, then add in the checks for your new fields as part of the search...

 

Richard.

Richard Lindsey

Archived

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

×
×
  • Create New...