Stack Exchange Network

Stack Exchange network consists of 174 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-attribute]

Denotes questions related to attributes of categories.

0
votes
0answers
12 views

Magento2 - category update attribute and add attribute not working together?

I need to change existing category attribute code from "thumbnail" to "thumbnail_migration" and just after that create a new category attribute with name "thumbnail". In upgrade data I have ...
1
vote
0answers
15 views

How to skip any category in seo meta title template?

We have magento 2 on website we have 4 categories, we sell photocopier parts, let me give an example what issue we are facing and what we want. Konica Minolta - Bizhub Color Series- Bizhub 203 - ...
0
votes
0answers
26 views

Magento2 - Category Thumbnail image not uploading

I am using an extension of Amasty for layered navigation which also provides facility of category thumbnail image upload. Unfortunately the upload of Thumbnail is not working for me, I am not getting ...
0
votes
0answers
8 views

Scope Store not working for custom category attribute

We are using Magento 2.2.6 and created a new category attribute. But the store_view scope is not working. I searched already in the database and also diverse blogs on the internet but don't get a ...
7
votes
3answers
231 views

Set Use Default Value for all categories attributes Magento 2

I have around 1260 categories.If i switch the store view , the all attributes have own value.But i want to set the all attribute values as parent main store view value. I can not open each category ...
0
votes
1answer
52 views

Magento2: Category custom textarea with wysiwyg editor attribute value blank issue

I have created two custom category attribute with wysiwyg editor and my attributes also shows in categories. But my issue is if i'm adding content in one attribute using wysiwyg editor then another ...
0
votes
0answers
24 views

The value of attribute “Ratio” must be set

I am using magento 2.2.6, and when i am trying to create new category, i am getting this error "The value of attribute "Ratio" must be set" Where is this attribute, i am not able to find in database. ...
0
votes
1answer
53 views

Category collection with filter Magento2

