Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [category]

Questions about product categories in the Magento catalog

773 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
2k views

Magento 2 how to filter product collection on category page with custom filters

I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products ...
6
votes
2answers
7k views

URL Rewrite: From category to CMS Page

I've created a CMS Page. URL Key = about/page1. I've created some Categories. One of them, category #1, it's called about. URL Key = about and its first subcategory, category #2, is named Page ...
6
votes
0answers
1k views

Displaying Subcategory Blocks Magento 1.9.2

I'm having trouble displaying subcategory blocks in Magento. I have followed several solutions posted on here and this tutorial. I created a static block with this code: {{block type="catalog/...
6
votes
1answer
197 views

Add new options into sorter

In magento 2 project, it provides 3 options by default. Position Product Name Price I need to change these options to sort as, Most Popular Price high to low Price low to high I can add from ...
5
votes
0answers
993 views

Magento 2 - Move Category Page Toolbar/Sorting Options Above Both Columns

What I'm trying to do is move the toolbar/sorting options on the category page above the left column and right column so it spans the full width of my content area. I'm trying everything and nothing ...
5
votes
1answer
530 views

Add image in category menu before category-name Magento 2

I'm create new attribute is small image for category.In admin i have save image for category-1 then i get this image in menu category but image exist for all category.Although in admin i just save ...
5
votes
3answers
2k views

Show product of a category in a custom page

I create a category with some product. Also create a custom layout for my page that I add new cms page with this layout that I created. I need to have this page with my layout because I want to add ...
5
votes
1answer
1k views

How to get first product from category in 1column.phtml?

I'm searching for a way to get the main image from the first (or random) product from the current category and use it as a background for the category title. As the title is created in 1column.phtml (...
4
votes
0answers
58 views

Magento 2 How to duplicate the category with same structure?

I want to duplicate the category with the same structure and data. How to duplicate child categories here? It is working correctly for a single category. In my controller file, I have the parent ...
4
votes
1answer
1k views

Magento 2 Import categories using csv

I have around 500+ categories in my csv. I'm trying to import only categories using csv. Can anyone knows how to import only categories in magento 2 using csv?
4
votes
1answer
448 views

magento 2 | Categories not showing in Admin Product Edit Page

I have started working with magento earlier this year, I am running magento CE 2.2.2 I have noticed that when I go back to edit a product from the catalog I have noticed that the categories are not ...
4
votes
0answers
330 views

Magento 2.2.5 - Categories are not getting saved in the database

In my Magento 2.2.5 Store, When I try to edit the existing categories content and press the save button, the categories content stays the same, there is no change being reflected in the admin panel,...
4
votes
1answer
470 views

Modify dynamically created product url in magento 2

I have enabled "Use Categories Path for Product URLs". Because of this, I get category path in product url. But when we search the product, it redirect to the product url that does not contain ...
4
votes
2answers
2k views

Unique constraint violation found - When remove suffix .html - Magento 2.2.0

When I try to remove the .html suffix from category, Magento 2.2.0 gives me this error. Has anyone else ran into the same problem? How can I resolve it? Thank you
4
votes
1answer
2k views

Magento 2.2 - Breadcrumbs issue

Currently i've got products in a category sub of default for example: Root -> Sub cat -> product I've noticed that on the product page itself the breadcrumbs are working fine for some products and ...
4
votes
0answers
868 views

Magento 2 show price range for configurable product on category page

I have configurable products with different prices for each product. For example I have a configurable product with three package sizes: Small = 50$ Medium = 60$ Large = 70$ On the category page, ...
4
votes
2answers
2k views

How to display category image in home page with custom css?

I want to display all of my category image with in home page. What should i do for this? I am using CE:1.9.2.4
4
votes
0answers
281 views

Need to create Ajax Category filter

Need to create ajax filter for category. Please help me to create AJAX category filter. I don't want any use extension. My Magento version : 1.9
4
votes
1answer
88 views

Sidebar Category List Issue

I have some code that I'm using to show Categories and Sub-Categories in my Magento webstore. Currently, each category is listed with the amount of products within that category displayed. Eg: Shop (...
3
votes
1answer
147 views

Magento 2.3.0 TinyMCE removes anchor tag href suffix when used with {{store url=''}}

I am trying to add category link in the CMS block. <ul class="list-unstyled"> <li><a href="{{store url=''}}test-collection.html">Test Collection</a></li> </ul> ...
3
votes
1answer
48 views

How to get all categories in configuration (system.xml). magento 2

I'm getting all the categories in system.xml using <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Option\ArrayInterface; class Category implements ArrayInterface{ ...
3
votes
0answers
70 views

How to change the canonical function for category page in Magento 2?

