Questions tagged [category]

Questions about product categories in the Magento catalog

1
vote
0answers
15 views

how can we add multi level of categories programmitaclly?

I have CSV file with categories data in parent child level. How can we add multi level of categories programmitaclly ?
2
votes
4answers
9k views

Changing the layout of the product category page by editing an XML file

I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank. On my homepage, I have enabled, from Content -> Pages -> Design, the 2 columns with right ...
2
votes
0answers
50 views

Magento 2.1.5 products filter problem

I'm currently working on setting up a e-commerce website. Of course we want to use a filter for the products but I'm facing a problem at the moment. I have a category with 5 products. All of them are ...
0
votes
0answers
20 views

Product position in category magento 2.2.5

I've got problem when i want to set position in Catalog << Categories << Products in Category. For example i set the position item from 0 to 20 and save changes. After the changes are ...
0
votes
2answers
35 views

How to get a each product id in category page in Magento 2?

How to get a each product id in category page? I need to get the product id in custom module template file.
0
votes
1answer
27 views

Auto-expand subcategories in product form

I have a category with subcategories, and I want to have the subcategory visible from the beginning, when the user opens the category selector. Currently, the user has to click the arrow next to the ...
0
votes
1answer
654 views

magento 1.9 how to show product in home page like category page

I use this code and show the product of this category {{block type="catalog/product_list" column_count="4" category_id="4" template="catalog/product/list.phtml"}} but I want to show content of home ...
2
votes
0answers
26 views

Can't save value in custom field /admin/catalog/category

I have added a custom field in admin category. I need to save and get value of my field using observer. My Xml file is "category_form.xml" <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
1answer
23 views

Category name on product url still working after “Use Categories Path for Product URLs” set to no

"Use Categories Path for Product URLs" set to no on admin panel But everytime I create a new product, it creates rewrite also for category/product url So both of them work: example.com/category/...
1
vote
2answers
4k views

Search Results: List categories and products

In magento, it is not possible to search for categories. Currently it shows only the products in the list. I need Categories and products in the search result. Search results for categories should ...
0
votes
4answers
3k views

Magento2: Get category product count which is show in admin after the category name

I want to show category product count which is shown in admin after the category name. As of now I write this code but it's not working properly. $category->getProductCollection()->count(); ...
0
votes
1answer
824 views

Display all categories for a product on product details page

In my Magento 2.1 store, I need to display the categories that a product belongs to, in the attributes area of the page (Manufacturer, SKU, etc). In my magento 1 store, I did this: https://...
1
vote
2answers
2k views

Magento category page title

