Forum Moderators: buckworks

Message Too Old, No Replies

Customizing a cart - Oscommerce- for DB driven searches

         

cmendla

4:01 am on May 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I have a situation where there is an oscommerce store selling widget add ons. The site owner wants to have a front end where the visitor can put in their manufacturer, model, year and be shown products that would work with their widget.

There are about 2000 widget add ons and each one of these could potentially apply to 50 - 100 make-model-year categories.

My dilemma is how to go about this. It appears that no matter how it is handled, it will require a lot of effort to tie the widget add-ons to the proper category.

One solution I can see is to simply create the item in OS commerce in a category called ITEMS. then create categories for all the make-model-year possibilities. Once that is done, each item would have to have all of the categories applied to it. I have found some third party software that makes working with categories a lot easier. The final step would be to create a php based front end to take the selection and show the proper items.

Another potential solution is to add fields to the database for make, model and year. Then mod the search function a bit to show a listing of items based on the selection entered. We would still have to tie each widget addon to possibly hundreds of make,model, year categories.

A third solution would be if there are any commerically available add ons that would work in this case.

My one problem with adding fields to the database as a solution is that it will make it harder to work with other contributions and third party software.

I'd really appreciate any thoughts on this.

thanks

chris

lorax

11:41 am on May 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would not recommend modifying the products table at all. Write a glue application that uses 2 new tables. One contains all of the possible make, models, years with unique ids. The second one (which will be longest even though it will only have 2 fields) will contain the id for the product and the id of the make/model it can be used on. Then you can do quick look ups using this table.

cmendla

1:09 pm on May 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lorax

Thanks.. Thatlooks very doable and, as you said, it doesn't mess with the structure of the products table. All of the processing gets done up front and then we get the item listings we need.

thanks again!