Questions tagged [category-attribute]

Denotes questions related to attributes of categories.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Magento 2 : Need to add pagebuilder category attribute in admin category page

I want to create the category attribute with pagebuilder button. I have tried with below code but its not working. After save the category it is showing wysiwyg editor instead of pagebuilder button. i ...
0 votes
0 answers
28 views

How to fetch category path using id through SQL in Magento 2?

I want to get the path of specific category using it's ID like "Default/.../.../CategoryName" through SQL query. How can I do that? I get the category name using ID through SQL using this.
1 vote
0 answers
17 views

Magento 2 - Categories in Layered Navigation

My layered navigation is not displaying categories in a filterable manner, screenshot below. Currently every category in my tree is set to anchor and when I go to a given category page, all the ...
0 votes
1 answer
187 views

add clickable URL for the category Image

I want to add custom clickable URL for the category image. Anyone can teach me what I need to do? I have to create a new attributes for the URL field?
  • 602
0 votes
1 answer
118 views

magento 2.4 category_form.xml add comment to fields

I'm creating some custom fields for my categories, so I've added a couple of simple text fields in the database with the setup php script, then extended the category_form.xml to show my fields in the ...
  • 309
0 votes
1 answer
655 views

Create attribute using Data Patch in Magento 2

Trying to create Category Attribute, But getting an error. foreach() argument must be of type array|object, null given in Magento_Root/vendor/magento/framework/Setup/Patch/PatchRegistry.php on line ...
  • 3,980
0 votes
0 answers
155 views

Page Builder Banner element for Category with predefined Name and Image

In Page Builder, I can add a Banner component and set its link to a category (or a product etc.). This does not set the banner image nor the (translateable) banner title to the respective attributes ...
  • 117
0 votes
1 answer
65 views

Fetch Category ID in Magento 2.3.7

Excuse my poor presentation of a question I am trying to list products of the same category on any product page of the named category. Here is the code I have, which works perfectly if done for each ...
  • 1
0 votes
1 answer
71 views

How to add product category to product meta title?

I have a product called "Wiper blades 60/50cm" which is listed in the store Category "BMW 3 Series e46" I want to add the Category name to the product meta title so that the meta ...
2 votes
1 answer
238 views

Cannot get custom category attribute value on the category page issue

