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

0
votes
0answers
7 views

Magento2: How to build a custom category link widget with attributes?

I'm trying to build a category link widget similar to the core one, but that can pull in additional information from the category selected, such as the image thumbnail and maybe some custom category ...
0
votes
0answers
9 views

How to get category image based on category ID?

I am trying to get an image which is uploaded for the category. & also I have category id and want to load complete details of that category based on category ID. How can I achieve this?
1
vote
0answers
13 views

how can we add multi level of categories programmitaclly?

I have CSV file with categories data in parent child level. How can we add multi level of categories programmitaclly ?
5
votes
2answers
62 views

Magento 2 Get Full Category Path for product

How to get full category path in Magento 2? For example Home > Women > Dresses > Maxi Dresses I am developing script for Google Shopping Feed and there is a node product_type which is require ...
0
votes
1answer
13 views

Magento 2 : Add category filter in producy grid

In admin, I want to add column of category and also add category filter in product grid. How to do this? Please help me. Thanks.
0
votes
0answers
15 views

Product position in category magento 2.2.5

I've got problem when i want to set position in Catalog << Categories << Products in Category. For example i set the position item from 0 to 20 and save changes. After the changes are ...
0
votes
2answers
30 views

How to get a each product id in category page in Magento 2?

How to get a each product id in category page? I need to get the product id in custom module template file.
0
votes
1answer
20 views

Auto-expand subcategories in product form

I have a category with subcategories, and I want to have the subcategory visible from the beginning, when the user opens the category selector. Currently, the user has to click the arrow next to the ...
2
votes
0answers
25 views

Can't save value in custom field /admin/catalog/category

I have added a custom field in admin category. I need to save and get value of my field using observer. My Xml file is "category_form.xml" <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
1answer
16 views

Category name on product url still working after “Use Categories Path for Product URLs” set to no

"Use Categories Path for Product URLs" set to no on admin panel But everytime I create a new product, it creates rewrite also for category/product url So both of them work: example.com/category/...
2
votes
1answer
26 views

Display sale badge on PLP

I am trying to display a 'Sale' badge on product category pages if the products have a special price. Though the isn't rendering anything. <?php if (_$product->getPriceInfo()->getPrice('...
1
vote
0answers
22 views

Magento 2 : Need to set custom category collection using plugin

I want to set custom category collection using plugin. I created plugin about Magento\Catalog\Block\Product\ProductList\Toolbar this block and aroundSetCollection(). But, not actual output I received....
0
votes
0answers
37 views

Some 3rd level categories are not showing in filter in magento2

I have Category relationship like below. Test>Sample>Men (200 products here) Test>Sample>Women (8 products here) Test>Sample>Others (10 products here) When navigated to Sample category. In left ...
0
votes
2answers
36 views

For Magento 2 not show some category on frontend for not logged in customer, once customer logged in it will able to see that category on front end

For Magento 2 not logged in customer not able to access selected category any way in store Ex. url, menu, search etc , once customer logged in it will able to see category and its products. can ...
2
votes
1answer
29 views

Getting Custom Image Attribute in Frontend

I've followed a tutorial found here: https://webkul.com/blog/add-custom-image-attribute-category-magento-2/ With a slight modification which can be found in the InstallData, where I specified '...
0
votes
0answers
19 views

Magento2 Which table store category ascending order or descending order store category

My project category and sub category I have set ascending order or descending order store category via script or sql query. Magento2 Which table store category & sub category ascending order or ...
0
votes
0answers
25 views

Condition on Category Filter in New Product Page?

I have save unique id with each category save when any category save then current admin id is also save with it. Now i want to apply condition in the New Product Page when any admin want to add any ...
0
votes
0answers
7 views

Can we show partial category's on two different website in magento 1.9?

Can you please help me out to set partial category display on two different web-site in magento 1.9?
0
votes
0answers
16 views

Magento 2.3.1 Multiple categories showing active, How to remove duplicate active class?

In my instance, I have updated Magento 2.3.1 from 2.3.0. I have an issue that more than one categories are showing active on each page. it shows randomly selected more than one categories. How ...
1
vote
0answers
23 views

Magento2: Minicart issue on Custom layout

I am using a custom layout for the category page. Here is my code: app/code/Custom/Module/view/frontend/page_layout/equipment.xml <?xml version="1.0"?> <layout xmlns:xsi="http://www....
0
votes
1answer
16 views

Products not appearing in the catalog - Reindex not adding records

When I add products to a category through the admin pages, the product is not showing up on the relevant category page. Ive have searched for an answer for this extensively and carried out all the ...
0
votes
0answers
28 views

can't save new category in magento2 admin panel [duplicate]

Magento2 admin panel adds new category save then error show. "Something went wrong while saving the category." So give me a solution.
0
votes
1answer
30 views

Set cookie in Observer Not working when full page Cache is enabled

I have to set category id in cookie when customer go to Category page and update cookie with category id when visit again using seperate module. I have created Observer and set cookie there but not ...
1
vote
1answer
41 views

Magento 2 : product collection ASC sort by category

I want to sort product collection by category ids. I used this below code. What i need to add in this code ? /** * @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory */ protected $...
0
votes
0answers
15 views

Magento 2 admin panel add new category error Integrity constraint violation [duplicate]

Below error when Magento 2 admin panel add new category [2019-04-08 22:36:22] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: ...
0
votes
0answers
9 views

Magento Category Structure - How to handle category taxonomy like modern e-commerce sites

I hope this title isn't misleading and properly describes what I am wanting to do. I am also seeing insight from the community for the best way to accomplish the end goal that I want for Magento ...
0
votes
0answers
14 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
12 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
42 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
18 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
83 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
26 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
41 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
17 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
28 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
22 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
41 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
17 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
29 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
14 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
28 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
8 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
78 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
14 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
38 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
75 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
34 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
13 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
54 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 ...