Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [category]

Questions about product categories in the Magento catalog

0
votes
1answer
38 views

Move static block on category page

I'm trying to have 2 pieces of static content on a category page. One directly beneath the category title and another below the product listings. I notice Categories have a "description" and support a ...
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 ...
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
3
votes
1answer
48 views

Magento 2.3.0 TinyMCE removes anchor tag href suffix when used with {{store url=''}}

I am trying to add category link in the CMS block. <ul class="list-unstyled"> <li><a href="{{store url=''}}test-collection.html">Test Collection</a></li> </ul> ...
1
vote
0answers
26 views

Magento2 Catalog Price Rule

Magento2 Catalog Price Rule Not Working when i create rule and click on save and apply rule not applied on Category without re-indexing my indexing is on update on save mode.
1
vote
3answers
4k views

Get custom category attribute value

I have created a custom category attribute using this tutorial http://gauss-development.com/blog/tutorials/adding-custom-category-attributes-magento/. <?php $installer = $this; $installer->...
4
votes
4answers
4k views

How to set category Is Anchor default to yes for all categories

I am trying to set category Is Anchor default to yes for all categories I tried these database queries UPDATE catalog_category_entity_int set value = 1 where attribute_id = 51; query run ...
2
votes
1answer
28 views

Magento 2 - Multiple collection on same block

I have a block where I want 3 different collections with different category filters. I have created collection object in constructor like this: protected $collection; public function __construct( ...
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 ...
2
votes
0answers
21 views

Error: getParentCategories() on null

I am working on my custom module where I added a button on Configurable products. The Content I was showing through button was by getting the Parent Category ID. The main issue I am facing is that ...
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 ...
0
votes
1answer
1k 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)...
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 (...
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 ...
0
votes
0answers
25 views

Layred navigation display all sub level category for non anchor category

I came to know that magento layred navigation is only render first child of current category on layred navigation for non anchor category. File for non anchor category HTML render. vendor\magento\...
0
votes
1answer
591 views

Category menu linking direct to product

I have a single product and I'd like to link straight to it from the category button is this possible? For example I have a category called "custom Cut Board" I only have one product attached to the ...
0
votes
1answer
13 views

How to get category image based on category ID?

I am trying to get an image which is uploaded for the category. & also I have category id and want to load complete details of that category based on category ID. How can I achieve this?
0
votes
1answer
57 views

Magento2: How to build a custom category link widget with attributes?

I'm trying to build a category link widget similar to the core one, but that can pull in additional information from the category selected, such as the image thumbnail and maybe some custom category ...
0
votes
0answers
24 views

How to create select form to choose categories in Magento 2.3.1?

I would like to create a search by selecting the categories in select form. So there will be four select forms and search button. &1 SELECT TYPE and there will be categories to select: ...
3
votes
1answer
2k 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....
2
votes
1answer
322 views

Magento 2 admin catalog category page isn't redirecting properly

I'm migrating a website from Magento 1.9.0.1 to 2.2, I've only migrated data, that's all I need, the migration completed sucessfully, all the products, customers, orders, categories are there, all ...
1
vote
4answers
12k 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())...
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 ...
6
votes
2answers
6k views

URL Rewrite: From category to CMS Page

I've created a CMS Page. URL Key = about/page1. I've created some Categories. One of them, category #1, it's called about. URL Key = about and its first subcategory, category #2, is named Page ...
3
votes
2answers
3k 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 ...
0
votes
0answers
103 views

Could not save product “” with position 0 to category - Magento 2 [duplicate]

I have gone through all the links as possible..but i don't find any solution for this.. From this Link ..its already fixed in 2.2.4 My current version is 2.2.7 and still i am facing the issue.. ...
-1
votes
1answer
182 views

removing categorty in product page is giving error [duplicate]

We are facing issues - https://prnt.sc/mgdybf why we are not able to remove the Deal and Pre Owned category. Could not save product "26652" with position 0 to category 435 What is this error ...
2
votes
1answer
2k views

Magento2 - create new/update category programmatically for specific storeView not working

When I try to update a category category name programmatically only for StoreView 2, it does not work. The changes will go to StoreView 1 every time and not to the StoreView that I defined: use \...
3
votes
1answer
43 views

How to get all categories in configuration (system.xml). magento 2

I'm getting all the categories in system.xml using <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Option\ArrayInterface; class Category implements ArrayInterface{ ...
7
votes
5answers
32k views

How to get Category Id of current product?

I have get the current product category id on product details page. I have used some method like : $_product = Mage::getModel('catalog/product')->load(prodId); $ids = $_product->getCategoryId();...
4
votes
2answers
699 views

How to customize product list page in Magento 2

I am new to Magento and want to customize the product list page. I want to add some text on the product if that product is available in more options(already configured this in admin). Something like ...
5
votes
2answers
110 views

Magento 2 Get Full Category Path for product

How to get full category path in Magento 2? For example Home > Women > Dresses > Maxi Dresses I am developing script for Google Shopping Feed and there is a node product_type which is require ...
2
votes
1answer
355 views

Magento 2 : Modify Name of Product Category With API Rest

How to change name of product category with API Rest? The URL is http://localhost:8082/magento/index.php/rest/V1/categories/26 and JSON is { "category": { "id": 35, "parent_id": 34, ...
0
votes
1answer
1k views

How search category by name or new attribute in magento 2

Help, how search a category programatically by name or new attribute. Ejm.: The new attribute -> val_code added by InstallData.
1
vote
0answers
14 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
1answer
25 views

Magento 2 : Add category filter in producy grid

In admin, I want to add column of category and also add category filter in product grid. How to do this? Please help me. Thanks.
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
646 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
823 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('...