How to get Magento category page title in frontend? Already tried: <?php if ($category->getPageTitle()):?> <?php echo $_helper->categoryAttribute($_category, $_category->...
3
votes
1answer
2k views

Magento 2.2 - Breadcrumbs issue

Currently i've got products in a category sub of default for example: Root -> Sub cat -> product I've noticed that on the product page itself the breadcrumbs are working fine for some products and ...
2
votes
1answer
36 views

Display sale badge on PLP

I am trying to display a 'Sale' badge on product category pages if the products have a special price. Though the isn't rendering anything. <?php if (_$product->getPriceInfo()->getPrice('...
1
vote
1answer
265 views

How I add Category chooser in custom module in backend magento 2

Anyone Help me please how I create category chooser in custom module in magento 2
1
vote
0answers
22 views

Magento 2 : Need to set custom category collection using plugin

I want to set custom category collection using plugin. I created plugin about Magento\Catalog\Block\Product\ProductList\Toolbar this block and aroundSetCollection(). But, not actual output I received....
3
votes
3answers
3k views

Default meta titles for category pages

How do I create a default category meta title for all the category pages? I would like it to be something like this: <title>{{category name}} - blah blah blah blah</title> I want it to ...
0
votes
2answers
47 views

For Magento 2 not show some category on frontend for not logged in customer, once customer logged in it will able to see that category on front end

For Magento 2 not logged in customer not able to access selected category any way in store Ex. url, menu, search etc , once customer logged in it will able to see category and its products. can ...
3
votes
1answer
43 views

Getting Custom Image Attribute in Frontend

I've followed a tutorial found here: https://webkul.com/blog/add-custom-image-attribute-category-magento-2/ With a slight modification which can be found in the InstallData, where I specified '...
3
votes
2answers
3k views

Layered Navigation Category link

I have my layered navigation set up so that the user can filter by category, and this will filter the results on the page and stay on the category the filter was placed on e.g. I have categories like ...
0
votes
1answer
758 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
1answer
111 views

magento 2 .Product Fields Auto-Generation / category Fields Auto-Generation, /meta tag description

Prepare Dynamic Solution For, If product having no title, meta description as per the images then it will going to get the data from system configuration. If category having no title, meta ...
1
vote
1answer
922 views

Multiselect category dropdown on admin form

I have created custom CRUD on new database table. I just wanted to save comma separated categories in a field. I have this code for multiselect categories: $fieldset->addField( 'categories', ...
2
votes
1answer
288 views

Category-Listing on Custom Page

I want to show the category-listing on a custom module-page. For example: [url]/brandstore/index/listing/brand/1/category/10 I tried to copy the content of the catalog_category_view.xml to my custom ...
0
votes
0answers
24 views

Magento2 Which table store category ascending order or descending order store category

My project category and sub category I have set ascending order or descending order store category via script or sql query. Magento2 Which table store category & sub category ascending order or ...
0
votes
2answers
68 views

Magmi Root Category Creation

I have one store (base) and I need to create another root category to test a new strucutre out so my plan was to create a new Root Category and then tell magmi to import into that... No such luck. I'...
3
votes
2answers
968 views

How to get product ids of specific category and not in other categories in Magento?

I want to get product ids of a specific category and product ids not in other categories only in a specific category. For example, category ids = 3, 4, 10 and product ids = 10, 12, 14 and category ...
7
votes
4answers
9k views

Assign products to category programatically in magento2

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

File Upload as Category Attribute - Magento2

I want to create a custom attribute for Category, which is File Attribute. I want to upload any kind of documents in it. Like PDF,txt, doc, etc,. Anyone helps me to do that via setup Upgrade? Same ...
0
votes
0answers
26 views

Condition on Category Filter in New Product Page?

I have save unique id with each category save when any category save then current admin id is also save with it. Now i want to apply condition in the New Product Page when any admin want to add any ...
0
votes
3answers
2k views

How to get all active categories and subcategories in product listing page?

My categories and subcategories hierarchy to a product listing page : Products Refrigerator back-bar fridges Product listing(here) Now, what i'm trying to get is while i'm in product listing ...
4
votes
2answers
616 views

M2: How is the bundle price in the category page defined?

I have a bundle consisting out of 2 simple products. I don't understand the price which gets displayed before I customize the bundle. How is it set up? $21 is clear, but why does it show $69 in first ...
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('*') ...
0
votes
3answers
308 views

Top-menu renderer isn't fully configured

I deleted a category from my magento installation and then i started getting this error "Top-menu renderer isn't fully configured." on the page and nothing else would work.
0
votes
1answer
166 views

How to display the my menus in the header section that is to the top of the home page?

I want to display the my categories in the header section that is to the top of the home page.I already try the code in page.xml like this.But it doesn't work . Please help. <...
6
votes
7answers
18k views

Magento 2 : URL key For Specified Store Already Exists

We have a Magento 2 multisite setup, with categories set up. When editing some (but not all) of these categories, in different store views, Magento throws following error and does not save data: In ...
1
vote
1answer
34 views

How to rewrite url between page and category?

I'm a magento beginner. I have problem. please help me My problem is I have create one category(about us) and one page(about us). when i click in menu category(about us), it will show the page(about ...
0
votes
1answer
33 views

When I click on Parent Category, there are no products displayed

I have three level category structure. I do not see any products until I click on the last category. Can I have sub category products displayed on the parent category page too? Please help!
0
votes
0answers
7 views

Can we show partial category's on two different website in magento 1.9?

Can you please help me out to set partial category display on two different web-site in magento 1.9?
0
votes
2answers
605 views

Products are showing up under magento subcategories but not on categories - system

I'm having an issue as I have to organise some products to display on the top of the pages on the website. It works on the subcategories and I change the position, everything fine. But when I go to ...
0
votes
0answers
19 views

Magento 2.3.1 Multiple categories showing active, How to remove duplicate active class?

In my instance, I have updated Magento 2.3.1 from 2.3.0. I have an issue that more than one categories are showing active on each page. it shows randomly selected more than one categories. How ...
0
votes
3answers
48 views

How to get products of a category and all its subcategories by category id?

I am trying to get all products of specific category whether these products are directly listed in the category or in the subcategories under this specific category I really searched for this on ...
1
vote
0answers
26 views

Magento2: Minicart issue on Custom layout

I am using a custom layout for the category page. Here is my code: app/code/Custom/Module/view/frontend/page_layout/equipment.xml <?xml version="1.0"?> <layout xmlns:xsi="http://www....
0
votes
1answer
67 views

Products not appearing in the catalog - Reindex not adding records

When I add products to a category through the admin pages, the product is not showing up on the relevant category page. Ive have searched for an answer for this extensively and carried out all the ...
0
votes
1answer
49 views

Set cookie in Observer Not working when full page Cache is enabled

I have to set category id in cookie when customer go to Category page and update cookie with category id when visit again using seperate module. I have created Observer and set cookie there but not ...
0
votes
0answers
31 views

can't save new category in magento2 admin panel [duplicate]

Magento2 admin panel adds new category save then error show. "Something went wrong while saving the category." So give me a solution.
1
vote
1answer
64 views

Magento 2 : product collection ASC sort by category

I want to sort product collection by category ids. I used this below code. What i need to add in this code ? /** * @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory */ protected $...
1
vote
0answers
62 views

Magento 2.1.4 add Category Image into Product Image Slider?

I'm new to Magento and I'm using 2.1.4 . I want to add Category image into the Product Image Slider top Corner. I search in Magento forum and I can't find it any where. All the example are for early ...
7
votes
1answer
2k views

Magento 2 how to filter product collection on category page with custom filters

I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products ...