Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [category]

Questions about product categories in the Magento catalog

3
votes
3answers
345 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 ...
0
votes
1answer
23 views

How to get total amount of reviews belongs to one category? [Magento 1.9]

I am trying to generate SEO rich data in Magento for a category or listing page. I just don't understand how can I get the total amount of reviews for a that category. I don't want to slow down the ...
7
votes
1answer
47 views
+300

Magento 2 - Full hierarchy wise product breadcrumb

If I open a product directly from Home or search page then breadcrumb shows like this: Home > MyProduct Whereas if I go to the category, then subcategory and then open the product, it show the ...
0
votes
0answers
15 views

How can i add custom category description block seperatly for every category?

I want to show one more category description on the down side of the catalog page. so I can insert another different description for different categories pages.
4
votes
4answers
13k views

Magento 2 remove category filter from list page filters?

How can I remove Category Filter from Magento 2 Product List Page.
0
votes
0answers
38 views

Magento 2: How to import export Categories in csv via backend using Entity Type catalog_category

I have to need import export categories in csv same as product, in Magento 2 provided same thing for product. I have tried below code but facing issue in Model file path Vendor/CategoryImportExport/...
0
votes
1answer
33 views

Magento 2 Auto-remove empty categories from menu?

I am using Magento 2.3.1 and the pearl theme. My site has many different categories and I wanted to know if there is a way to have magento automatically remove categories that don't have product in ...
0
votes
0answers
12 views

Import categories as hidden on frontend via Magmi

I want to import categories via Magmi (with "on the fly category creator/importer" plugin) that must be active, anchored but not visible on navigation menu. In which way can I do it?
1
vote
1answer
782 views

Category page image upload issue

I am trying to upload Thumbnail image and image for category page but it is neither uploading nor showing any error. I have cleared cache and also done indexing but still no output Any solution??
0
votes
0answers
12 views

Override category H1 with custom attribute - Magento 2

I would like to create a new field for category pages which I can use to override the default H1 on front-end. Currently if have a category called 'Stuff', my breadcrumb is 'Stuff' and my H1 is '...
6
votes
5answers
19k views

Magento 2 - Get Subcategories of Specific Parent Category

What I'd like to do is grab all of the child categories of a specific parent category. I'm assuming the best way to do this is by using the parent's ID and of those child categories that are returned, ...
2
votes
1answer
3k views

Magento 2-How to link image to category page through cms page?

I have a static page of shop. On this page there are different images. I want to link these images to the specific categories types. For example i have an image of men's clothes. Now i have also a ...
3
votes
1answer
30 views

Magento 2: Getting unknown category

I am trying to get a level 2 category list. I got all level 2 categories but I am also getting 2 unknown categories which are not in backend. This is weird. Here is my code public function ...
0
votes
1answer
789 views

Magento 1.9 - How does pagination work on category pages

On a category page when I choose to display 12 products per page it still shows all products from that category. Where does this actually get applied to the category product collection? I'm using ...
0
votes
4answers
729 views

Export Products on a Category

Is there a way that I can export all products on a certain category via CSV or excel file?
0
votes
1answer
916 views

get products from specific category

