0

I am using Magento 1.9.3, and if i want to see on frontend only the products from a specific brand (manufacturer attribute), the url is something like:

http://example.com/shop?manufacturer=4

Everything ok, products from manufacturer with id 4 are listed. The problem is that i want to use manufacturer name/content (My Brand), like this:

http://example.com/my-brand/

I have tried to use url rewrite, but the url works only as a redirect to the long way (with GET parameter).

I searched a lot, but couldn't find anything helpful, so any help ideas are welcome.

0

I'm under the impression that the only way to get a clean non-filtered URL like that is to setup a category. You don't have to show it in your menu, but you can keep it as a sub to the root category for that store and still have access to it at the level you desire.

0

A category as proposed by @Steven J is a possibility. However, I assume "/shop" is already a subcategory of your store, and creating a sub-category has its drawbacks:

  • it is not dynamic, so you always have to add new products to the brand-categories manually
  • if you have multiple categories in your store, you would have to duplicate the brand categories as subcategories of each of these categories; the problem being not only the manual effort, but also a lot of SEO problems like duplicate content, for example
  • if you filter for subcategories in the category "/store", you will end up with a URL like "/shop?cat=123", which is most definitely not what you wanted

Generally, the requested functionality seems to be "nice URLs for attribute filters", which is not a Magento default functionality. This is why a short Google search for "magento 1 shop by brand" brings up a lot of extensions.

I also found this module: https://yoast.com/landing-pages-module-magento/ a while ago. It allows to create CMS pages with product lists filtered by attribute. It requires some programming to work for Magento 1.9.x, but it's possible.

If programming is ok for you, there's also the option to create a module with a block-type that extends from Mage_Catalog_Block_Product_List, which could be inserted in CMS pages like this: {{block type="mymodule/product_list_brand" brand="4"}}, and something like this in the code:

<?php

# ... class definition and stuff

public function getLoadedProductCollection() {
    return $this->getCollection()->addAttributeToFilter('brand', $this->getBrand());
}

(of course this is only a short example)

If you go a bit deeper into your requirements, maybe I can give a better answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.