Questions tagged [category-tree]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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: ...
9
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.
2
votes
0answers
60 views

Category tree generating takes too much time

StackExchange! I've faced big problem with category tree generating process. I run $flat = Mage::getResourceModel('catalog/category_flat'); $categories = $flat->getCategories($parentCategoryId, 4, ...
2
votes
2answers
3k views

Display categories and sub-categories

I'm tryng to display categories and subcategories on a cms page <?php $categories = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToSelect('*') ...
1
vote
0answers
288 views

Magento 2 custom EAV to category tree API

I have two custom field sw_menu_icon_img and sw_menu_icon_hover_img on Category in Magento 2 to store the menu icons. I tried to override \Magento\Catalog\Model\Category and \Magento\Catalog\Model\...
0
votes
2answers
35 views

How do I create a new URL with a list of existing products

I would like to set-up a new URL for my x% off beauty promotion. Currently, my beauty related products are housed under a combination of sub categories, so I'm trying to bring them all together under ...
1
vote
1answer
525 views

After upgrade from 2.0.6 to 2.1.2 no products show up, all categories are empty

Im sure this question has been asked, but there is no answer, and now it is critical that i upgrade from 2.0.6 due to the new advisory. I have tried several different ways to upgrade, via cli with ...
1
vote
1answer
450 views

Magento2 Using 2 different layout for 1st level vs 2nd level category

I will try to explain as best as I can. I found a few posts here but I didn't see one that explained what I wanted to do. There are 3 different layout that I'd like to use. First level category ...
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 ...
0
votes
0answers
319 views

Add Category Tree to mass update product functionality

I need to add Category option to mass update product functionality as shown below As these three are being added from htdocs/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/...
2
votes
0answers
121 views

How to get category tree with selected permission to user in custom module?

I have created category tree in my custom admin form. Now If i give role to user to view only selected category in custom category tree. How to show permitted category in custom category tree in ...
3
votes
2answers
389 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 ...
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.
0
votes
1answer
12 views

Magento Categories Out of Wack

I'm having an issue with Magento 1.9.2.0. My categories on the left margin are lined up correctly, but not on the main page. Take a look at this URL - http://tinyurl.com/huz6rnq and notice how the ...
2
votes
2answers
979 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 ...
0
votes
2answers
15 views

showing child categories database issue

i have a real strange one here. i have 3 environments a dev a stage and a production. exact same codebase on all three. on my dev and production boxes my categories on the left hand nav display ...
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, ...
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); $...
0
votes
1answer
102 views

Call children of children Magento

I have a parent category (ID 10). I'd like to call the children of category ID 10's child categories. As per example below, is there any way to do this? Parent Category > First Level Child > I want ...
0
votes
1answer
52 views

Sorted subcategory list with thumbnails

I have the following block: <div id="home-subcat-container"> <div class="wallcontainer"> <?php //gets all sub categories of parent category 'Brands' $cats = Mage::getModel('...
1
vote
2answers
368 views

No Category hierarchy only root catalog when changing product information

I am working on a webshop in Magento. When I try to change an existing configurable product to another category, I only get to see Root Catalog: This is kind of awkward. As I CAN choose other ...
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 ...
0
votes
2answers
33 views

Community edition, home screen show category list

Can anybody tell me if its possible to view my all my categories in the left column on the home page? Being searching and trying things for a while, but still have not being able to get it working. ...
0
votes
1answer
465 views

Subcategories are not being displayed in the backend

I have a website named vintagecarradio that runs on Magento. It has been great to manage such a large store on this platform. However, everything was fine a while back but from a few days I have ...
2
votes
1answer
1k 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 ...
0
votes
1answer
32 views

Products Category Tree - Product Quantity Inconsistencies

I've faced a strange situation in magento admin and haven't managed to find a proper answer for the issue. Here it is: As you can see for some reason numbers in brackets have completely no sense. ...
1
vote
2answers
208 views

All Categories with filter

I have searched many time for this problem, but I have not found a solution for this feature. I will show all available categories from specific store view as a list on a single page. The feature now, ...
0
votes
1answer
2k views

Disable product url without category path (SEO)

