Skip to main content

Questions tagged [category-attribute]

Denotes questions related to attributes of categories.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Magento 2 : Dynamic XML entity attribute value

I am setting up a module to run on Magento 2.4.6-p5 multi-website instances. The module requires that a dropdown category attribute be setup with a default value and n other options (1 initially). I ...
James Baker's user avatar
0 votes
3 answers
49 views

How to enable wysiwyg editor for custom attribute in admin category page?

I have created a custom category attribute using below code. Ayakil\CustomCategoryAttribute\Setup\Patch\Data\AddMyDescriptionCategoryAttribute.php public function apply() { $this->...
Mujahidh's user avatar
  • 2,813
0 votes
2 answers
93 views

How To Create Toggle Yes/No Category Attribute?

I want to create Yes/No flag attribute in category admin panel. Data patch is already created and in category_form.xml i am trying different solutions. <fieldset name="general"> ...
Biren Patel's user avatar
2 votes
1 answer
425 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 ...
Dhaval Vaghela's user avatar
1 vote
0 answers
69 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 ...
A. Andersen's user avatar
1 vote
1 answer
495 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?
Paul Fan's user avatar
  • 658
1 vote
1 answer
406 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 ...
Lou Nik's user avatar
  • 455
0 votes
1 answer
1k 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 ...
Bojjaiah's user avatar
  • 3,762
0 votes
1 answer
91 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 ...
RJavan's user avatar
  • 3
0 votes
1 answer
117 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 ...
Trayan Grigorov's user avatar
2 votes
1 answer
597 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, '...
Attila Naghi's user avatar
  • 4,033
0 votes
1 answer
170 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); $...
Jimit Bhavsar's user avatar
0 votes
2 answers
549 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()->...
Jimit Bhavsar's user avatar
0 votes
1 answer
176 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.
Aniket Singh's user avatar
2 votes
1 answer
615 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. ...
thacac's user avatar
  • 21
0 votes
2 answers
130 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 ...
98 boycodobv's user avatar
0 votes
0 answers
92 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 ...
audio-engineer's user avatar
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(); $...
imtiaz's user avatar
  • 3
0 votes
3 answers
866 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
arun's user avatar
  • 3
0 votes
2 answers
2k 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/...
quickshiftin's user avatar
0 votes
1 answer
910 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->...
MichaelHa's user avatar
  • 661
1 vote
1 answer
174 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 ...
Purushotam Sharma's user avatar
0 votes
2 answers
303 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 ...
user80390's user avatar
0 votes
1 answer
353 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\...
Jackom's user avatar
  • 493
0 votes
2 answers
98 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]); $...
Attila Naghi's user avatar
  • 4,033
2 votes
1 answer
354 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\...
Attila Naghi's user avatar
  • 4,033
0 votes
2 answers
583 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\...
Akash's user avatar
  • 618
0 votes
1 answer
643 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 ...
Akash's user avatar
  • 618
0 votes
1 answer
480 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'), $...
lisa's user avatar
  • 133
0 votes
1 answer
534 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 ...
rickbakker's user avatar
0 votes
0 answers
92 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 ...
ABHi's user avatar
  • 101
1 vote
2 answers
532 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 ...
user3485709's user avatar
0 votes
1 answer
570 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 ...
OMGDrAcula's user avatar
1 vote
0 answers
193 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
skm's user avatar
  • 174
0 votes
1 answer
449 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->...
Hiren's user avatar
  • 1,091
0 votes
2 answers
1k 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 ...
Mohit Patel's user avatar
  • 3,923
1 vote
0 answers
24 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 ...
Asitis's user avatar
  • 1,247
0 votes
2 answers
67 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\...
Adarsh Khatri's user avatar
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? ...
Vinod Kumar Clix's user avatar
1 vote
1 answer
179 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. ...
Els den Iep's user avatar
1 vote
1 answer
436 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. ...
Chirag Parmar's user avatar
0 votes
1 answer
398 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()): ?> <...
imtiazau's user avatar
  • 379
3 votes
1 answer
1k 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 ...
Asitis's user avatar
  • 1,247
1 vote
2 answers
3k 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->...
Dito Khelaia's user avatar
0 votes
3 answers
2k 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?
Nafsss's user avatar
  • 760
2 votes
1 answer
727 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 ...
torhoehn's user avatar
  • 355
0 votes
2 answers
291 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\...
Ronak's user avatar
  • 476
1 vote
1 answer
32 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.
Izhar Mehdi's user avatar
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
Shomita's user avatar
  • 1,123
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,...
Purushotam Sharma's user avatar

1
2 3 4 5