Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Group products by manufacturer, is it possible?


EasyServe

Recommended Posts

Hi I have a customer who would like to group their products by manufacturer when in the catergory view.

 

I.e. Surfer clicks "Digital Cameras" catergory, then a list of digital cameras grouped (maybe in tables) by manufacturer is displayed, rather than just a list that can be sorted by manufacturer.

 

It must be possible, has anyone been able to do it? I am good with PHP but can't say the osCommerce code is easy to follow! :shock:

 

If anyone has any ideas please email me or post a reply

 

Thanks in advance.

Regards,

Nick Kemp

Link to comment
Share on other sites

I don't know if it has been done before but, it could be done with an " AND GROUP BY" statement.

 

There is at least one contribution that will display the products in a table format.

Link to comment
Share on other sites

When in the category display when it lists the products for that group there is a drop down that appears when there is a mixture of manufactures.

 

Just like when you select a manufacture and there is a mixture of categories.

 

Is this not what you are looking for?

Link to comment
Share on other sites

You picked a lovely page to want this feature. :roll:

 

Presently, the sort order of the select statement is set in default.php as are the order of the columns.

 

The initial listing is defined but then the customer has the option to change the sort order by clicking a menu title like Product Name or Price

 

If you group things within boxes, you are going to have to take into account your new grouping, manufacture.

 

You could add your sort order for manufacture in front of the exisiting sort orders found in default.php so that first the manufacture is sorted then the sort is in order based on the selected column.

 

Once you have this working ... you can edit the product listings page to add an additional Manufacturer Title Heading as it is going through the list.

 

Now, you have to get tricky as the split page doesn't know anything about this new heading you want so it needs to know when to redraw the heading.

 

The idea is ... draw the heading ... display stuff ... if page splits ... redraw same heading ... display more stuff.

 

Adding an additional while loop to help control the new heading for the manufacture would most likely be the easiest thing to do.

 

When trying to edit default.php think of it as just a building block for the select statement. It sets the sort order and display order. Product Listing draws the final information to be displayed.

 

Try adding your sort order to default.php and remember to add it to each of the select statements as on of them will be the one used based on the current sort order and these can change as the customer is viewing things.

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Archived

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

×
×
  • Create New...