I need to get the products from a specific category and display in a specific template style. I know you can do this on a cms page: {{block type="catalog/product_list" name="product_list" category_id=...
4
votes
3answers
146 views

How to show a category's products in shopping cart

Magento version 2.3 I want to show a particular category in shopping cart page using programming, instead of using backend widget settings. I have tried to modify the following files with no luck: ...
0
votes
0answers
19 views

How to add select multiple images attribute in category in Magento 2

I want to display more then one images of category in category page so i want to add more then one images in category in backend, please help me
2
votes
1answer
36 views

Getting Error Unique constraint violation found - When remove suffix .html in magento 2

I Am getting error when I am removing .html from Category URL Suffix. Error is Unique constraint violation found. Anyone have genuine solution for this. Thanks
1
vote
1answer
23 views

When I use “echo” in vendor methods - products not showing, but work fine without it

I got the next code: public function getProductCollection() { if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) { $collection = $this->...
0
votes
1answer
31 views

How to add Header links to category section?

How to add Header links to category section? i have some header links like new category , Brand , Contact Us. i have to show this header links in Main category section also.
1
vote
2answers
828 views

How to add contact form on category page?

I have to add custom contact form on product listing page.For this i am adding in local.xml file. <catalog_category_default translate="label"> <reference name="root"> <...
0
votes
2answers
29 views

Fastest way to load category and save programmatically in Magento 2

I want to load all collection in Magento 2 and save one by one programmatically. is there any faster way to do so. I tried below code for one category use Magento\Framework\App\Bootstrap; include('...
-1
votes
0answers
24 views

Magento 2.3 Filter issue when check and uncheck the filter content

[Magento 2.3] In product listing page filter section,it has two categories - brand and type filters. If I clicked multiple select in brand filter and single select in type filter means it working ...
0
votes
0answers
33 views

Problem after activating Use Flat Catalog Category and Use Flat Catalog Product

I've activated the following two features for speeding up my site Use Flat Catalog Category Use Flat Catalog Product then re-indexing But then some parts of my site will not show up correctly. for ...
3
votes
1answer
29 views

Magento 2 - Argument 2 missing error on overriding file

I am trying to override Magento\Catalog\Block\Category\View added this code in di.xml <preference for="Magento\Catalog\Block\Category\View" type="Naheed\AllProducts\Block\Category\View" /> ...
0
votes
0answers
9 views

Magento 2 - Disable Text Swatch in Category Pages

I setup "size" attribute as Text Swatch and Use in Layered Navigation: Filtrable (with results). Is there any way to be Text Swatch only in the Product View Page? I need in the Layered Navigation to ...
1
vote
2answers
1k views

How can I disable the View as grid/list buttons in Magento 2.1?

I am working on a Magento 2.1.7 shop. On my category pages, I need to have the grid view only, without giving the customer the possibility of switching to the list view. What is the easiest and/or ...
0
votes
1answer
27 views

The value specified in the URL Key field would generate a URL that already exists

I created category with url key name is "xxxxx". I have changed that category url key to "YYYYY". INow i dont like that url key for that category. Again i changed the url key to "xxxxx". It throws "...
2
votes
0answers
50 views

“Unique constraint violation found” Error When Assign Product into Category

After Assign Product Into Category Getting Error Unique constraint violation found In exception.log file :- [2019-05-31 17:53:29] main.CRITICAL: Unique constraint violation found {"exception":"[...
1
vote
1answer
21 views

Getting Subcategories even if product count for each is 0

In my module, I am getting the current ID and then using the category repository and the "getChildren" method. This works great, except it doesn't return child categories with product counts of 0. ...
0
votes
0answers
21 views

Change link for pagination

In magento2 i want to redirect pagination link. I would like the first pagination link (with number 1) to be a category page link. I think it is in pager.html but I do not know how to do this. please ...
3
votes
1answer
764 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://...
12
votes
4answers
7k views

Create Category page which displays all Special Price products

Basically, I've created a category 'Products on Sale', which I would like to automatically contain all products in my catalog that have had a Special Price applied to them (via Catalog > Manage ...
0
votes
2answers
28 views

Magento 2 unable to save category custom attribute value

I have created below modules to create custom category attributes, but values are not getting saved from admin . below is my module code please with what i am missing 1: Yereone/NewCategoryAttribute/...
2
votes
1answer
716 views

Filter (layered navigation) categories

My store has the following categories: - Root - other category - another category - Home - Kitchen - Cabinets - Appliances - Accessories ...
0
votes
0answers
16 views
0
votes
1answer
902 views

Magento 2 catalog category link widget is not working

I wanted to insert catalog category in my content, however, it keeps showing a broken image whenever I try to use it. I have also tried manually coding it. Does anyone know the fix for this?
0
votes
1answer
30 views

Magento 2: How to sort product on Category page by entity id in desc order?

I need to show all the newly created products on top. So need to arrange all the products according entity id in descending order
2
votes
1answer
937 views

Add noindex to single category in Magento 1.9

I want to modify this line for only one category: <meta name="robots" content="INDEX,FOLLOW" /> I want to add noindex like this: <meta name="robots" content="NOINDEX,FOLLOW" /> I tried ...
1
vote
2answers
4k views

Add Category filter in best seller product Collection

I get best seller product for all category using below code public function __construct(\Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory ) { $this->...
1
vote
3answers
1k views

Cannot create category in magento2

I am trying magento 2 for first time and it's driving me crazy. I have successfully installed magento 2 on my cloud shared hosting and everything looks ok except these: Cannot create category: there ...
1
vote
4answers
15k views

how to get Category description after product listing

How can i get category description after product list in product listing page?
0
votes
0answers
18 views

Magento 2 - double ordering in category page

Some products have custom attribute blue_widget. On category pages, I want to list all blue_widget poducts that belong to that category first, and then the rest of the products. However, I want to ...
3
votes
6answers
3k views

create category programmatically if not exist - magento 2

I have one custom table, that table have a column name category which contains the events category like entertainment, national events. Now I need to create category from the table? note: create ...
0
votes
0answers
12 views

Assign product to the last level category in magento 2

we are importing product from outside of magento.we create an mappings for all attributes as target attributes and magento attributes.we have categorys as Abc/Cde/efg.Here is my category mapping code ...
3
votes
1answer
653 views

URL key for specified store already exists on Category edit in Magento in Magento 2.1.6

I working on a project on which I get the error URL key for the specified store already exists While editing category on store 2. I get this error only on store 2 Arabic first category and also ...
3
votes
2answers
43 views

Magento 2 - How to get category name and category tree for product or for category id?

Magento 2.2.7 I have to output category name and "tree" or path for product. For instance if my product is in category Lg775 my output should be: Hardware/Motherboards/Intel/Lg775 so far I have this ...
0
votes
0answers
26 views

Magento 2 : Data not display in custom field of category edit page

In magento 2.3.1, I added custom field in category edit page and it's display in category edit page. But, I can't get data of that field in edit page field. How can I get it? Any help would be ...
3
votes
2answers
7k views

How to get current category ID

I'm trying to display a message just on a certain category page in magento? I know how to do this on a product page so like: <?php if (in_array(415, $_product->getCategoryIds())) {?> &...