Questions tagged [category]

Questions about product categories in the Magento catalog

1
vote
2answers
170 views

Magento 2: Category URL for frontend

I have created a root category with name colors in Magento 2. I am trying to access this category by URL http://domain.com/category/colors.html in front end. But its not working for me. What will the ...
0
votes
0answers
18 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
39 views
2
votes
1answer
18 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 ...
3
votes
1answer
907 views

Magento 2 : How to write controller to load category page?

I have customized a Layered navigation modules in Magento 2. However, I can't write a controller to get all content of category page and load into controller page(localhost/magento2/layerednavigation/...
1
vote
1answer
825 views

Product not display in product list page

I have added products and set quantity is more than zero and stock status set to in stock and products also assign to specific categories but product not display in product list page.
3
votes
2answers
282 views

Magento 2: How to generate category url with underscore?

I am importing categories from external script. All working fine with import. But with URL KEY Magento is changing value automatically. And I want the url same as I am passing from script. 1) ...
1
vote
0answers
23 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 ...
1
vote
0answers
15 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
21 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://...
0
votes
1answer
911 views

Magento 1.9.1 - Unable to edit (click) URL Rewrite fields in backend

I'm trying to edit (or redirect) some category menus to other categories. Example, I have two sub-categories called "Compression Wear" (id 60 - /compression-wear.html) AND "Compression Wear" (id 67 - /...
0
votes
3answers
934 views

If the current category ID exists in this array of IDs, then show something

I'm new to Magento, and I would like to know how to add a condition like my title above. If the current category page is 3, or 4, or 5, or 6, then I need to show something. Provided that _category ...
3
votes
0answers
26 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 ...
0
votes
0answers
9 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
0answers
18 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
53 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 ...
4
votes
1answer
36 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...
0
votes
2answers
37 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 = $...
2
votes
1answer
952 views

How to Create a Dynamic Drop Down list in Magento 2 using AJAX

I am working on year make like module in magento 2.In that module there will be dynamic drop down list in the front end. When some one will select a category from the first option the next option ...
1
vote
3answers
4k views

Magento 2: Display Custom attribute value under the product name on category page

I want to display custom attribute value under the product name on category page. Attribute type is dropdown and attribute name is Brand. I want to display the brand name under the product name on ...
1
vote
1answer
372 views

Jump to an anchor after “Sort By” is changed on category page in Magento 2

I'm developing a custom theme where the category page starts with some content and the list of products is below such content. I would like to keep the view anchored to the product list when the user ...
1
vote
0answers
31 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
535 views

Product category update issue in magento2

I am updating product category from admin.. getting below error. "Could not save product \"41859\" with position 0 to category 8", Referred this link as mentioned it is fixed in 2.2.4, How to solve ...
3
votes
2answers
2k views

Unique constraint violation found - When remove suffix .html - Magento 2.2.0

When I try to remove the .html suffix from category, Magento 2.2.0 gives me this error. Has anyone else ran into the same problem? How can I resolve it? Thank you
0
votes
1answer
920 views

Displaying all the Product of a Category in Magento 2

how to display all the products of a category in a phtml file using an external file in Magento 2
2
votes
0answers
33 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 ...
2
votes
1answer
2k views

Magento 2: Get root category ID programmatically in backend

How can we get root category ID (Default Category) programmatically in backend ?
0
votes
1answer
22 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
32 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
1answer
23 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 ...
0
votes
1answer
1k views

Magento 2: Set category image programmatically

How to set category image programmatically, which shows on list page? I found several solutions on the web but could not solve my problem. I am confused among these functions setThumbnail(), setImage()...
2
votes
2answers
64 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
1answer
1k views

get category image

I am trying to fetch category images next to product title. Problem is that below code works weird. I am able to get url of image, but sometimes url is not reachable therefore img will not show up. ...
0
votes
2answers
30 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
3answers
336 views

Magento 2 - Categories not display when Page Cache is on

I have a very strange issue on Magento 2.2.2, if I enable the Page Cache (Full page caching - FPC) the top navigation is not display anymore. What I can do? Thank you
3
votes
1answer
680 views

Magento 2 Import categories using csv

I have around 500+ categories in my csv. I'm trying to import only categories using csv. Can anyone knows how to import only categories in magento 2 using csv?
7
votes
2answers
163 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\...
2
votes
1answer
955 views

Drag and drop category error

I get There was a category move error. on moving(drag and drop) subcategory to another root category. How I debug this? on console I get Expected to start loader but did not find one in the dom this ...
1
vote
2answers
65 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
1answer
33 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
1answer
18 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
2answers
1k views

How to reset the category ID's count # for Magento 2.x?

I'm using a 3rd party plugin to setup our production website in a test/dev environment. It allows export/import of the categories, excluding the Category ID's (which are automatically generated). As ...
0
votes
0answers
10 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/...
0
votes
3answers
618 views

data scraping for categories and products

I want to scrape a data from one of ecommerce website. Where i want to pull all categories and products details. What will be the best method to do it?
1
vote
1answer
1k views

Fix Category Url Filter in Magento 2 Layered Navigation

By default in Magento 2, the category links look like this They lead to ?catId=xxx, instead of the better SEO friendly links, like the product name. I found a solution for this issue, but it's for ...
1
vote
1answer
23 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
28 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"> &...
2
votes
1answer
42 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="...
0
votes
0answers
17 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 =...