Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Is the back end of magento down?

Nothing will save or upload in the back end. is magento down? i cant create new categories or add or remove existing ones and the products within.
0
votes
1answer
34 views

Add configurable products to cart from category page

Is there any way that we can add configurable product to cart from category page with their attributes, like color, size etc ? Right now when i add any configurable product to cart it redirects me on ...
1
vote
1answer
20 views

when i add category it give me this “Secondary Description” attribute value is empty"

Suddenly Magento starts giving this error ... I tried to var_dump() what is missing, also check the file but there is no problem with it.
0
votes
0answers
13 views

Only show category in catalog backend

I want filter only to a category and only the SKU's of that category shows up. How can i filter the catalog back-end of Magento 2?
2
votes
1answer
56 views

Magento 2 How to duplicate category products into another category

I am working on duplicate category, In my controller file, I am able to duplicate the category but I need to assign the same products to the newly created category from the old one. i.e. I have the ...
0
votes
0answers
18 views

To show total category counts for on category in Magento admin on Category page?

I would like to show the total category count for that category under Add Sub Category (before collapse/expand all links) button on the left side. Total category count should consider subcategories ...
1
vote
1answer
38 views

How add category programmatically magento 2.3? [duplicate]

I would like to create categories programmatically in magento 2.3 Can you help me to provide us code? Thanks in advance!
0
votes
0answers
11 views

Magento 2 Categories SQL Import statement just placing meta data

I am trying to place meta data on already existing categories. I received the names of categories and the new meta data that is all. I was wondering if there is fast sql statement that will find ...
0
votes
0answers
95 views

Custom Canonical Tag in Magento 2 Category

I am using Mageworx extension for canonical tags, but want to add a custom canonical tag/url in a category, and remove the canonical url generated by the extension. I am using Magento 2.2.5. I used ...
0
votes
0answers
25 views

How to bulk remove certain category from product catalog

I publish content for a merchant, and I want to bulk remove one category from multiple categories assigned to products. I saw there are some answers to help on developer side but not any to solve this ...
0
votes
1answer
22 views

Magento 2 - Second level category has no head

I tried making a 3 layer category system as pictured below. For the category "Liquid Spice Blends" everything works well, the layout gets loaded and everything. But for the test element as shown ...
0
votes
0answers
17 views

Magento 2 homepage as store page with filters

I want the homepage to be the base of the root category. So the homepage shouldn't be a CMS page but a category page of the default category. I tried copying the XML of a catalog category to ...
0
votes
0answers
26 views

Magento2 Category Trees show on frontend in dropdown

<?php namespace Module_dir\Block\Customer; use Psr\Log\LoggerInterface; class Addproduct extends \Magento\Framework\View\Element\Template { protected $adminCategoryTree; protected $logger; ...
2
votes
3answers
135 views

Magento 2: How to get current category id in admin controller

I have made a custom button on category edit page in admin. The button redirects to custom admin controller. I need to fetch the current category id in the controller.
1
vote
1answer
86 views

Magento 2 - Passing argument from backoffice in Category Layout Update XML field to frontend module or phtml

In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office Category > Custom Design tab > XML Design Update <reference name="product_list"> &...
3
votes
1answer
351 views

Magento 2 How to show categories name in breadcrumbs in some conditions?

I am trying to show breadcrumbs when open a product from custom listing or from search result. For example, if I open a product from search result, then it's breadcrumbs look like this image: The ...
0
votes
1answer
54 views

Magento2 get Random Order category collection

i want to random 5 category but not luck for me i have use below code $categoryFactory = $objectManager->create('Magento\Catalog\Model\ResourceModel\Category\CollectionFactory'); $categories = $...
1
vote
0answers
105 views

Magento 2 How to get category tree with checkbox to select only one category?

I want to call the categories into my custom admin form for admin. How can I call that? I want to show all categories into my custom form in admin and it will allow selecting only one category. I ...
4
votes
0answers
59 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 ...
0
votes
0answers
21 views

Magento 2 how to get swatch name instead of image on hover in category page?

i changed that code - from - ' option-tooltip-thumb="' + thumb + '"' + ' option-tooltip-value="' + value + '"' + to - ' option-tooltip-thumb="' + label + '"' + ' option-tooltip-value="' + label ...
0
votes
0answers
8 views

Magento 2: root category settings for SEO?

Default Magento (2) never displays the root/default category in the frontend. However, in the backend there is a whole lot of settings in: CATALOG -> CATALOG -> Categories Why should I put effort in ...
0
votes
0answers
14 views

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

When I create the new category and tried to assign the product through that new category, I got the error “Unique constraint violation found”. Please check below screen-shot..
3
votes
3answers
192 views

Remove existing and assign new categories to existing product while updating it programmatically in magento 2

How can I remove existing and assign new categories to product programmatically in magento 2 while updating product data. <?php $newCategoryIds = array(5,6); $existingProductId = 25; $...
1
vote
4answers
144 views

How to get all category is active in magento 2

i tryed get all category in phtml by this code, but it not working, it get all category, not only category active. Please help me. Thanks all. $objectManager = \Magento\Framework\App\ObjectManager::...
2
votes
1answer
31 views

Magento 2 product count issue in the layered navigation in category listing page

I am using Magento 2.2.6, i have a color attribute of multiselect type. i had assigned this attribute to all product type. when i assign one group product of color red to category "Category 1" then in ...
2
votes
3answers
41 views

Magento 2 add category url in all products, frontend

I want to display all product url in frontend with category name inside, I had checked all the configuration, but didn't find anything. Now I think I have to do it by coding, please guide me little ...
1
vote
0answers
24 views

cat_index_position defaults to 10001. Magento 2.1.9

Magento 2.1.9 right now. We have a fec categories and set the position according to our liking. However this isnt reflected in the frontend for every product. Some work, some dont. Screenshot of the ...
0
votes
0answers
64 views

ios Safari - Magento 2.2.2 Responsive Menu Subcategories not Expanding

ios Safari - Magento 2.2.3 Responsive Menu Subcategories not Expanding. Hello, We're finding an issue that occurs with iphone and tablets using Safari. It as a high occurrence rate: Steps> 1. Visit ...
0
votes
1answer
37 views

How to move product_list_toolbar magento 2?

I want to move toolbar above column. I am using this code: <move element="product_list_toolbar" destination="columns.top" before="-" /> I am getting the getSize() error: Fatal error: ...
2
votes
4answers
2k views

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

when I have the category in product assign and saving category below error showing The value specified in the URL Key field would generate a URL that already exists. To resolve this conflict, ...
0
votes
0answers
39 views

Shipping method restrictions by category programmatically magento 2

I want to add Shipping method restrictions by specific category in custom shipping method
0
votes
0answers
20 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.
0
votes
0answers
22 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?
9
votes
1answer
248 views

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 ...
1
vote
0answers
38 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 '...
0
votes
1answer
41 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 ...
0
votes
0answers
43 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
274 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
3
votes
1answer
35 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 ...
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
2answers
203 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('...
3
votes
1answer
36 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
1answer
33 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.
0
votes
0answers
39 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 ...
1
vote
0answers
262 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
309 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 "...
4
votes
3answers
190 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
40 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 ...
0
votes
2answers
35 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/...
0
votes
0answers
23 views

How To Add Search By Category In Advanced Search in magento 2.3?

How To Add Search By Category In Advanced Search in magento 2.3 ?