I made this code to create the custom attribute: $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]); $eavSetup->addAttribute( Category::ENTITY, '...
  • 3,736
0 votes
1 answer
80 views

Category description special character issue - M2

Using this I can update the category description but special characters are removed. $category_Id = 6; $category = $this->categoryFactory->create()->setStoreId(0)->load($category_Id); $...
0 votes
2 answers
241 views

Category description update using repository - M2

Using this I can update the category description but I want to update using the repository. Working good with factory method: $category_Id = 6; $category = $this->categoryFactory->create()->...
0 votes
1 answer
120 views

HOW TO GET PRODUCT ATTRIBUTE AND AVAILABILITY?

I want to get the Product attribute using Object manager and check the availability of the product if its RTS I have to assign that product to a category id.
2 votes
1 answer
405 views

Category Name and URL Key issue / Admin / Migration from 1.9.1.0 to 2.4.2

I'm facing an issue further to data migration from magento 1.9.1.0 to 2.4.2 in Admin > Store / Configuration / Category Categories name and url_path are in the database, Category name also. ...
  • 21
0 votes
2 answers
64 views

How to get all the values stored in the new add category attribute in magento 2

I followed some instructions to do "Add new Image attribute for category in magento 2" and I was successful.and now I want to output all newly added images printed out in the same place on ...
0 votes
0 answers
72 views

Category attribute value changes unexpectedly after saving category in Magento 2.4

I created a module that uses an Image Uploader UiComponent to upload an additional image to a category and save its path in the database. The controller I use to do this is basically a copy of the out ...
0 votes
1 answer
22 views

Magento2 Category Attribute

I have created Attribute on category level now I want to fetch the value of this attribute. I have tried below code $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $...
  • 3
0 votes
3 answers
438 views

Magento2: create custom attribute description with wysiwyg editor in Category page?

how to create custom attribute description with wysiwyg editor in Category page? like this
  • 1
0 votes
2 answers
1k views

Magento2 : Custom Category Attribute Not Showing on Frontend

I've create a module to add a custom attribute to my categories, however my code doesn't seem to be display the attribute on frontend. i dont know where i am wrong. app/code/Vendor/Module/Setup/...
0 votes
1 answer
705 views

How to filter category with custom attribute Magento 2

I added a custom category attribute type yes/no like this: In eav_attribute table: the problem is when i filter follow this attribute it return empty array: $model = $this->categoryFactory->...
  • 661
1 vote
1 answer
141 views

Magento2: How to get list of category's dropdown attributes?

I am using Magento 2.3 and I want to get list of category's dropdown attributes and their values? For example I have a Furniture category and in this category I have Color and Manufacturer attributes ...
0 votes
2 answers
201 views

data install/upgrade not creating category attribute

i'm trying to add an attribute to the categories, but my setup doesn't add anything the input is visible in the categories, but you even on save the input value stays empty and i can't find any ...
0 votes
1 answer
185 views

Magento 2 - Install category attribute not work

I created a custom form for creating some attributes for the category. My code is this but it doesn't work: InstallData.php <?php namespace Create\Attribute\Setup; use Magento\Framework\Module\...
  • 417
0 votes
2 answers
58 views

Custom category attribute is not being saved - issue

I managed to create my custom attribute: $installer = $setup; $installer->startSetup(); $categorySetup = $this->categorySetupFactory->create(['setup' => $setup]); $...
  • 3,736
2 votes
1 answer
223 views

Install Data is not executed in magento 2

I am trying to create a category attribute: This is my file form Vendor/Module/Setup: use Magento\Catalog\Model\Category; use Magento\Catalog\Setup\CategorySetupFactory; use Magento\Framework\Setup\...
  • 3,736
0 votes
2 answers
378 views

Magento 2 Category Custom attribute doesn't exists error

I have created a module where i have added two custom attribute to category page. Here is my code. Setup\InstallDate.php <?php namespace Vendor\Module\Setup; use Magento\Eav\Setup\...
  • 618
0 votes
1 answer
425 views

Magento 2: how to change Category page design

I have a theme installed on my Magento V2.2.3 site and now i would like to change the category page design with requirements new custom fields for category option on each category if this category ...
  • 618
0 votes
1 answer
344 views

get Custom attributes category Magento 2

after add new custom attribute, i am trying to get my custom attribute category, filter by the parent id, actually it return me a null value or empty array I used $category->getData('label_text'), $...
  • 133
0 votes
1 answer
394 views

Magento 2 adding custom category attribute to backend after being migrated from M1 1.9.4.1

I have a question regarding a custom category attribute that was added via a module/extension in a Magento 1.9.4.1 webshop and now is migrated correctly to the Magento 2 webshop (2.3.4). I checked the ...
0 votes
0 answers
80 views

Can't get custom attribute for value magento 1.9.4.2

I have created a Custom Attribute ( attribute id: custom_attribute ) for the category. It shows up in the backend and able to save the value to it. I just wanted to print the value in the Category ...
  • 101
1 vote
2 answers
487 views

Magento 1.9 How to sort product in category page by stocks product

I want the products to be displayed on the category page, if available That is, first those that are stocks , then those that are not stocks I didn't find anything with the title in the attribute Is ...
0 votes
1 answer
347 views

How to add product category to page title as data attribute?

I am brand new to Magento and am a Wordpress developer and am trying to get my bearings on something that seems like it should be simple to accomplish. I am trying to simply add a data-attribute to my ...
1 vote
0 answers
163 views

Multiple Images for categories in magento 2

I need to upload multiple images for categories like in products in Magento 2. How can I do this? Any help is appreciated. Thank you
  • 174
0 votes
1 answer
287 views

Magento 2 : How can i get all category with all eav attributes in collection?

How can I get all categories with all EAV attributes in the collection? $categories = $objectManager->create('Magento\Catalog\Model\ResourceModel\Category\Collection'); $categories->...
  • 1,069
0 votes
2 answers
840 views

Magento 2 showing category in homepage with products using enable/disable attributes

How to get the all custom category on homepage with products. I want to create these types, Please check screens-short:- https://prnt.sc/r5b2q5 Showing this category:- Above category showing this ...
  • 3,550
1 vote
0 answers
22 views

M2.3 - Adding custom category image removes default thumbnail

I've used this module to add an extra category image field to my categories. The field itself is working fine, but whenever I add an image to it, it removes the default Category Image. When I go to ...
  • 1,217
0 votes
2 answers
64 views

Custom Category Attribute saves in fresh instance but not in migrated instance

I have added custom attribute to category. <?php namespace ................ use Magento\Framework\Module\Setup\Migration; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\...
0 votes
1 answer
1k views

Magento 2 wysiwyg editor hide/show button not showing with custom category attribute?

I have create custom category attribute as wysiwyg editor under content fieldset. Attribute is showing and working fine but I want to add Hide/Show Editor button with atribute. How can I do this? ...
1 vote
1 answer
159 views

Wrong sort order on category page Magento 2.3.0

I have created an attribute that is used for sorting on the category pages. The sorting order is numeric. Expectation is that sorting order is: 1. 1 2. 2 3. 11 But the actual sort order is: 1. ...
1 vote
1 answer
319 views

How to remove custom attribute of category using object manager in magento 2

I created 4 custom attributes for category. Now I want to remove it. I want to use object manager for delete attributes and its values. See this image. Created attributes are display in this manner. ...
0 votes
1 answer
340 views

Get Custom Category Attribute Value On List Page : Magento 2

i have created custom category attribute now i want to get the attribute value on list.phtml page i can i achieve this in magento2. <?php if($category->getColThreeCategory()): ?> <...
  • 379
3 votes
1 answer
883 views

Magento 2.3: Create custom category attribute with WYSIWYG

I want to add WYSIWYG enabled textareas as custom fields for categories. I have read all related topics on this site for this issue, but none of the mentioned answers seem to do the trick. Can ...
  • 1,217
1 vote
2 answers
2k views

Magento 2: Get custom category attributes by category id

I have category ID and need to get all custom attribute for example thumbnail image. my code does not return all attributes $category = $this->categoryRepository->get($childId, $this->...
0 votes
3 answers
1k 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?
  • 720
2 votes
1 answer
639 views

Use Default Value checkbox for custom category ui_component

I added a custom category attribute "Listing Image" and want to display the checkbox "Set Default Value", like "Thumbnail" and "Category Image". I already compared the ui_component, but couldn't find ...
  • 355
0 votes
2 answers
230 views

UpgradeData.php script is not Working

I want to remove some new category attributes but it is not working. Am I missing something? I dont know what is the problem. Please someone help it.. UpgradeData.php <?php namespace Vendor\...
  • 381
1 vote
1 answer
25 views

when i add category it give me this "Secondary Description" attribute value is empty"

Suddenly Magento starts giving this error ... I tried to var_dump() what is missing, also check the file but there is no problem with it.
3 votes
3 answers
1k views

Magento2 How to get category custom image attribute on frontend phtml page

I need to get category custom image attribute on frontend. Anyone have solution for this? Thanks
  • 1,083
2 votes
4 answers
2k views

Magento2: Adding custom attribute to category doesn't show store specific value

I have created a custom category attribute using the custom code from here, attribute created successfully and able to save the value. But I want to save store specific value in this custom attribute,...
1 vote
2 answers
785 views

Magento 2 - Category attribute not getting saved to database

I am facing an issue where if i update few information such as meta title, meta keywords, meta description from admin panel for any category, then the meta title is not getting saved to database. ...

1
2 3 4 5