I have created custom Drop down attribute for category with attribute_code is "is_homecategory" Used below methods to create it. Setup/InstallData.php public function install( ...
1
vote
2answers
79 views

Custom category attribute is not showing in magento2

I have created the custom attribute using the solution given here. Create Custom category Yes/No attribute magento2 The attribute is created and i can see entry in database eav_attribute table. But ...
0
votes
2answers
115 views

Create Custom category Yes/No attribute magento2

Is it possible to create the custom attribute for a category called is_featuted category as 'Yes/No' attribute? I am looking for code how to create the custom attribute for category and get all the ...
0
votes
0answers
26 views

Magento 2 Can't Save Category

I am receiving the following error when trying to save category: The value of attribute "name" must be set I've no idea what could have happened I've got no Layout Update XML Exception.log: [...
0
votes
1answer
46 views

How to get product root category name or ID using product ID in magento 2.2.6?

I am working on magento 2.2.6 I am using file vendor/magento/module-catalog/Helper/Product/View.php In this, I am trying to get root category name or ID of product using product id in function ...
1
vote
0answers
18 views

Custom category attribute not showing back end

I have a small module that creates an attribute for categories. Works fine on my dev site but not on my live. I can see the module in system>config>advanced>advanced and it is enabled. I can't see ...
0
votes
0answers
76 views

Magento2: Custom attribute of category. Add default value in all existing category once we InstallData script

Here I need to Add defaul value of my custom category attribute in all existing category while I install the script. here is my code: <?php namespace CommercePundit\HtmlSitemap\Setup; use ...
0
votes
2answers
85 views

Can't get a new category attribute value

I have added a new category attribute but after creating attribute, Im not able to fetch value... A custom attribute is visible on the backend but how could I get value. I have followed this ...
1
vote
1answer
87 views

Magento2 : Base table or view not found: 1146 Table 'magento_mymodule.catalog_category_entity_textarea' doesn't exist

I have created a custom module to create attribute for categories in Magento 2.2.4. When I run the setup upgrade command then it gave me this error. 1146 Table 'magento_mymodule....
0
votes
1answer
56 views

How increase product view size on category page?

I am using magento 1.9 for learning purpose. On category page i want to increase product view dimension and make the changes in list.phtml file. Also change the column count 3 in place of 4, But on ...
0
votes
0answers
46 views

Magento 2 Category custom attribute display standard way

I have added image upload attribute Category_Banner to category but in category collection it doesn't come. Loaded all the categories collection and loading the category by id under foreach loop. ...
0
votes
1answer
16 views

The sequence of Category form messed up after inserting a new attribute

I have a new attribute on category which is successfully installed and show on Category form. I planned to place it inside field group Display Settings which is successful. However, the sequence is ...
1
vote
1answer
232 views

Add Wysiwyg attribute to category in Magento 2.2.4

I followed this reference Inchoo to add new Wysiwyg attribute to category in Magento 2.2.4. It's working fine. My custom attribute successfully added in the category but it's showing only textarea ...
0
votes
3answers
560 views

Magento2 : Add Category Attribute Dropdown

I want to Create Category Attribute With Drop down Drop down options are all list of Product Attributes like http://prntscr.com/juglsn : I tried but it didn't works 1.In setup file $eavSetup -> ...
1
vote
2answers
60 views

Issue in creating custom category attribute Magento2

I am creating custom attribute of type select, its creating but not picking values from defined source, instead its showing 'yes/no' option to select . Here is mine code in Setup/InstallData.php ...
0
votes
0answers
21 views

Magento2: In header menu I want to one parent category and its sub category Magento2

Can anyone hep me out in fetching any one parent category and its child category in header.phtml? Is it only possible via an extension?
0
votes
0answers
399 views

How to create custom category attribute with wysiwyg editor in magento2?

Hi i want to add custom category attribute with wysiwyg enable editor i get the code of custom category attribute but not able to find with wysiwyg editor.if anyone is there help me please.
0
votes
0answers
50 views

Magento 2: Showing only Array while access Category custom attribute

Its working while edit and save attribute in admin category , just issue is not showing data in frontend. my code is below : Model\Category\Attribute\Source\filename.php public function ...
0
votes
1answer
194 views

Add “Use Default Option” In Custom Category Attribute In Magento 2

I am creating a custom category attribute. When I am changing the store view language, then Use Default Option not appearing.
0
votes
0answers
145 views

Magento 2 file upload attribute showing 404 error after saving the category

I have created the file attribute in my category. After uploading a pdf file it is showing the preview of the file but when I save the category it shows "my-website-url/catalog/category/validate/key/...
0
votes
0answers
154 views

add custom image category attribute working perfect in local magento 2.2.2 but not working in magento 2.2.3 live site,image not display after save

1. my InstallData.php <?php namespace Vendor\Module\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use ...
0
votes
0answers
33 views

Multiple category image

I want to have two image field while creating category, one image will be for web devices and another image will be for mobile devices. I am trying to separate category image for web and mobiles so as ...
0
votes
1answer
944 views

Magento 2 : How to create custom Fieldset and Add custom attribute In It?

I am trying at custom attribute to category edit form in Magento 2.2.3 admin. I have created category_form.xml at below path. Vendor/Module/view/adminhtml/ui_component/catgory_form.xml <?xml ...
1
vote
2answers
636 views

Custom image upload attribute for category not working in Magento 2.2.3

I have upgraded magento 2.1.7 to 2.2.3. I have some custom image attribute in category. It was working fine in magento 2.1.7 but not working in upgraded magento 2.2.3
1
vote
2answers
199 views

Magento2 Unable to save custom category attribute

I want a custom category attribute for my categories, so I have created a module with all the necessary files and code, in admin, I am able to see the custom field but when I am trying to save it the ...
0
votes
2answers
183 views

Magento 2 : How to get subcategory details using main category url_key

I want to get the subcategories of a main category using its main categories url_key to the home page. I tried in this way. <?php namespace Eightmedia\Homepage\Block\Index; class Index extends \...
0
votes
1answer
72 views

Search by model to display categories

I'm trying to figure out the workflow for my redesign on Magento2. I would like a search by model feature ( year, make, model). But instead of having a disorganized list of products, I would like it ...
0
votes
0answers
35 views

Get Child Category's banner image?

I have the following category structure in the backend of Magento: lvl 1 category lvl 2 category (1) lvl 2 category (2) I want to pull the category images of the two level 2 categories onto the ...
0
votes
1answer
393 views

UpgradeSchema for category attribute M2

I have created custom category attribute by below setup. namespace Hello\Catattribute\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
0
votes
0answers
172 views

Magento 2 custom “Feature Thumbnail Image” uploader attribute categories lingering in the back-end

I am not able to remove custom image upload from backend categories image attached. In the eav_attribute table I can't see this custom attribute and neither the build in "Category Image" Upload ...
0
votes
1answer
137 views

adding attribute to catalog_category on store scope

I've created a custom attribute programmatically by a resource setup script: /** @var $installer Mage_Catalog_Model_Resource_Setup */ $installer->addAttribute('catalog_category', 'some_attr', ...
0
votes
1answer
162 views

Magento 2; issue with adding new Category Field in Backend (still not visible on category page)

The following module is saving a text, that should be shown in every category page, but the text is not showing anyway at the frontend. Still, not possible to activate WYSIWYG in order to include ...
1
vote
2answers
369 views

MAGENTO 2 How to Get Current page layout

How do I get current category "page_layout" value? e.g "1 column" or "2 column" and so on. The values from Layout screen shoot bellow.
1
vote
1answer
348 views

How to show products from subcategories in a category page

I need to list products in a category page sorted by subcategory with respective subcategory name before the products. With static blocks I can display the name of the subcategory on the category page ...
1
vote
2answers
605 views

Get category image without object manager

I previously used ObjectManager to get current category image. but it sometimes caused problems to me. Like loading blank page without no content, slower loading time etc.. , also I saw in a few ...
0
votes
1answer
1k views

Set default value for attribute in Setup Script in Magento 2

I have created install script to add an attribute to category. Default value has to be set, thus 'default' => '1', is used. InstallData.php file: public function install(...
0
votes
2answers
277 views

How to programmatically disable a category?

$category_id = 8711; $cat = Mage::getModel("catalog/category")->load($category_id); $cat->setData('is_active', 0); $cat->save(); it does not work... thanks!
0
votes
1answer
1k views

How to add custom dropdown attribute for category in Magento 2

Now, I've got empty dropdown. Here is my code (InstallData.php): public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $setup->startSetup(); $...
1
vote
1answer
817 views

Issues with adding image attribute to category - Magento 2

I've added attribute to my category following this guide (https://belvg.com/blog/how-to-add-image-attribute-to-a-category-in-magento-2.html). Looks like I am on right way, but when I try to upload ...
2
votes
1answer
444 views

Magento 2.1 How to Add a Second CMS Block in Category adminhtml

I am trying to add a second cms block in the category backend just below the default one. I copied and altered the category_form.xml and CategorySetup.php from core into a separate module. I think I ...
1
vote
1answer
282 views

componentType error Category Attribute

I'm using Magento 2.1.8 fresh install. I'm trying to get my mega-menu options in the category section. Now i get this error when going to the category page : > 1 exception(s): Exception #0 > (...
1
vote
0answers
399 views

How to display custom category attribute in category form magento2?

I have created custom category attribute in Magento 2.1.X version. Attribute created successfully in the database. I know display category attribute using UI-component 'category_form.xml' but that ...
2
votes
1answer
237 views

How to validate custom category attribute

How to validate a new custom category attribute in Magento, so that no more than 300 words can be written in that new field? Is that possible? How could I achieve this? Thanks for your contributions.