Questions tagged [category]

Questions about product categories in the Magento catalog

0
votes
0answers
16 views

magento1 to magento2 data migration is done but when add category admin panel then error show

magento1 to magento2 data migration is done but when add category admin panel then error show "Something went wrong while saving the category." so give me solution like new category add into admin ...
0
votes
1answer
16 views

Issues with some URL's in Multistore Child Store

I have a store, mydomain.com, with a top-level category called Shop accessible via mydomain.com/shop. Its child store, which we'll call "new", is at new-mydomain.com. This sub-store also has its own ...
0
votes
3answers
48 views

How to get products of a category and all its subcategories by category id?

I am trying to get all products of specific category whether these products are directly listed in the category or in the subcategories under this specific category I really searched for this on ...
0
votes
1answer
29 views

File Upload as Category Attribute - Magento2

I want to create a custom attribute for Category, which is File Attribute. I want to upload any kind of documents in it. Like PDF,txt, doc, etc,. Anyone helps me to do that via setup Upgrade? Same ...
-2
votes
2answers
110 views

magento1 and magento2 which table to store all the category [closed]

magento1 and magento2 which table to store all the category .so which related table to store data like category and also give the different. Thank you, Your Faithfully, Mehul Kanjariya
1
vote
2answers
44 views

Get all simple products of a category including not visible individually products - Magento 2

I need to get all simple products of a category. By using the following code, I'm getting only products which has visibility of Catalog, Search but not Not Visible Individually products. $categoryId =...
0
votes
1answer
58 views

Unable to get Not Visible Individually products magento 2

I am using DI \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $collectionFactory in my class and get all products using $collect = $this->collectionFactory->create()->...
1
vote
0answers
23 views

alt tags for category thumbnails not working?

I am working on a Magento 1.9 E-commerce webstore and I am currently trying to add alt tags to the thumbnail images for my categories. I found the template file that seems to generate the category ...
1
vote
0answers
42 views

Add category attribute in collection filter (search)

I've created an attribute for my categories (it's displayed on back-office and I can save values). In sur php file Result.php for the research process, I want to add this attribute as a filter. how ...
0
votes
0answers
70 views

magento 2 how to redirect disabled product to category page?

I want to redirect disabled products to the related category page. I have tried discontinued option which is available in admin but it is not working. How can I fix the issue?
0
votes
1answer
52 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
26 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
35 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
18 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
37 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
112 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
17 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 ...
1
vote
0answers
39 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
1answer
261 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
38 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
64 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
71 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
106 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
57 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
38 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
51 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\...
2
votes
0answers
49 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(), '...
0
votes
1answer
30 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
43 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 ...
2
votes
0answers
25 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
58 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
45 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
81 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
26 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
23 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
36 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
40 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
23 views

Magento 2.2.5 product redirects to other category

I'm having a strange situation. When i select a product in my webshop, the category and breadcrumps are from a different category. Yes, the product is also available in this category, but i don't want ...
1
vote
0answers
19 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
64 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
265 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
44 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
279 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
162 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
33 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
187 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 = \...