Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
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, ...
3
votes
6answers
5k views

create category programmatically if not exist - magento 2

I have one custom table, that table have a column name category which contains the events category like entertainment, national events. Now I need to create category from the table? note: create ...
14
votes
3answers
42k views

How to get top parent Category from current category object?

How can I get the top level parent category (just after Default Category) from current category object? I want the Category Name and Category URL of that parent category to show in the subcategories. ...
7
votes
5answers
35k views

Filter product collection by multiple categories?

I have this snippet of code that gets the most recently added products: $_productCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('*') ...
1
vote
1answer
12k views

How to update product position (number) in specific category programmatically

I would like to set all position-numbers in one specific category to 100 instead of 0 (default). Id like to do this once - not for future products in that category. Thx in forward!
7
votes
2answers
5k views

Impossible to save category with more that 1000 products

This is a known issue caused by PHP 5.3.9 and max_input_vars that by default it is set to 1000. The solution 2 proposed here it is the best in my opinion but doesn't work: for some strange reason it ...
5
votes
4answers
14k views

Categories - how to display in alphabetical order? (Programmatically)

We've been importing a lot of data into Magento CE using Magmi. It's creating our category tree for us. However, we'd like to display our category tree in alphabetical order. Is there a way to sort ...
3
votes
1answer
16k views

magento 2 create categories programmatically [duplicate]

I would like to create categories programmatically in magento 2. Please suggest me proper code for it. I have try this code Link but not working properly . I have to create number of categories on ...
4
votes
2answers
1k views

Programatically get subcategories of several root categories with collection

I am working on a collection query of categories: $categories_check = Mage::getModel('catalog/category') ->getCollection() ->setStoreId($storeId) ->...
4
votes
1answer
2k views

Assign all products in a category to all it's ancestor categories programmatically, in Magento 2

I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank The products are organized into categories and subcategories. In other words, they are organized into parent ...
1
vote
3answers
6k views

Magento 2: How to Override Abstract Class for Product Category Indexing Issue?

I have 2000 products which is assigned to multiple categories. When i run php bin/magento indexer:reindex catalog_category_product In catalog_category_product_index total record count is 1700. So ...
2
votes
1answer
6k views

Magento 2 : How To Add Search By Category In Advanced Search?

On advanced search page, “search by category” is not an option by default. I know links for magento-1 1)add-search-by-category-in-advanced-search-in-magento-1 2)add-search-by-category-in-advanced-...
15
votes
5answers
23k views

Import & Export all categories using csv file (without extension)

I want to import all the categories in magento using CSV file, I tried to do using extension http://www.magentoworks.net/importexport-magento-category-extension/ it works but i want to do it using ...
4
votes
2answers
9k views

show random products from a category

On my cart page i have a little display, which shows products from a certain category, it displays 4 products, but in my category i have 8-10 products. How can i make it select random products so it ...
1
vote
1answer
171 views

Is Possible Main Category URL Rewrite Management?

My Category Name : Test URL Rewrite Management In Localhost If i click the category name Test, the URL redirect to http://194.0.0.24/abcd/catalog/category/view/id/30 How can i solve this issue?
1
vote
3answers
5k 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
4answers
16k views

how to get Category description after product listing

How can i get category description after product list in product listing page?
0
votes
0answers
20 views

magento1 to magento2 data migration is done but when add category admin panel then error show

magento1 to magento2 data migration is done but when add category admin panel then error show "Something went wrong while saving the category." so give me solution like new category add into admin ...
13
votes
1answer
2k views

Magento 2 Add Category Tree Renderer Input With Modal Button

I am trying to place the category input for my custom form using uicomponent form. I am able to create dropdown but how I can create the button and open a new modal from it? Can I create a button ...
9
votes
5answers
13k views

Assign products to category programatically in magento2

How can I assign 'New products' to 'NEW PRODUCTS category' programatically in magento 2.
6
votes
1answer
3k views

How to correctly select the first item from a filtered collection?

I'm trying to write a script to get a category given its path, which seems like it should be easy to do. As a test, I have a base category with an ID of 2, and it has 2 children, 'Foo' and 'Bar'. I'm ...
4
votes
1answer
13k views

Create CSV list of all products & their categories

can somebody suggest me a way or a script to export a csv file with all product SKUs & the categories those SKUs are associated to? I've tried several things... but nothing seems to work. ...
2
votes
4answers
13k views

Getting Sub Category Images in Magento2

I am trying to get at Category Images from within Magento_Catalog\template\navigation\left.phtml. This file shows a list of sub-categories. This is that file: <?php if (!$block->getCategory())...
9
votes
1answer
13k views

Parent category is showing products in subcategories, even though product was not assigned to parent category

Let's assume I have a category, Clothing and this category have a sub-category, T-shirts. Now I add a product to the T-shirts category (by checking the box in the add product screen), but I don't ...
2
votes
3answers
602 views

Installation issue in magento marketplace 'page doesn't contain HIT in cache header.'

I have developed customer module in magento. When i am trying to submit in marketplace its keep giving the same error even after trying so many solutions. Installation issue: http://magento.dev/gear....
2
votes
4answers
13k views

Show Specific Categories On Magento Home Page

Hope someone can help me with this. I need to show 3 specific categories on my Magento home page. I have created a "list-homepage.phtml" file and have the following code in this file <?php foreach ...
10
votes
3answers
8k views

