Questions tagged [category-tree]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
23
votes
2answers
7k views

Add Category tree in custom extension

I am trying to add Category tree to custom extention, the category tree which is in one of the tab of edit product page
16
votes
0answers
497 views

Magento 1.9 Create new Magento Rest API to get category list

I am very confused about what kind of error I am doing to follow these steps provided here at the following link : Create new Magento Rest API to get category list in Magento After doing all ...
10
votes
2answers
2k views

Magento 2 : Show admin category tree on frontend

I want to display categories tree on frontend like admin default categories tree. Need to display category tree structure in my custom module and content area for frontend side. Any Help would be ...
9
votes
5answers
23k views

Magento 2 - Get Subcategories of Specific Parent Category

What I'd like to do is grab all of the child categories of a specific parent category. I'm assuming the best way to do this is by using the parent's ID and of those child categories that are returned, ...
8
votes
4answers
2k views

Magento 2 : Selected categories are not visible in edit form

Added category selector in admin form using ui component. The category ids are saved into the db as comma separated values. Now I want to display that categories in my edit form. This is my ...
8
votes
1answer
2k views

Magento 2 : How to add category selector on admin form?

I want to add a category selector on a new tab in my admin form. Please help me to do the same or provide me a suitable tutorial.
7
votes
2answers
2k views

Magento 2 Custom Module admin form category tree

How to get Magento 2 category tree in Custom Module admin form. I din't use UI Component I am using Main.php like this i am adding $fieldset->addField( 'label', 'text'...
6
votes
2answers
15k views

Get custom category attribute

