Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
0
votes
1answer
53 views

Unable to unassign the category of a product in backend magento 2

I wish to unassign the categories of a product in admin end. After unassigned the categories, I have saved the product. But the saved changes is not applied. Please provide me a solution to solve this
0
votes
0answers
12 views

Should categories or attributes be used to drive cart rules

Forgive the potentially dumb question but I'm new to magento and I have some fairly complex cart rules needed. I'm not sure if categories or product attributes (or something else I'm unfamiliar with) ...
0
votes
0answers
50 views

Google Analytics not tracking categories on M2

When I go on my GA Conversions : E-commerce : Overview and then I click on Product Category (Enhanced E-commerce) it give all results for category (not set), how can I verify if the Enhanced is up ...
0
votes
2answers
65 views

Magento 2 - List child SKUs of category on category page

I hope someone can help - editing the Magento_Catalog/templates/product/list.phtml most likely buy inserting a new phtml file, how can I list all of the child SKU's of the parent category on the ...
1
vote
0answers
26 views

Search not only by product name / description

I want to show product that the category name is "Watches", but the only result I have is the product with "watches" in the name or description. How do I show product that the category is "Watches"?
0
votes
0answers
61 views

Magento2: How can i override UI componet

I want to override this file : vendor/magento/module-catalog/Ui/DataProvider/Product/Form/NewCategoryDataProvider.php How can i do this? just want to change 'include_in_menu' => 1, to 0 . ...
0
votes
1answer
9 views

Magento 2 Error “URL key for specified store already exists

Basically i am adding a custom category the problem is when i add two child category with same NAME in to one parent category where child category is already present then this shows error of URL KEY. ...
0
votes
1answer
177 views

magento 2 .Product Fields Auto-Generation / category Fields Auto-Generation, /meta tag description

Prepare Dynamic Solution For, If product having no title, meta description as per the images then it will going to get the data from system configuration. If category having no title, meta ...
1
vote
0answers
19 views

How to add category Path when creating product progrmatically in magento 2

I want to create products programatically by reading an xml file. Reading from xml, and creating product part is completed. I have no idea how to assign the products to category. This is my xml node ...
2
votes
1answer
47 views

How layer navigation counter works in Magento 2

I want to add some conditions for the layer navigation counter. Basically I want to skip from counting some products. In vendor/magento/module-catalog-search/Model/Layer/Filter/Category.php in ...
2
votes
2answers
592 views

magento 2 Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string

In custom theme And category page show this error- Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string, null given, ...
1
vote
1answer
43 views

How do I add custom content at the bottom of the product category page?

My B2C has different product categories. I want to add some custom content at the bottom of each product category page, such as: text, banner image. I know that the product category is the same module ...
1
vote
0answers
14 views

SEO category path [closed]

Which is the best one and why? www.example.com/women/pants (used by ASOS) www.example.com/women-pants (used by Zalando)
0
votes
2answers
120 views

How to create category attribute of type int in Magento 2?

I am using Magento 2.3 I have created the Custom extension for category attribute "Popular category" and I have installed this extension successfully but the issue is I have set the default value as ...
4
votes
1answer
153 views

How to set cms block to category in Magento 2 programmatically?

I would like to add CMS block to a category programmatically, how to achieve it?
0
votes
0answers
117 views

Could not save product “” with position 0 to category - Magento 2 [duplicate]

I have gone through all the links as possible..but i don't find any solution for this.. From this Link ..its already fixed in 2.2.4 My current version is 2.2.7 and still i am facing the issue.. ...
2
votes
2answers
112 views

How to filter category collection?

I am trying to fetch all categories with filter, but it throws following error : 1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Catalog\...
2
votes
1answer
46 views

HTTP 500 error with a php script

The following piece of code provided by SuperDicq Remove products from all categories when price is zero) gives me a HTTP 500 error, anyone knows what's wrong? I changed the name of htaccess, put ...
2
votes
0answers
59 views

Magento2 Admin Backend Category Brand Sort Order changes like A…B…C..D…E..F First A Second B Like that [closed]

Magento2 Admin Backend Category Brand Sort Order changes like A...B....C..D...E..F First A Second B Like that Give ME Answer Emizentech ShopByBrand plugin i will be used Emizentech\ShopByBrand\...
3
votes
0answers
67 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(), '...
1
vote
1answer
35 views

i add to custom filed in category form for upload image but facing issue that i mention below

string category Menu Image true fileUploader ui/form/element/uploader/uploader ...
1
vote
1answer
47 views

How to override top menu css in Magento 2?

I want to override top menu CSS and replace it with my own CSS. I don't know which CSS file is responsible to display top menu. I only need to override CSS and don't want to make any changes to ...
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 ...
1
vote
1answer
167 views

How to Display Vertical mega menu in Magento 2?

I want to display a vertical menu instead of the default horizontal menu for category and subcategory
1
vote
1answer
65 views

Magento 2.3 - Get child categories of parent

In Magento 2.2 I've written this little script. /** * Index constructor. * * @param Context $context * @param StoreManagerInterface $storeManager * @param ...
3
votes
2answers
259 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: $...
0
votes
0answers
31 views

Magento 2 Bulk API Store set for categories