How to add custom url Using canonical function Code: if ($this->_categoryHelper->canUseCanonicalTag()) { $this->pageConfig->addRemotePageAsset( $category->getUrl(), '...
3
votes
0answers
29 views

Position not showing in category sorting dropdown

I have a problem with the sort order of products in the categories: The Position option is not showing in the dropdown as you can see in the screenshot. In the Magento backend the position is ...
3
votes
2answers
269 views

How to get category URL in multiple stores

I'm trying to generate the hreflang links for our multilingual Magento 2 site, and as the category slug changes, I cannot simply replace the store code in the URL. I've come up with this: $...
3
votes
0answers
183 views

Magento 2 category not work properly

Most of category issued are about product not showing. But I got a different issue here. After I'm trying to solve some problem with the Porto theme. Every category in my site start showing all the ...
3
votes
1answer
28 views

When To Use MultiStore Vs. Categories

I'm attempting to hide the "Add To Cart" button for specific stores currently and am having some issues with my lack of experience. It works in each individual store but not when using the search ...
3
votes
1answer
327 views

Magento 2.2.5 Category admin stuck after thumbnail image upload

I've just tried to upload a thumbnail image to a category, when pressing save, the washed-out loading screen appears and never goes away. If I back out of that page and then try and go back, the ...
3
votes
1answer
258 views

How add (new) label along with name in Magento categories menu

Can somebody suggest how to add (new) label along with category/subcategory menu name like shown in the picture given. Is there any Extension for this? If somebody has done this please help.
3
votes
0answers
91 views

How to Add No Index tag to category path product urls in magento?

We want to add no index robots meta tag for all those category path product pages: www.example.com/Category/productpage Actual product page: www.example.com/productpage category path product ...
3
votes
3answers
394 views

Error with Catalog Url Rewrites based on category

I actually have exactly the same problem as posted here An error occurred while saving the URL rewrite after upgrading from CE 1.9.0.0. to 1.9.3.3. I get the error: An error occurred while saving the ...
3
votes
1answer
746 views

Magento 1.9: Custom category field for an image not showing on front end

I want to add a picture on top of category name in frontend. I tried creating a custom field for the category and adding a picture that way. I can see the custom field from admin, but I can't see ...
3
votes
1answer
546 views

Display specific category, toolbar and filter on home page

I want to have a category page as part of my homepage that also shows the pagination and, most importantly, the filter. I'm using this extension to change the filter to a horizontal one that uses ...
3
votes
1answer
119 views

Dealing with more than 100k categories in Magento 2

In shop that i'm developing I need to deal with more than 100k categories. The problem is with displaying them in adminpanel especially in sites: "catalog/categories/index or edit" and "catalog/...
3
votes
1answer
479 views

How Can i Reset Default Category Products Count Number?

I don't have products in my website but Default category shows count of the products. How can i reset?
3
votes
1answer
137 views

Sort categories in layered navigation alphabitically

We are trying to sort the categories in the layered navigation alphabetically but it is not getting sort. Tried the following modifications directly in core file at line number 122 for testing ...
3
votes
0answers
486 views

Magento 2: How to add fontawesome icons for each category top-menu item?

I'm using Magento v2 and want to have icons added to the left side of each category menu item. How can I accomplish this? I'm using a custom premium theme. When I try to see the template path by ...
3
votes
3answers
688 views

magento 2 Cant show products on categories

I have added some products in one category. All products are enabled, with quantity and catalog, search option, I have also disabled cache and reindexed multiple times but on the frontend the product ...
3
votes
0answers
1k views

Get frontend category URL in admin area with correct base URL

I try to load categories in the admin area with store specific values. $this->categoryCollectionFactory->create() ->setStoreId($storeId) ->addAttributeToSelect(['name', 'url_key'])...
3
votes
0answers
595 views

Magento 2 - Display subcategories above product listing

I'm trying to display the first 8 subcategories above the product listing on a select few category pages. I know that I can easily do this using static blocks, but I'd rather use a custom template ...
3
votes
1answer
167 views

toolbar sortby price in custom phtml

I have created a custom module. The custom.phtml file lists all the products of a category and subcategory. I want to place toolbar with sort by price on the top of the category. I have included the ...
3
votes
1answer
4k views

Add a custom text field to categories in Magento 2

I want to add a new text area to my categories in Magento2, similar to this, but its for Magento 1: adding custom drop down field to category Basically there should be a field for each category where ...
3
votes
1answer
3k views

Remove parent categories from subcategory in URLs in 1.9.2.3

Magento version is 1.9.2.3. I have tried following solution which doesn't work for me. Step 1: Go to app/code/core/Mage/Catalog/Model/Url.php copy this file to app/code/local/Mage/Catalog/Model/Url....
3
votes
1answer
469 views

magento 2: how to set category as homepage

I have tried displaying particular category products on homepage with widget through back-end. It does work. But i want to have layered navigation on left side as it comes in category product list ...
3
votes
0answers
84 views

Magento 2.0 rollback to Magento 1.9x - question about attributes

Being a new magento "developer" (use quotes because honestly, I can barely navigate the admin let alone build this site properly!) I still have tons to learn. Recently tried to procure cheap hosting ...
3
votes
1answer
372 views

Have category page main menu based on current category

I've tried Google - but maybe I just can't word this question correctly to get an answer. I want my top-level category pages to change the main menu to only show the current category. So, for ...
3
votes
1answer
198 views

Multistore feature troubleshooting

I'm asking you your help because I created two stores in the same Magento installation : store.example.com : for customers (default store) b2b.example.com : for retailers The installation was done ...
3
votes
1answer
788 views

Category sidebar use SEO url vs cat=

Currently on my site when I visit a top level category from the sidebar the URL is: http://example.com/top-level-category Then when I click a sub-category in the resulting sidebar the URL is: http://...
3
votes
1answer
160 views

Return 404 if pagination is out of range

Currently, when I navigate to a page in a category that is beyond the range of the products (say page 6 on a category containing 200 products with 50 products per page), the page returns a 200 http ...
3
votes
2answers
540 views

Bottom Category on left navigation is always open

I have a problem on my product categories page the navigation that we have going down the left side displays all the categories we need it to and also it bold a subcategory when you are on it, However ...
3
votes
1answer
623 views

Getting the last viewed category on a product page?

We would like to add a link "view all other [category name] products" on the product page. We tried several things no full success. it seems there is a last viewed category methode Mage::...