Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trouble with new product filter


Lycaon

Recommended Posts

Hi all,

 

This is my first post, but I hope someone will be able to help me out. I also hope this is in the right section! I am using OsCommerce 2.3.1

 

Here is what I want to accomplish: I would like a 'manufacturer' drop down but it would be called 'Genres' and consists of categories such as Metal/Rock/Pop etc. Click on any genre and you will be presented with shirts which fall into one of those categories. Basically, it works the same way as the manufacturer and that is the result which I want to achieve, but customised to my needs. I also want the user to be able to search genres like type in 'pop' and you get all the pop shirts.

 

Now...I have played around with the coding and the database. I have created a table called "Genres" which consists of genres_id/genres_name/date_added/last_modified and I have also added two fields in PRODUCTS table - genres_id and genres_name.

 

I have played around with the coding. I have created bm_genres which is a copy of bm_manufacturers, but I changed all the relevant bits. I have also altered the _search.php files because I also want the user to be able to search for 'rock' for example and the results would display all the shirts.

 

So far I can see the new box on the site and the categories are listed appropriately, but if I click on any categories no shirts show up. I think I am close to the solution, but there is something missing, some reference between the tables PRODUCT and GENRES?

 

Any suggestions would be appreciated!

Link to comment
Share on other sites

Adding a new file and trying to emulate the manufacturers logic flow means you need to look at all instances of manufacturers logic. You may not have to make accommodations for each instance but each will need to be evaluated for the purpose of making your changes work within the contents of Oscommerce logic.

 

PS. I would only put genres_name into the genres file as you are doubling you work by maintaining it in two files.

 

One last thought but have you looked at using the attributes for products and creating a box for that use?

 

Here is a list of files that table_manufacturers appear in using a search program:

While I tried to get a complete list it would be your responsibility to insure that this is the full list.

 

catalog/advanced_search_result.php
catalog/index.php
catalog/products_new.php
catalog/redirect.php
catalog/includes/application_top.php
catalog/includes/database_tables.php
catalog/includes/functions/general.php
catalog/includes/modules/boxes/bm_manufacturers.php
catalog/includes/modules/boxes/bm_manufacturer_info.php
catalog/includes/modules/header_tags/ht_manufacturer_title.php
catalog/admin/categories.php
catalog/admin/languages.php
catalog/admin/manufacturers.php
catalog/admin/includes/database_tables.php
catalog/admin/includes/functions/general.php

 

Good luck

Link to comment
Share on other sites

Thanks for your input.

 

At the moment, I have managed to get a box appear in the right column which is a drop down list of the genres populated into the table. You can choose rock, pop whatever, but the problem I am having is getting the product listings to appear based on the genre selected. I am trying to copy the way the manufacturer works and will look into the other remaining files which are linked to the OsCommerce logic. The reason I placed them in two places because I thought you can have one just simply referencing to the main table and it would get its information from there, but I guess that doesn't work out.

 

Your last thought I did attempt, but I only managed to create a column for the product listing for genre so I am not quite there yet with that solution either.

Link to comment
Share on other sites

Sounds like you have it well in hand. I'm sure what you are trying to do can be done. I've created multiple categories boxes for 2.3.1 based off of bm_categories.php.

I did not mean you can't put the name in two files, it just means you have to keep the name updated in both files if you change name.

Link to comment
Share on other sites

I am sure it is possible to do. The only struggle I have is with the actual coding, but I am going to keep trying and hopefully I'll be able to get the category to list the products on the page for the client. Technically, it should just be a matter of re-naming the manufacturers with genre...at least that's what I wished for!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...