Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
0
votes
2answers
322 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
50 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
40 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
393 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
464 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 "...
5
votes
3answers
249 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
50 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
50 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
28 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 ?
0
votes
1answer
345 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
39 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
1answer
197 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
37 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
426 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
29 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
113 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
21 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
35 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
40 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
29 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
70 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
77 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
95 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
134 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
54 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
108 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
255 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
92 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
65 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
92 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
30 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
21 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
37 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
15 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
25 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
19 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
184 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
212 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
22 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
43 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
409 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
413 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 3 4 5 6 7 49