Add a extra category attribute under general infomation tab

I am trying adding a extra category attrbiute to general infomation tab i have tried adding that using the following code , require_once("app/Mage.php"); Mage::app('default'); Mage::app()->...
5
votes
2answers
24k views

Import products with multiple categories

Hi I am importing products in my 1.7.0.2 new setup, I already added the categories. when i import the csv product file, all go well. But the problem is the product is added to only subcategory, it is ...
1
vote
1answer
1k views

Layered navigation - multiple attribute choices

I'd like to make a simple "multiple choices per attribute" addon for the layered navigation. Simply put, I want /pisarniska-razsvetljava.html?led_color[]=3&led_color[]=4 to work. For this to ...
6
votes
3answers
6k views

Magento 2 - How to remove parent categories slug from subcategory URLs to make it shorter?

I want to remove the trailing category in magento 2 http://magento2.dev/accessories/tops-women.html http://magento2.dev/accessories/tops-women/jackets-women.html instead I want http://magento2.dev/...
5
votes
1answer
1k views

Magento2: How to update products position in category via CSV?

I want update product position attribute in category through the CSV feed. Anyone have any idea OR sample CSV which can accomplish my requirement.
4
votes
1answer
9k views

Product list by category in CMS page

I have 5 stores, each store with 3 categories. Every store has it's own CMS page. I want to show the products of a given category of those 3 categories in store's CMS page (e.g. categories 12, 13, 27,...
3
votes
6answers
6k views

Magento2: Could not save product “330664” with position 0 to category 3567

When i save product after unassigned all category from product. I am getting error Could not save product "330664" with position 0 to category 3567 I have checked log and i can see same thing in ...
1
vote
3answers
14k views

Magento : Change products per page for individual categories

First and foremost, I know that you can change the default products shown on all category pages for Grid and List views in System > Catalog > Frontend. What I want to do is change this setting for ...
4
votes
3answers
4k views

How does the Sort Order of Products in Subcategories work?

When adding a product to a category, a sorting order value can be specified. Imaging now we have a Category "P" set to "Anchor" and various categories "C1" and "C2" which are childs of "P". How is ...
11
votes
2answers
13k views

How to create a static block which displays all categories

I want to create a static block which displays all of my categories and displays them in a list. I don't need an image and I don't need the sub categories. Then I want to add this block to my home ...
8
votes
1answer
7k views

How to get list of all subcategories which are set “Include in Navigation Menu” as no

I have tried to get all sub categories which are not include in navigation menu but those are being active, of current category in list page. $children = Mage::getModel('catalog/category')->...
11
votes
8answers
26k views

Magento 2 Get category id using category title

I would like get category id by only using category title by using this kind of function. ->load($categoryTitle, 'title') ->getId(); Use case: Get category id by title and put id data to array ...
9
votes
7answers
13k views

Magento 2: How to delete all categories at once?

We have been experimenting with syncing our existing database(not Magento) to Magento 2. In the process, we have created over 1000 categories, but then we rearranged all the IDs to sync with our ...
4
votes
3answers
18k views

Getting all available category, subcategory list in magento 2

I want the replacement of the following code or similar to this code to get all category and subcategory in Magento 2. $categories = Mage::getModel('catalog/category') ->getCollection() -&...
3
votes
4answers
9k views

Magento 2 - Category list for custom magento system configuration section

My problem to get all available categories and display them in a system config multi-select field list. Here is a link for Magento 1.x. How can it be achieved for Magento 2.x?
2
votes
1answer
10k views

Default sorting is not working

Please refer this following url http://www.trendycollections.in/kids-wear/boys-wear.html All sorting is working Fine. But I have different issue. In the above url if i chose Price lowest under the ...
13
votes
4answers
27k views

Magento 2 get current category Id using registry

Any one know how I can get the category id using current category registry in Magento 2?
8
votes
1answer
11k views

Magento 2 Products Not Showing in Category (but are visible via search)

Got a little issue here with Categories. Running Magento 2.1.3 All other categories display the correct amount of product, except this one Under Products->Categories->"Kingdom Death" category ...
6
votes
1answer
3k views

Not showing sub-categories in category tree in Manage Products page

I am using magento copy category extension, this extension copies categories successfully. But on Manage Product page in Categories tab, sub-categories of the original category (that i copied) ...
1
vote
1answer
180 views

Meta Descriptions - Item Count Appearing on Search Engines

For category pages, when displayed on search engines, there is an "item count" that is displayed before the meta description. I fear this may be hurting our click through rates. Is there a way to ...
7
votes
4answers
23k views

How to redirect a category to another link

I have an extension in my store that i can upload posts with this and it has a link in top menu that' name is blog. In menu I have a category that's name is News and I want to redirect it to blog. ...
5
votes
6answers
32k views

How can I disable filter “category” from Sidebar

I choose my Category XY and get the Product-Grid, on the left side there is the Sub-navigation and below the "Filter Navigation". The attribute filters starts with "categories", "manufacturer", "size"...
4
votes
1answer
5k views

Display more than one category in the same CMS Page

I need to develop a landing page with products from different categories. Something like: Banner Products from category 1 Banner Products from category 2 I'm trying to do it like ...
4
votes
1answer
3k views

How do I change the default value of the “position” category attribute?

I would like to update the default position value that products are assigned when they are added to a category. When you update a category from the categories editor, new products are saved with a ...

1
2 3 4 5