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
17
votes
0answers
564 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
27k 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, ...
9
votes
1answer
3k 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.
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 ...
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
9k 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
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 ...
4
votes
1answer
692 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
137 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
63 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
230 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
259 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
1k 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
205 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
603 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
240 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
383 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
29 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
1k 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
423 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
7k 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
202 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
3answers
6k 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
6k 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
1answer
2k 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
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
120 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
451 views

Magento 2 Add category chooser without UI component

I am trying to add category chooser in my custom admin form without ui component but unfortunately I am getting error in system.log [2019-03-22 09:27:47] main.CRITICAL: Vendor\Module\Block\...
2
votes
1answer
1k 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
4k 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
132 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
2answers
60 views

Magento 2 : Get category level

I want to get the category level in product/list.phtml to check if (categorylevel == 1) { hide product list }else { show product list } How can I do that? Any helps? Thank in advance.
2
votes
1answer
64 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
475 views

How to move category to another parent category magento 2.1.8?

I want to move a category from parent category to another parent category. category Drag and drop from admin is too slow. So how can I do this using code?
2
votes
2answers
667 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
45 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
449 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
33 views

How to get the categories child category list per store in magento2 rest api

I need to retrieve categories and child-category list per store. I have two store have store code grocery and fruit.
2
votes
1answer
1k 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

1
2 3 4 5