Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
8
votes
5answers
22k 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
1answer
43 views

Product to category redirect

Is there a way to link/redirect a product page to a category? Scenario: I have 70-80 new products that all go into the same category. I can either chose to put one of the products in the "News" ...
2
votes
4answers
128 views

Magento2 Copy data from one to another magento installation

I want to copy all data from one to another magento installation. Wants to copy products,product-attributes,category,category-attributes,customers,cms-block,pages,rules everything except orders. I ...
0
votes
4answers
594 views

Magento 2 - 'Add Subcategory' button not showing in catalog categories

I don't understand why the Add Category button isn't showing up in my store. Does anyone have a solution for this? Index and cache are normal. Every other button including the upload button works ...
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()...
0
votes
1answer
45 views

The value of attribute “Is Active” must be set -error always when trying to create category via SOAP

I'm trying to create a category via SOAP $category_data = [ 'parentId' => 2, 'name' => 'NIMI', 'is_active' => 1, // also tried 'isActive' => 1 'position' => 1, '...
8
votes
4answers
11k views

Magento 2 : How to check if we are on a category page or product page?

Is there a way I can check that If a user on a category page,or an individual product page in Magento 2? Any help would be greatly appreciated!
1
vote
2answers
38 views

Magento 2 : Getting error while saving category from admin

When I try to save category from admin panel it showing error like something went wrong and when I checked the exception log it showing me below error. main.CRITICAL: SQLSTATE[HY000]: General error:...
2
votes
2answers
2k views

Best practice for multilingual categories and products?

I think it is very important question for setting up a multilingual store with Magento. The main problem here I am facing is URL rewriting for categories names for different language. I have this ...
0
votes
1answer
35 views

How to get Category and sub category from backend?

We have faced design collapse issue on the category menu part at the frontend of the website. So, we have created the mega menu using html and css, and included that code in topmenu.phtml. Now, we ...
0
votes
0answers
13 views

How to expand / unfold category list by default (magento CE 1.8.1)

currently , my theme looks like this on a -mobile- device: But I want it to look like this: Meaning: I want the category list to be unfolded by dedault; without the user having to select it. I ...
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
2answers
53 views

Magento 2 how to get all categories of a product in controller

I am trying to get all categories with their levels of a product through it's ID in my controller which is overriding default magento controller. Can I get product's category path url through it's id ...
0
votes
0answers
11 views

Get current product categories of current store only in Magento 2

I made the following in Magento 1 for a multi-store website: $rootCategory = Mage::getModel('catalog/category')->load( Mage::app()->getStore()->getRootCategoryId() ); $sameStoreCategories = ...
0
votes
2answers
1k views

How can i Bulk Change Category Page Title, Meta Description/Keywords

I need to Change SEO keywords for categories. How can i Bulk Change Category Page Title, Meta Description/Keywords.
0
votes
1answer
21 views

Magento 1 sub domain Redirect issue

Just copy original domain files and DATABASE to Sub-domain and change Base-URL every links is working prefect but only few products, category, and images slide show links redirect to original main ...
0
votes
1answer
24 views

Magento 2 : Get current_category is cached and shows wrong IDs on category submenu

I have created a module to avoid an objectManager. In this I have public function getCurrentCategory() { return $this->_registry->registry('current_category'); } On my phtml file I ...
0
votes
2answers
41 views

Magento 1.9: Copy all products of a category to another category

I want to copy all products from one category to another category in Magento 1.9.2.2?
0
votes
3answers
1k views

How to create custom link for category?

I have to create category in Magento backend, it display to front end, can it possible if category name is Ex. like Football, and when i click it football category, it redirect to another sites link? ...
0
votes
0answers
15 views

Magento 2 URL - Category Hierarchy

Currently working on a site with several categories and thousands of products. We want to structure the categories into parent/sub or parent/sub/sub if necessary. I've looked at url rewrites inside ...
1
vote
3answers
4k views

Magento 2 - Category Listing in Left Column

I need to list out categories and child categories in the left nav of the category page and I'm trying to use this extension: https://github.com/Sebwite/magento2-category-sidebar As of now all that ...
0
votes
1answer
2k views

Check page url is category page or cms

I have an page url of magento site. my question is : how can i check the page url is category page or cms page or other page? for example: page URL is : http://example.com/craft.html(category page)...
0
votes
1answer
32 views

URL rewrite magento 2 admin-side issue