In this class app/code/core/Mage/Catalog/Block/Navigation.php in this method: /** * Render category to html * * @param Mage_Catalog_Model_Category $category * @param int Nesting level number * @...
6
votes
2answers
8k views

Category Paths in Product URLS - Yes or No?

I've heard some conflicting opinions on whether having category paths in your product URLS is a good idea. An SEO guide I'm currently using suggests that Magento doesn’t support this functionality ...
5
votes
4answers
5k views

Get child categories tree when Flat Catalog Category is enabled in admin in Magento 2

How to get child categories from selected parent category when "Use Flat Catalog Category" is enabled? I need to create a small menu which displays all sub-categories of current category in a ...
4
votes
1answer
7k views

Magento 2 : How to display the category image in the topmenu

How to display the category image in the topmenu? I need to edit/overwrite the block file, but I can't get the code to actually extract the image.
4
votes
1answer
681 views

hide only some categories from layered navigation in magento

we are using custom theme and 1.9 version we have lot of categories in magento site. we have to hide some categories from "layererd navigation". for some categories we put "NO" for "Include in ...
4
votes
1answer
135 views

High memory usage of parent categories collection

I have a function which collect products parent categories: function getParentCategories($catId, $catsList) { $category = Mage::getModel('catalog/category')->load($catId); ...
4
votes
0answers
59 views

Magento 2 How to duplicate the category with same structure?

I want to duplicate the category with the same structure and data. How to duplicate child categories here? It is working correctly for a single category. In my controller file, I have the parent ...
4
votes
1answer
185 views

A-Z Category Listing Magento 2 Static Block

I am attempting to create a A-Z category listing within a static block, something like the attached image. The static block will be on the parent category, and the listing will show the parent ...
4
votes
0answers
226 views

Magento 2 Category Field in Backend empty, Index Table wrong?

I'm trying to add categories to my products via Admin UI but unfortunately, the field in the backend is empty and doesn't show my categories: I've had this problem since some weeks, but usually it ...
4
votes
2answers
987 views

how to add Category tree structure like product edit/add in custom module

I want to add category tree structure in my custom module like Product Edit/Add.
3
votes
2answers
135 views

Unlink and link product to category

Need a script where current existing products needs to unlink and link to other categories. let me know the process also
3
votes
1answer
2k views

Magento 1.9.2.4 - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' while saving categories

I got the below error while saving some categories(not all categories) 2016-12-14T12:56:58+00:00 ERR (3): exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: ...
3
votes
2answers
121 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 ...
3
votes
1answer
161 views

Get all 3rd level categories

is there any chance how to get ALL third level categories available? I have searched whole internet and found only getting categories based on parent category but it doesnt return whole store 3rd ...
3
votes
1answer
341 views

Issue - Multi-Store Category Disable Not Working

I have disabled one of my categories, but still the category display on my menu bar in the website. How can I solve this issue? Menu Extension : https://web-experiment.info/webandpeople-custom-...
3
votes
1answer
1k views

Magento 2 - top menu show from 2nd sub category

a client has now a shop with the following structure of categories: Base Shop --Menu 1 ---Sub menu 1 ---Sub menu 2 --Menu 2 --etc Normal magento would only show "shop" in the ...
3
votes
1answer
28 views

Magento 2: Can't select “categories” on cart pricerule

I have try to make a price rule in Magento 2. But I can't see the option "categories". Someone know where I can activate it? Or did i do something wrong?
3
votes
1answer
834 views

Category and sub category image widget

I tried to create category and subcategory image widget.I got first level of categories with category images. app/code/Customcategory/CatewithimgWidget/Block/Widget CatewithimgWidget.php class ...
3
votes
2answers
386 views

Root Catalog has a negative children count, how it is possible?

I've been playing with the Catalog classes for a while, deleting and importing root categories, subcategories, stores and store groups, and I just discovered that every time I delete a root category ...
3
votes
1answer
6k views

Magento 2 How to get category tree (collection) on footer

I need to display magento 2 category tree on footer and on some other places. I think best practice is creating a module and call it on desired block (place). How to do that ? I already created a ...
3
votes
0answers
1k views

How to add Category tree structure like product edit/add in custom module Magento 2 [Solved] [closed]

Hope you all doing well , i have solved the both Question posted by me . how to add Category tree structure like product edit/add in custom module How to add new category button in Custom Module ...
3
votes
0answers
197 views

Categories not visible while adding product [closed]

i have never face such issue before, i am not sure why is this happening. While adding product i am not able to access subcategories for one of the parent category. I am not getting any option to ...
2
votes
1answer
5k views

Magento 2 REST API returns only default category and its children

I am using "rest/V1/categories/" (Magento 2 Rest API). In documentation(devdocs.magento.com/swagger/#) it says "Retrieve list of categories" but it only returns default category(and its all children) ...
2
votes
3answers
5k views

How to get category tree in Magento 2?

I need to show category tree, just like in admin section, in my custom page. I viewed this solution in magento.stackexchange.com. It was good but limited to 2 levels of category. I need all the ...
2
votes
2answers
2k views

Display all the sub-categories in multiple <ul> tag

I have one main Category (View All Inventory) under which I have around 76 sub-categories. Right now it prints out all the 76 sub-categories in a single <ul> tag. <?php $_menu = $this->...
2
votes
3answers
109 views

Put products in all categories of the tree?

Suppose I'm creating a category tree with several levels, call them L1, L2, L3, L4. My inclination is to put products within the leaf node of each path through the tree. Where most of my products ...
2
votes
1answer
3k views

magento : get list of category with api

i want to get list of category and subcategory (name of category) in magento , i use this API : catalogCategoryInfo (SOAP V2) . i try to get Names of direct child categories but it return id of direct ...
2
votes
1answer
1k views

How to add multi-select category tree at admin end in magento 2?

I would like to display *Category Tree Names** in multi select field in magento 2 admin end? I have tried with below code but displaying only first cateogires could you please any one help on this? ...
2
votes
1answer
932 views

Add custom css class to each item in Topmenu - Magento 2

I'm looking for a way to add a custom css class to each menu item into the Topmenu. I already tried to it using interceptor method in Topmenu public function beforeGetHtml( \Magento\Theme\Block\...
2
votes
2answers
3k views

Add category tree structure in custom module form

I want to have category tree structure in my custom module form as shown in below image- i tried this link but no luck- Add Category tree in custom extension my module name is assel_po here is my ...
2
votes
1answer
131 views

Multi vendor + add product - force to choose only 1 category

So I'm trying to make it so that the vendors can only add their product to one category from the checklist category tree (I'm using CEDCommerce's multi vendor extension). I'm sort of new to Magento ...
2
votes
3answers
3k views

Magento category tree not showing all sub categories when adding a new product

Hello Everyone I hope you are doing well. I have an issue I need help with Please. I'm trying to add products to specific sub categories using Magento ver. 1.9.0.1 I've been able to do it with no ...
2
votes
1answer
2k views

order sub categories alphabetically

I have spent hours searching forums and trying several methods but cant get anywhere. does anyone know how to order all sub categories in magento to display alphabetically front end A-Z?
2
votes
1answer
56 views

Magento2: Intercept category moved inside tree

I am trying to intercept when a category is moved inside the category tree. At the beginning I thought to observe the event catalog_category_tree_move_after with an Observer class but I found that ...
2
votes
2answers
532 views

Magento 2: “There was a category move error”/“Something went wrong while saving the category”

We are experiencing issues when trying to move or save a category in Magento 2.1.8 Trying to move a category results in: There was a category move error. Whilst trying to save gives this error: ...
2
votes
1answer
44 views

Creating category from flat file csv and save in loop

I have csv flat file with the items and with the category and subcategories attached to this item. Using this file i have to create a categories tree. I have this piece of code: there is a loop here ...
2
votes
1answer
438 views

All the possible ways to export/import categories with ids

I am transferring my store to a fresh installation and I need to know, what are the possible ways to export all my existing categories with their respective Ids, description, title etc and import it ...
2
votes
1answer
1k views

Remove empty categories from magento menu

(Apologies for posting this here, and if people think this should be deleted, please do. I posted this question on stackoverflow, having completely forgotten this forum, which of course is more ...
2
votes
1answer
762 views

How to create the magento2 Mega drop down menu?

Creating mega drop down menu on magento2, able to get the data from the database product categories and subcategories
2
votes
2answers
971 views

Parent/child relationship in custom module [duplicate]

I am adding a custom "category" model with children items in my module. To add children I need to fetch collection from this "mycategories" module. How do I get a collection of categories when adding ...
2
votes
1answer
240 views

Programatically Updating A Categories Parent ID

I am currently in the process of reordering an entire category tree via an upgrade script. I am aware that you can update the parent ID via the following: $category->setParentId($value); $...
2
votes
1answer
447 views

Add category tree with checkboxes to the form

Is there any way to add a category tree with checkboxes to a form in the admin part? The form contains two other fieldsets, and the category tree must be added as the third fieldset. All information ...
2
votes
1answer
48 views

Subcategories in grid but skip one level

I would like to place my subcategories in a category page and I found many examples how to do this. The only problem I have is that I use an extra category that I would like to skip. So what I have: ...