When I set the option Use Categories Path for Product URLs to Yes, the product-URL changes to the one with categories path. Thats what I need. But in that case the product is also availible trough ...
0
votes
1answer
228 views

List Categories on a CMS Page A-Z Style

I am looking to achieve a brands listing page, listing brands (held as categories) alphabetically with a sub-group for each letter. For example, Adidas, Asics etc. would all appear under 'A', Barbour, ...
0
votes
1answer
32 views

Subcatecory listing how to center [closed]

We have add subcategory listing in home page, see picture: The all menu is centered to the complate page, it is possible to center the 3 subcateogry, see picture: We can provide css and/or phtml. ...
0
votes
1answer
91 views

Level 4 category URL redirects to Level 3

In some categories of my Magento webshop I have 4 Levels in my menu. The problem is that every Level 4 category menu item is being redirected to the Level 3 Menu item on top. I've already tried empty ...
0
votes
1answer
333 views

SQL Category Name Tree Query - no write access

I need to query our Magento 1.9 installation for a list of category names with full parent/child paths - this is not the request path, I mean the full branch from the category name tree. I've seen a ...
0
votes
1answer
467 views

How to save multiple categories in magento 2

How to save multiple categories. For a single category using the method save. Ejm.: Save category1, category2, category3, ... category100. How to save 100 in 100 categories.
1
vote
4answers
1k views

Display parent category products in subcategory page

Let's say I have a simple categories tree like this one : Category 1 Subcategory 1.1 Subcategory 1.2 ... Subcategory 1.675 Some products should be visible for all subcategories, without having to ...
0
votes
1answer
2k views

Magento 2 - Retrieve categories

I'm trying to receive all children categories from a root categorie. I have flat categories enabled. The problem is that this categorie is not my store root category. I have a main menu (store root ...
0
votes
2answers
1k views

List Categories in a CMS Page

Can anyone advise how to list categories in a CMS page? For example, we have a category for each brand in our shop. I would like to list them all in a single CMS page. I realise I could do this using ...
1
vote
1answer
46 views

Need help with categories system, nav and layered nav

I am setting up an online store for a company that sells vinyl records on magento. I want to have an option on my main nav at the top that says 'genre' with a dropdown to every genre where each ...
2
votes
1answer
439 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
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
1answer
49 views

Manufacturer tree structure

I am searching for a way to make a brand tree. I want to have a Manufacturer -> Brand -> Product line For every single level I need to store a description and logo. Task will be easy to ...
1
vote
1answer
5k views

Get category tree as an assoc array

In my magento, I have the following category tree structure like this (note: only a few categories has been expanded): I would like to generate an array that looks like this: $categories = [ '...
1
vote
1answer
17 views

Mass Upload of Categories

I have around 100 new categories to add to a website, ideally I'd like to go about it as efficiently as possible. Is there any way or perhaps a free extention that will allow adding of new categories ...
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 ...
1
vote
1answer
935 views

Magento Multi-store Products not Displaying

I have setup two store fronts in Magento as domain1.com and domain2.com. Everything seems to be set up properly as changing the domains will display both different themes and different categories as ...
1
vote
1answer
362 views

Excluding one or more subcategory in a Category Page that displays Subcategory list

I have the following code that will display list of subcategories in a category page and I want to exclude several subcategories from displaying but is active in the Navigation Menu. Category Tree ...
2
votes
2answers
1k views

Magento Create Category Tree Structure [duplicate]

I am working on script which is used in outside of magento. I am using this link for creating category tree structure but it gives me only those category collection which are active in admin section ...
1
vote
1answer
334 views

How do I make my category sort orders keep from reverting to different order in admin view?

I am using Magento 1.9.2.1. When I am in Catalog/Manage Categories I am finding that the sort order that I am dragging my categories into is not staying the same. I have caching disabled as this is a ...
4
votes
1answer
136 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); ...
0
votes
1answer
241 views

List of Category IDs in order

I have this code for getting a list of category IDs: $categoryModel = Mage::getModel('catalog/category')->load($id); $allCategoryIds = $category->getResource()->getChildren($category, true); ...
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 ...