opencartopencart-3opencart-module

OpenCart 3 - Show all products in a category from a manufacturer by direct URL


[ Using Opencart 3.x]

I'm trying to make a link in the main menu to list products from a manufacturer that belong to a certain category.

Because i couln't find anything manufacturer related in the category controller, i tried to do it by also creating a category for each manufacturer like the text below, and then combining them into a link.

Manufacturers

Product category

tv_category_id = 60

The link i tried:

    /index.php?route=product/category&path=59_60

But when i do this i get all the TV's from Sony, but also all the TV's from LG in the list.

Is there a way to do this right, so only all Sony TV's will be in the result?


Solution

  • There is no standard controller to make a link manufacturer && category. You don't need to create category for each manufacturer.

    But! There is a way using standard OC3 filters.

    1. Catalog - Filters. Here we creating filter, Filter Group Name "Manufacturer". Filter Values - "Manufacturer 1", "Manufacturer 2", ...(all your manufacturers). Save.
    2. Catalog - Categories. Edit your category, which you would like to connect to manufacturer, i will call it "Your category". On the Data tab find Filters. Here, by entering first letters, select all filters ("Manufacturers" in your case), which you would line to link to this category. Save.
    3. Extensions - Extensions - Modules. Find Filter, click Install, then Edit. On a filter module page set status "Enabled". Save.
    4. Design - Layout. Find layout Category, click Edit. Add module Filter anywhere you want (for instance, under Category in Column left). Save.
    5. Catalog - Product. Edit all product from a category you are working with. Editing the product, on the Links tab find Filters. Here, by entering first letters, select all one filter ("Manufacturer 1" in your case), which you would line to link to this product. Save.

    That's all, go to "Your category" on the client side. There you will see a Refine Search module with the list of manufacturers. Check one of the manufacturers, click Refine Search. You will see the list on a products in "Your category" filtered by "Manufacturer 1". The URL is /index.php?route=product/category&path=58&filter=1. It's not a strict constant, if you adding new filters - order can be changed. But you can use it as a menu item link. Try. This should work.

    Or you can use some other filter from Opencart Marketplace which can generate filtered pages with constant URL.