Magento2 - facing issue with below error in admin panel error in console category:1 Uncaught SyntaxError: Unexpected token C in JSON at position 473 at JSON.parse (<anonymous>) at getData (...
0
votes
1answer
1k views

Magento : How to Implement Automatic Related Products and Category Based Upsell Products

We have 5000 products at our webstore. We can not use magento default feature related products & upsell, cross-sell products. Is there any customize code or modules which can implement to display ...
4
votes
2answers
2k views

How to display category image in home page with custom css?

I want to display all of my category image with in home page. What should i do for this? I am using CE:1.9.2.4
5
votes
1answer
1k views

How to get first product from category in 1column.phtml?

I'm searching for a way to get the main image from the first (or random) product from the current category and use it as a background for the category title. As the title is created in 1column.phtml (...
3
votes
1answer
4k views

Add a custom text field to categories in Magento 2

I want to add a new text area to my categories in Magento2, similar to this, but its for Magento 1: adding custom drop down field to category Basically there should be a field for each category where ...
0
votes
1answer
1k views

New Category Page Showing 404

So I have made a new category and copied all settings from another working category with a new name and url etc but I get a 404 when hitting the category frontend. When trying to debug this I have ...
1
vote
3answers
3k views

Magento 2: Display list of specific categories on Home Page

I need to show 6 specific categories on my Magento home page. I have the category ids with me. I want to display both the category image and name of that specific category. I have created a category....
0
votes
1answer
40 views

Magento 2.3.2 - Saving categories after data migration causes empty records

I have imported my cats and products from Magento 1 into Magento 2. The categories show in the front end but it states that no products can be found. In the admin, the cats show, with their products....
7
votes
7answers
40k views

Get full list of categories using sql

How would I format a sql query to get a list of all category (id, name and url_path) from my magento database. Alternatively if you know the tables I need to do this, a list and some sort of ...
0
votes
2answers
38 views

Magento 2: Moving Category Description

I'm currently trying to move the category description to below the product grid. Below is the catalog_category_view.xml layout: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
32 views

Magento2: Create Multi Select UI Field on Frontend as Admin

How to create a multi-selector dropdown with Category on frontend side as Admin Add Product Page. Shown as here screenshot I am trying this Tutorial Multi-selector on Frontend as admin side But is ...
3
votes
3answers
681 views

magento 2 Cant show products on categories

I have added some products in one category. All products are enabled, with quantity and catalog, search option, I have also disabled cache and reindexed multiple times but on the frontend the product ...
0
votes
1answer
677 views

Display child categories in the top menu in magento 1.9

I need to display all the subcategories in the top menu navigation in my custom module. From the below code i m getting only the categories in the menu. public function getMenu2($_cats, &$menu, $...
4
votes
1answer
437 views

magento 2 | Categories not showing in Admin Product Edit Page

I have started working with magento earlier this year, I am running magento CE 2.2.2 I have noticed that when I go back to edit a product from the catalog I have noticed that the categories are not ...
7
votes
4answers
10k views

Assign products to category programatically in magento2

How can I assign 'New products' to 'NEW PRODUCTS category' programatically in magento 2.
0
votes
0answers
15 views

Magento 2: Multi-Store Functionality Achievements

Store Requirements Admin Panel Restriction Admin Panel Store Wise Admin Dashboard Store Wise User Permissions and Resources control Different Admin panel views store wise Customers: Customers ...
0
votes
1answer
810 views

Magento 2 Category Url not working after migration from magento 1

I have a problem with my magento 2 site. this site was originally migrated from magento 1. now my problem is that. the original url is not working for example: Instead of this one: site.com/products ...
0
votes
0answers
29 views

Magento 2.3 Invalid URL when updating category name in a store view

I am working on magneto 2.3. It has two store views: English and Chinese. I type a category name in Chinese store view, So I want to change it. But when I tried to save the new name in Chinese store ...
1
vote
1answer
64 views

GET Products by brand and category

I'm trying to create some type of search method for customers where they select the product's brand they want to search and then, if they want, they can also select the category they want (if there ...
0
votes
2answers
71 views

Magento 2: Load multiple categories by category ids

Hi i want to load multiple categories in Magento 2.3. but it only fetch 1st category of a subcategory, not rest of category. $categories = $_objectManager->create('Magento\Catalog\Model\Category')...
0
votes
0answers
33 views

Magento 1.9 SOAP v2: Specify a store view on category update

I would like to update categories in a specific store view via the SOAP API. Below is the code I'm using: $catu = '628'; $store = '9'; $cat = "name2"; $proxy = new SoapClient('http://example.com/api/...
0
votes
0answers
20 views

Parent category products set as anchor do not show on front-end - Magento 2.3.1

We are facing a very strange problem and hope someone has maybe an idea to help. We are using Magento version 2.3.1 No products of the main category, set as anchor are showing up in the front-end. ...
0
votes
2answers
1k views

Magento 2 product list page pagination not working

I am using Magento 2.1.5 and and on category listing page i have 48 products but its default display 12 products but not showing the pagination. how to solve it ? default value for product is set 12 ...
3
votes
1answer
3k views

Remove parent categories from subcategory in URLs in 1.9.2.3

Magento version is 1.9.2.3. I have tried following solution which doesn't work for me. Step 1: Go to app/code/core/Mage/Catalog/Model/Url.php copy this file to app/code/local/Mage/Catalog/Model/Url....
0
votes
0answers
13 views

Magento 2.X: How change Category name to not necessary

i have this question, how can add category but without category name in magento 2.3? so i need this category name print in navbar but not in container theme.
0
votes
3answers
46 views

Fetch category id's through sql in magento 2.3

I want to get the list of category id's with category name through sql. how can i do that?
0
votes
1answer
750 views

how to change text color in category view in magento2

I am trying to change text color in magento 2 for product names and nested names in category view. Can someone point me in right direction.