Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
0
votes
1answer
266 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
0
votes
0answers
13 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 ...
0
votes
0answers
35 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 ...
2
votes
0answers
148 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":"[...
0
votes
0answers
34 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
185 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.2 - Layered Navigation for Custom Product Collection

I am trying to use my custom product collection for layered navigation in Magento 2.3. But products list are 100% correct but "The layered navigation still displays full collection." Any solution and ...
1
vote
4answers
90 views

How to Check a catagory is Anchored or non Anchored Programmatically in Magento 2

I want to check whether my current category in Anchored in Magneto 2
2
votes
1answer
22 views

Two item category coupon code with fixed amount for whole cart

Magento version, 1.9.2.4 How do I generate a coupon where a person puts in there cart one item each from two different categories and then gets a fixed discount off the whole cart. But, if only ...
1
vote
0answers
20 views

How To change Position Of category Using Query in magento2? [closed]

How To change Position Of category Using Query in magento2 ? ->Magento@ admin Side Default category Position change Drag and Drop Through. But but i have to use it code for the changing postion of ...
1
vote
1answer
27 views

Single url for a product which is in different category in magento 2

I have a product black-jacket under the category men->tops when i click on men the url is like http://magento2/men/black-jacket.html and if i click on tops under the men then the url is http://...
4
votes
1answer
36 views

Magento 2 - All Products Page with filters and Pagination

I need to create a page where product collection from all categories or you can say from root level category (Default Category) generally it has id 2. I need to make sure that the page is look like ...
1
vote
0answers
28 views

Problem With Recursion (categories and subcategories)

I'm testing a code from the answer by @digitalsteez on this question: Get Categories and Its Sub Categories I've tested it onto two Magento instance, one has no problems but on the other I'm ...
0
votes
0answers
58 views

Magento 1.9 Category wise shipping charges

For my Magento 1.9 website I want to set a feature to add specific Flat rate postage and packaging for categories. I have check in the Magento backend but there is flat table rates setting ...
0
votes
0answers
72 views

Products in wrong categories

I got into a strange issue. I noticed some products were displayed in wrong categories. I first thought it was some mistakes made by me or my colleagues when adding/editing products, so I edited those ...
0
votes
0answers
11 views

Drop down menu in form dissapear

In this page and some others with the same category, there is a special form that you need to fill out in order to book the item (Click the orange button that says "Book Now"). Before, in the item ...
0
votes
2answers
68 views

I need to filter product collection by category id and color attribute

I need to get product collection by category id and color attribute. But It's not working. Here is my code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $categoryFactory = $...
4
votes
1answer
77 views

How to sort the subcategories of specific parent category in magento 2.3 programatically

I have the parent category "XXX" and having around 115 subcategories under the same. I am trying to sort the subcategories listed under of specific parent category at the backend...
1
vote
0answers
49 views

“Requested store is not found” error in Magento 2.2.7 while opening categories from admin dashboard

I am getting an error while trying to open the categories form catalog in the admin dashboard. I have migrated the data from Magento1.9.2.0 to Magento2.2.7. Getting this in error log. "{"0":"...
0
votes
1answer
76 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 ...
2
votes
0answers
41 views

Magento 2: Use Categories Path for Product URLs is not working

I have two products having the same attributes as categories, attribute set, etc. And I have set Use Categories Path for Product URLs as NO but still, one product has the category in URL another don't ...
0
votes
1answer
161 views

How can I add a column to Category -> Category -> Products in Category grid in magento 2

I would like to add an extra column based on a product attribute <my_attribute_code> in the product grid that appears when editing a category in the section "Products In Category" ideally ...
1
vote
0answers
76 views

level 2 menu is not collapsing on mobile (Magento 2.3 Parent theme-Luma)

I have created a three-level menu using Magento Admin It works great on desktop. But the third level menu is not collapsing on mobile view. Please check the image. Yellow highlighted links are the ...
0
votes
2answers
56 views

Magento2 : Get Category Ids from product import csv

product import csv containing category data which is given as below Default Category/Diagrams/Business,Default Category/Diagrams/Strategy,Default Category/Diagrams/Planning,Default Category/...
0
votes
1answer
74 views

Magento2: Add product to parent and child categories on import

I am trying to import products in Magento2.2.5 Products have many categories : e.g Default Category/A1/A2/A3, Default Category/B1/B2/B3 When i check the product configuration, the product only has A3 ...
1
vote
1answer
26 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
1answer
20 views

Assign related products from categories (Magento 1)

We have a magento store and we have over 1000 products listed. We want to assign random related products, but they should be within the category. For example, if a product is listed under Men >> T-...
0
votes
1answer
35 views

Magento 2 delete specific product categories

how can I delete specific categories for a product in Magento 2.Forex: I have a product with a,b,c categories, I have some conditions if the conditions meet my categories remains same but if those ...
0
votes
0answers
14 views

Category attribute's value does not get updated when in store emulation mode

I am trying to update some category attribute's value for a specific store, and i need to do it in emulation mode. So i do something like this: $appEmulation = Mage::getSingleton("core/...
1
vote
1answer
24 views

Product Category is not displaying in front end in magento 1

I have created a new category in the backend. But it is not automatically showing in front end.
0
votes
0answers
18 views

Getting all store categories into first store

I have created a multistore website and after that create root category for all different store, When I try to get store vice category I am getting all store categories into the first store $storeId =...
0
votes
0answers
30 views

Magento 2 - Hide or remove category form after verification on admin

I want to hide OR remove category form after a verification So, I succeed to hide it by creating category_form.xml on view\adminhtml\ui_component <fieldset name="general" sortOrder="5"> &...
3
votes
1answer
129 views

magento 2.3.1 “Catalog Category Link” widget blank

I am trying to use the following widget: {{widget type="Magento\Catalog\Block\Category\Widget\Link" anchor_text="ewrrewq" title="rqewrqrq" template="category/widget/link/link_block.phtml" id_path="...
7
votes
2answers
181 views

How to show Categories in System.xml in magento 2

I'm getting all the categories in System.xml using the class Vender\Module\Model\Config\Source\Category <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Data\...
0
votes
0answers
21 views

Always Showing Layered Navigation

So I've extended the Layered Navigation to include a few extra option collectables that are always there, regardless of filters applied. I would like to have the Layered Nav show up on all category ...
1
vote
1answer
42 views

How to create Admin-User for (Role) specific category-only access in magento2, It Possible or Not?

I have Created two-stores, And I have Add two Root-Category , But I Need to Create Two AdminUser for make(Role to) access for specific one-Store Category. Example (AdminUser A)-> Specific access ...
1
vote
0answers
21 views

Product page and category page disappeared

Developed on developer mode and everything is OK, just set production mode, home page and admin panel is OK but category page completely disappeared and shows a blank page and also product page is ...
1
vote
1answer
280 views

Move static block on category page

I'm trying to have 2 pieces of static content on a category page. One directly beneath the category title and another below the product listings. I notice Categories have a "description" and support a ...
2
votes
0answers
31 views
2
votes
2answers
285 views

URL Rewrite Duplicates and Product URL

My headache begins with a common URL Rewrite issue. I am running Magento 2.3 and rely heavily on an extension called Firebear Import / Export to handle my suppliers CSV feed imports. Let's say in ...
1
vote
0answers
30 views

Magento2 Catalog Price Rule

Magento2 Catalog Price Rule Not Working when i create rule and click on save and apply rule not applied on Category without re-indexing my indexing is on update on save mode.
3
votes
1answer
167 views

Magento 2.3.0 TinyMCE removes anchor tag href suffix when used with {{store url=''}}

I am trying to add category link in the CMS block. <ul class="list-unstyled"> <li><a href="{{store url=''}}test-collection.html">Test Collection</a></li> </ul> ...
2
votes
1answer
103 views

Magento 2 - Multiple collection on same block

I have a block where I want 3 different collections with different category filters. I have created collection object in constructor like this: protected $collection; public function __construct( ...
2
votes
0answers
26 views

Error: getParentCategories() on null

I am working on my custom module where I added a button on Configurable products. The Content I was showing through button was by getting the Parent Category ID. The main issue I am facing is that ...
1
vote
2answers
311 views

Magento 2 categories backend error: Call to a member function getId() on null in /var/www/src/vendor/magento/framework/Data/Tree/Dbp.php:380

When I try to open Catalog->Categories in the backend, I get the following error: Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/src/vendor/magento/framework/Data/...
0
votes
0answers
29 views

Layred navigation display all sub level category for non anchor category

I came to know that magento layred navigation is only render first child of current category on layred navigation for non anchor category. File for non anchor category HTML render. vendor\magento\...
0
votes
0answers
24 views

How to create select form to choose categories in Magento 2.3.1?

I would like to create a search by selecting the categories in select form. So there will be four select forms and search button. &1 SELECT TYPE and there will be categories to select: ...
3
votes
1answer
48 views

How to get all categories in configuration (system.xml). magento 2

I'm getting all the categories in system.xml using <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Option\ArrayInterface; class Category implements ArrayInterface{ ...
0
votes
1answer
464 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
1answer
18 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?