How can I set a store_id for categories using the \Magento\AsynchronousOperations\Model\MassSchedule::publishMass I want to update it's attributes but the store_id in ...
0
votes
0answers
24 views

How to generate summary on category description in CMS page Magento 2?

I have a category that has 13 child and every subcategory have description and image so is there a dynamic way to generate a summary in the page of parent category page like here: https://www....
2
votes
0answers
40 views

Solved: Layered Navigation of Parent Categories

The layered navigation of the Child Categories it's working okay. The problem is with Parent Categories. I'm trying to have the same filters on Parent Categories but i still can't solve it. What I ...
2
votes
2answers
56 views

Magento 2 - Best way to check if the current category is child

I want to change the design of my store depends of the categories and subcategories. I need to check if the current category is subcategory and if is subcategory then display something there. I ...
1
vote
0answers
24 views

magento 2 seperated parent and sub categories dropdowns

I want to show different input dropdown that seperate parent categories and subcategories. Indeed, the first dropdown shows parent categories, the second dropdown empty at first sight, then loaded ...
1
vote
1answer
96 views

magento 2 Deepest Category product list page gives Error 500. Which files to inspect?

The site I'm working on the lowest category page (suppose to be list view) give the error 500. I'm not quite remember file I edited. search result also return the same error. Which files should I ...
2
votes
1answer
455 views

Magento 2 Category page add custom view mode

On category page I want to add addition view mode as "expand" with "grid" and "list" mode. If any one has created custom view mode for category page then help.
1
vote
0answers
77 views

Magento 1 : How to add custom filter in list page like price or name?

I'm building the frontend of the category page, among the filters that I have to create custom filter. I have no problem taking the data and having it available in the ...
0
votes
0answers
17 views

getCurrentCategory() returns Root Category every time on Magento 2

I detected that some categories on my site don't show the correct products. Instead, show ALL products assigned to the root category. I made a test adding this to my list.phtml: $block->getLayer()-...
2
votes
1answer
600 views

Get category name by ID

This is my Vendor/Module/Block/BlockFile.php <?php namespace Vendor\Module\Block; class CategoryList extends \Magento\Framework\View\Element\Template { public function getId() { return ...
5
votes
3answers
181 views

Get category id

How can I get ID from this code which is typed into CMS page content? {{block class="Vendor\Module\Block\CategoryList" category_id="49" template="Vendor_Module::subcategorylist.phtml"}} I need to ...
0
votes
1answer
84 views

How to display data using block code?

This is my code: app/code/Vendor/Module/view/frontend/templates/storecategories.phtml <div> <h3> <a href=""> <?php $categoryId = 65; $_objectManager =...
0
votes
2answers
436 views

How to get all the Children Categories IDs of the Specific Category in Magento2

I want to get all categories of the specific category for that I tried public function categoryHide() { $data = $this->arrayData(); $save = array(); $objectManager = \...
0
votes
1answer
94 views

How to display categories and subcategories using category ID?

I want to show root category with it's child categories on home page. I've done my code so far, but nothing happens. Vendor/Module/Block/CategoriesCollection.php <?php namespace Vendor\Module\...
0
votes
0answers
129 views

some category image not showing magento 2

My Code is $_obj = \Magento\Framework\App\ObjectManager::getInstance(); $category = $_obj->create('Magento\Catalog\Model\Category')->load($cat_id); $fullCategoryPath = $category->...
1
vote
1answer
39 views

Magento 2: Current category not found

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');//get current category I have a ...
2
votes
0answers
44 views

Magento2: Class not found error

Product category page is not working. My Magento v2.0 Got the error below. use Magento\Framework\EntityManager\MetadataPool How can I solve the issue. ?
2
votes
1answer
150 views

Apply catalog price rule on all products of one category

i have different cataloge price rules for different products of different categories. Now i want to add a new minus discount to a category with 60 products (-5%), which i implemented successfully. ...
2
votes
2answers
82 views

How to make a Category parent link not cliquable and just the subcatgories cliquables M2

I have a category with id =41 and have 2 child i want to see the parent category and her child but just make the parent category link not cliquable any idea please and thanks in advance
1
vote
0answers
147 views

Magento 2 move page main title into div with product_list_toolbar

I want to move the page main title on the category list page into custom div and also include the product_list_toolbar into that div. The problem I face is that I can not simply move the ...
1
vote
0answers
10 views

How to Apply shopping cart rule for group products if there child products are not in same category in magento 1.9

I want to apply shopping cart price rule on category but that category have group products and there child products are not in same category. when i apply rule on group products then after i add ...
2
votes
0answers
101 views

Magento 2: How to add quantity field in category page [duplicate]

I need to add quantity box in category page. your help will be greatly appreciated
0
votes
1answer
44 views

Blocked mixed content error in console when I try to edit a product in my magento

When I try to click next product page in my magento admin panel, The loading never stop and when I go to console, it says like this.: I tried using, firefox,chrome,safari but same problem occurs. I ...
0
votes
0answers
66 views

Magento 2 - Dynamically hide empty categories based on attribute selected in a cookie

I'm trying to hide empty categories based on an attribute selected previously. Basically I have a vehicle parts website and a customer can choose a vehicle model and I've changed the products ...