Post by garycarr » Fri Oct 30, 2009 7:32 pm

I have the need to filter items listed in each category by manufacturer. I simply need another option similar to the sort by drop down menu.

Is this possible?


Thanks,

Gary

New member

Posts

Joined
Sun Aug 02, 2009 7:44 am

Post by readyman » Fri Oct 30, 2009 8:24 pm

Yes, I think you could do this in the controller/product/category.php file... add another sort to the data[sort] array.
Then in the model/catalog/product.php in the getProductbyId function you would add the manufacturer to the $sort_data = array ...

I haven't tried it, so I don't know if there are any conflicts there. They seem to be the two files in question though.

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by garycarr » Sat Oct 31, 2009 8:51 am

If I am reading your message right that would add the manufacturer to the existing sort by on the category webpage. If that is the case it is almost what I want, however I'd like to have another drop down menu next to sort by: that read filter by: manfacturer so the customer could click on that menu and filter based on the manufactuers matching the products listed in that category.


This is pretty above me so if anyone can do this I would gladly pay to have this modification completed.


Thanks,


Gary

New member

Posts

Joined
Sun Aug 02, 2009 7:44 am

Post by liyen » Fri Dec 04, 2009 3:24 pm

readyman wrote:Yes, I think you could do this in the controller/product/category.php file... add another sort to the data[sort] array.
Then in the model/catalog/product.php in the getProductbyId function you would add the manufacturer to the $sort_data = array ...

I haven't tried it, so I don't know if there are any conflicts there. They seem to be the two files in question though.

Dear readyman,

I'm working on this part following your suggested method.

Now the dropdown shows:
Name A-Z
Name Z-A
Price Low > High
Price High < Low
Rating Highest
Rating Lowest
Manufacturer
Then I tried to get the manufacturer list to the dropdown:

Code: Select all

$manufacturers = $this->model_catalog_category->getManufacturer($category_id);
				
        		foreach ($manufacturers as $result) {
				
				$this->data['sorts'][] = array(
					//'text'  => $this->language->get('text_rating_asc'),
					'text'  => $result['name'],
					'value' => 'pd.name-DESC',
					'href'  => $this->model_tool_seo_url->rewrite($this->url->http('product/category&path=' . $this->request->get['path'] . '&sort=manufacturer_id&order=DESC&manufacturer_id='.$result['manufacturer_id']))
				); 	
				}
The manufacurer list is pulled out successfully.
Name A-Z
Name Z-A
Price Low > High
Price High < Low
Rating Highest
Rating Lowest
HP
Dell
Samsung
However, I wish to only display the products under eg Manufacturer Dell when The Manufacturer Option is selected. Where should I edit the code?

Please advice... Thank you!

Newbie

Posts

Joined
Tue Oct 06, 2009 2:55 pm

Post by liyen » Sun Dec 06, 2009 11:48 pm

Anyone has any idea?

Newbie

Posts

Joined
Tue Oct 06, 2009 2:55 pm

Post by crazymaster » Sat Apr 24, 2010 9:34 pm

Name A-Z
Name Z-A
Price Low > High
Price High < Low
Rating Highest
Rating Lowest
HP
Dell
Samsung
how you have done that, i cant get it ?

New member

Posts

Joined
Wed Apr 07, 2010 10:29 pm
Who is online

Users browsing this forum: No registered users and 25 guests