Questions tagged [category-attribute]

Denotes questions related to attributes of categories.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 (...
4
votes
0answers
753 views

Multiple Category Image Attributes Not Working Together (Uncaught TypeError: value.map is not a function)

I've created a custom module to get an additional image uploader on my categories using the following tutorial. https://belvg.com/blog/how-to-add-image-attribute-to-a-category-in-magento-2.html It ...
3
votes
0answers
28 views

issues while editing the custom attribute for a category in multi-language store

My store is multilanguage and I created an image type attribute for my category. What happens is that when I edit this image with the "all store views" option enabled, it changes correctly in all ...
3
votes
0answers
395 views

No Way to Clear/delete a Selected Image using Media Browser on category edit page

With reference to this Q&A there's another question. How do I clear the image selected using the Media Browser on category edit page in the admin Panel? Here's what I tried: in app/code/...
3
votes
1answer
653 views

How to create and display custom category attributes

As the title says, i want to be able to create and display custom category attributes. I tried this extension: http://www.magentocommerce.com/magento-connect/manage-category-customer-and-customer-...
3
votes
2answers
243 views

Any category created does not show the title Correctly

i have a problem, any category created in my store not show the correct page titles, for example: Page title in category: "Smartphone Sony" What appears in the title of the page ....: "sign in now by ...
2
votes
1answer
2k views

Magento 2 - Get custom attribute within .phtml file using Magento\Catalog\Block\Navigation class?

I am trying to get a custom attribute value within my phtml file but struggling to get this to work? getData() & getCustomAttribute() doesn't seem to work. I believe this is because I am using the ...
2
votes
0answers
79 views

I would like to pull all attribute data from a specific category, using SQL or a PHP script

I figured I could do a simple SQL query since this is on my development environment: SELECT * FROM catalog_category_product WHERE category_id = 116 It looks like it returned the correct amount of ...
2
votes
0answers
106 views

Create image category attribute on magento 2.1

I have created category image attribute according to the this post. Images are also saving successfully. But I cannot preview or delete image as default category image. I had written code in ...
2
votes
0answers
1k views

Select field magento 2 Backend form

I have a category attribute that I have added to the admin view using... <fieldset name="general"> <field name="category_customer_id"> <argument name="data" xsi:...
2
votes
0answers
172 views

Looking to create a Category Attribute that will allow me to change the style of my dropdown navigation

I am wanting to be able to have three different styled drop downs in my Menu. I would like to be able to change the style type using a category attribute. What I imagine is to be able to go to a ...
2
votes
1answer
710 views

Magento how to set attribute seo meta title and description product

I have a catalog of 30,000 products on Magento, and I would make sure that the plugin I of seo (free) all products have tag, store name, category name. I turned on the network, to see how to build an ...
2
votes
1answer
153 views

Hide attribute type dropdown if no value

I use this code to hide attributes when they do not have data: <?php foreach ($_additional['items'] as $_data): ?> <?php $_attribute = $_product->getResource()->...
2
votes
1answer
2k views

Custom Category Image Attribute Preview

I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location. When I upload the image, preview showing as a broken image even though ...
1
vote
0answers
73 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
1
vote
0answers
18 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
vote
1answer
112 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. ...
1
vote
2answers
369 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->...
1
vote
1answer
329 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 ...
1
vote
1answer
146 views

How to add select multiple images attribute in category in Magento 2

I want to display more then one images of category in category page so i want to add more then one images in category in backend, please help me
1
vote
0answers
97 views

Save an EAV attribute in Magento2 without touching the model, repository

This can be done easily in magento1 with the saveAttribute() -method of Mage_Eav_Model_Entity_Abstract . For example, if you only need to save the is_active -flag for a category, you can do: $data = ...
1
vote
0answers
20 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 - ...
1
vote
0answers
25 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 ...
1
vote
1answer
624 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....
1
vote
3answers
2k 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 ...
1
vote
2answers
384 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 ...
1
vote
2answers
1k 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 ...
1
vote
2answers
5k 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(...
1
vote
0answers
466 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 ...
1
vote
0answers
79 views

Magento 2 : Best practice to load category EAV value

I want to know what is best practice to load a complex EAV attribute in a block. I have added a custom EAV attribute to category and I can see it in Catelog_Category_Entity_Text table, although I am ...
1
vote
0answers
1k views

Adding Custom Category Attributes in Magento 2

I'm trying to figure out how to create custom attributes for categories and how to display these on the frontend within my .phtml files. I've been following the tutorial on https://www.atwix.com/...
1
vote
0answers
92 views

Adding Attribute to all categories

I'm looking to add an optional attribute to a category page in Magento. I found this question to be very helpful although I can't seem to have my desired drop down option appear on screen. Rather ...
1
vote
0answers
114 views

Fixed product tax by category

I was looking into a way of setting an EcoTax on products and I noticed that the way people seem to be doing it is by setting a Fixed Product Tax. My problem with that approach is that it is time ...
1
vote
0answers
498 views

Add custom category attribute in flat tables

There is an custom category attribute with code "filter_param". I want to use this attribute while preparing the top navigation menu and the flat tables are enabled. I want to access this attribute ...
1
vote
0answers
302 views

Category attributes in collection without default value

I created attribute custom_attribute for category with some default value. If I save category(for example for store 26) with some value for this attribute I can get via: Mage::getModel('catalog/...
1
vote
0answers
206 views

How to resize image when click attribute on color swatches change image

In file list.html image when load page resize 230. but when i click attribute color. size images from 230px to 300px. how can resize images 300px -> 230px < img id="product-collection-image-getId()...
1
vote
2answers
453 views

Magento hide attribute group if included attribute got no data

We use this way to display attribute group names on the additional information tab on product page. Currently when a attribute got no data, the entire attribute will be hidden. I want to do the same ...
0
votes
0answers
13 views

Magento 2.4.1 - Category anchor not saved scope view

We have a problem in our Magento 2.4.1 install with the category anchor saving. In the All Store Views scope the category is set to Anchor No. When we change the scope to the only store view we have, ...
0
votes
0answers
40 views

Magento 2 Category custom Image information is missing

We are facing issues in my custom category image attribute. When I upload images it will show image detail proper but after save image information like dimensions ex. 100x100 and size ex. 12 KB is ...
0
votes
2answers
39 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
0
votes
0answers
27 views

Modify existing custom attribute value of category in magento 2.4 using rest API

As the title says, I want to modify the value of a custom attribute of each of my categories in magento 2.4 and I want to do this using REST APIs. I am using this endpoint https://magento.redoc.ly/2.4....
0
votes
1answer
25 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->...
0
votes
1answer
31 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
0answers
9 views

Magento 2 Output Custom Category Attribute

I created a custom category attribute attribute - Category Heading - That I want to display on Category pages (specifically taking the place of the category H1s in title.phtml). The new attribute ...
0
votes
2answers
31 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\...
0
votes
1answer
33 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 ...
0
votes
1answer
33 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'), $...
0
votes
0answers
12 views

uploading category's images for multiple stores

I am Sharing 1 root category to multiple stores I've created (exactly 24 stores) each store have 2 store views (EN and AR) for English store views, I need to upload the images 1 time on "all stores" ...
0
votes
0answers
22 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 ...
0
votes
1answer
37 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 ...