Questions tagged [attributes]

Magento Entity Attributes

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Magento 2 get attribute options by attribute code?

How to get the list of option values for particular attribute code in magento 2? <?php namespace Sample\Shopbyage\Block; use ...
0
votes
0answers
7 views

How to getSku for configurable products in magento 2

I want to get Sku for selected options. Above image i have select blue and M. So this options product sku get in magento 2. Please Help me. THANKS.
0
votes
1answer
910 views

Magento 2.1 - display attribute group name

How can I display the group names above the attributes. I found the solution for Magento 1 but not for Magento 2. Group 1 att 1 att 2 att 3 Group 2 att 4 . , I am using Porto theme on magento 2.1.
2
votes
4answers
7k views

Product attribute show/hide in admin depending on other attribute value

I have a product attribute but it is only relevant if another product attribute is selected (a dropdown yes/no) value. In the admin view I would like show/hide my custom attribute depending on the ...
0
votes
1answer
1k views

Magento 2.2 - Cannot update attribute values

I've created some custom product attributes with REST API, correctly populated them and assigned values to products. Everything works fine in dev environment whereas I got difficulties in staging ...
0
votes
1answer
863 views

Magento2 getting - Error filtering template error after add custom attribute value programmatically

Getting this error when reload page after adding value programmatically in a custom attribute. And when i delete that value which i added programmatically then its working fine. Error filtering ...
7
votes
1answer
2k views

Custom /catalogsearch/ filters

Beforehand I have to tell: I'm a total n00b on Magento and what I need to know is more a "common practice" or "standard" about how is something achieved in Magento, since I have to maintain (in record ...
3
votes
4answers
4k views

How to filter product collection with default graphql products query

I am using Magento 2 Graphql to get product collection based on category id. I want to apply filter by color, size, material etc. I have checked the graphql available filters and those are not ...
0
votes
2answers
964 views

How to set the default option in existing dropdown attribute

How do I set an option in a dropdown attribute as the default? I am adding the options to an existing attribute with this code where $aName is an array of names. $installer = new ...
0
votes
1answer
30 views

Add description to Related Products

I try to add product Short Description in the Related Products section in Magento 2.4 version. I overwrite this file:/app/design/frontend/Theme/MyTheme/Magento_Catalog/templates/product/list/items....
7
votes
6answers
21k views

Magento 2: Delete magento product attributes?

How do you delete created product attributes in Magento 2? I can't get rid of it. I have couple of Magento product attributes which not needed
0
votes
0answers
18 views

Adding attribute input validation in admin

I have already added a new validator within theme's validation.js, and am able to use it within custom forms. I would now like to add a new option under Input Validation dropdown on the edit attribute ...
0
votes
0answers
13 views

Magento 2.3.5: Link product page attribute to category page

How can I link (href) a product page attribute to it's category page? For example: I have a visible attribute on the product page called "Artist" and the product is in 3 categories "...
3
votes
3answers
4k views

How to update or rename the attribute code of the attribute in magento 2

How to update the attribute code of the attribute in magento 2. I have refered below link https://stackoverflow.com/questions/5198266/how-do-i-rename-an-attribute-code-in-magento
0
votes
0answers
53 views

how to migrate Bigcommerce store in Magento2

I want to migrate Bigcommerce store to Magento2 I have check online with Litextension and carttocart extension but it's not giving 100% accurated data migrated... If anyone have tried before, or any ...
0
votes
2answers
35 views

Magento 2.4.2 How to add Key Features to the product detail page

I need to add Key Features to the product detail page.The function should be a new attribute, but I don't know how to add it. Do you have a simple and quick way. Key Features can be replaced with any ...
0
votes
1answer
27 views

Magento2: How to add extension attribute to rest/V1/products/attribute-sets/4/attributes

I want to add extension attribute to the default API to identify the visual and text swatches http://localhost/m2.4/rest/V1/products/attribute-sets/4/attributes API.
1
vote
2answers
840 views

Magento : How To Add an Attribute to Static Block

How to add attribute to static block. I am not looking for code, but also where put code. Assume attribute is named test and static block name sttest. I have search on this, but always get lost on ...
1
vote
1answer
1k views

How to display attribute swatch image in listing page in Magento 2

I am using Magento 2.2.2 I have created one attribute "Manufacturer". Input type of this attribute is visual swatch. I have added values with swatch images in this attribute. I have selected ...
1
vote
2answers
6k 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
1answer
1k views

Magento 2: I can't display the value of a custom product attribute in product page

I want to show two product custom attributes in product view page side by side the price with the same format (font size). The attributes are PP and PR witch I created in Magento Admin and assign to ...
0
votes
1answer
19 views

Magento 2: Alternative solution to large number of values inside 1 attribute

We have Product Attribute called "Authors" with "Multiselect option". It has entries up to 51k. When we edit product page in backend it becomes very slow to load page and specially ...
0
votes
0answers
8 views

Saving Product Attribute First Time Erases Store Labels, Second Time Saves the New Addition

We have the loop below, which is supposed to update the store labels and options and then save the product attribute. The first time the attribute repository saves the attribute, it completely wipes ...
9
votes
2answers
6k views

Magento 2 :- Add select attribute to category

I want to add a select/dropdown attribute to a category and display it in the backend to let the store owner select it. After some research I found out the following to do: Create an attribute via ...
0
votes
1answer
2k views

Getting the custom product attribute in the Checkout summary Magento 2

I have a custom product attribute which we are using in place of name for some reason. I need to change this through out the site. I got success in getting this in minicart , product and cart page. ...
0
votes
0answers
10 views

Magento 2 How to set up restrictive attributes?

I would like to know how I can set up an attribute that would filter the items listed with multiple values selected. For example if I offer rings and I set a material attribute. I would have among ...
0
votes
0answers
13 views

Magento 2 Attribute Sets and Attributes optimization

In terms of optimization and speed improvement, is it better to use: many Attribute Sets with few Attributes. few Attribute Sets with many Attributes
15
votes
6answers
34k views

Magento 2: How to display custom attribute in catalog?

I’ve created a new textfield attribute, with the following settings set to yes: Visible on Catalog Pages on Storefront Used in Product Listing The attribute is assigned to an attribute set and it ...
2
votes
5answers
1k views

How to update the attribute scope programmatically in Magento 2

I have 20 product attributes. I need to change those attributes' saving scope to "Global". How can I achieve this?
2
votes
1answer
2k views

Product dimensions in Magento 2.2.5 update

I have installed Magento 2.2.5 locally with sample data. Now three new attributes Length, Width, Height Added. These are the default attributes, created by Magento 2.2.5 or by some third party ...
1
vote
1answer
11 views

Export attribute set and the attributes that are assigned to it

our attribute sets have become messy, things are assigned to them that shouldnt be and some things that should be havent. Is it possible for me to export to CSV the attribute set name and a list of ...
0
votes
1answer
875 views

Magento 2, opposite of finset needed to filter a product collection

I have a problem in a product collection that I need to filter. I have a multiselect list with countries. When a selection is made the products need to be hidden from these countries. $collection->...
1
vote
1answer
19 views

How can I import multiple select attributes in Magento 2.3.5?

I'm working with a new installation of 2.3.5. I am unable to import a multi-select product attribute. My attribute I'm trying to import is "Year" for auto parts. I have tried importing with ...
16
votes
2answers
1k views

Magento 2 Show customer attribute in ui_component form

I've created ui_component form where I need to show customer details, same as Customer Edit. But, I am able to show their data from customer_entity table. DataProvider.php public function getData() {...
0
votes
1answer
25 views

Magento 2 attribute search product results

I have a multi-select attribute with n number of options. I have assigned some options for the products. For example, I have an attribute color and have options like blue, red, green, and yellow ...
0
votes
1answer
1k views

Magento 2 In which database table is the attribute Position stored?

I need to write my own MySQL query, where I need to use the attribute Position in the query. But I can not see which table attributes Position stored in. In my *eav_attribute* table, the attribute ...
0
votes
2answers
1k views

How to set a default value for a attribute to all products

I have create an attribute "Brand Name" from Catalog > Attribute > Manage Attribute. I have only one brand name so i want to set that name in "Brand Name" attribute for all the products. How ...
1
vote
4answers
1k views

Custom Attribute's Value Null at Frontend

I am new with Magento. Now I'm using magento 1.9 So I add new attribute for my products via backend magento admin. I already assigned that attribute to my product's Attribute sets. the attribute code ...
1
vote
1answer
1k views

Magento 2 product “packs”

I want to implement a store with many small products that are usually bought in bulk (maybe 20-100 pieces at once). So I want to implement product "packs", i.e. a "pack of 10" alongside a "pack of 50"....
0
votes
2answers
30 views

How to retrieve product attributes values in Magento 2

I want to get configuration product attributes values in phtml file. Above two value i want to get in magento 2. So please Explain me How to get. THANKS.
1
vote
2answers
27 views

Insert custom canonical value on category page in Magento 2

I've created a module to add a custom category attribute (custom canonical URL) to a category page, based on Display custom canonical URL on category page in Magento 2 question. Here is the contents ...
0
votes
1answer
11 views

Show Categories Filter with Custom Attribute

I have to get the list of categories those have a specific attribute assigned, So to achieve this i have created a custom attribute boolean type like this: public function install(...
0
votes
1answer
29 views

How to get custom order attribute in API?

In sales_order_grid table I have this custom field: This field was added by this extension: https://github.com/boldcommerce/magento2-ordercomments Is it possible to add it as "custom_attributes&...
0
votes
1answer
26 views

Magento 2 load multiselect attribute values in product list

I am trying to load multiple values of Color attribute in product list phtml file with this code: <?php echo __('Color: ') . $_product->getAttributeText('color'); ?> But I get array error: ...
0
votes
0answers
58 views

Magento 2.4 | Filters are no longer seen with Elasticsuite

I have updated Magento to version 2.4.2 and have also activated Elasticsuite as the default search engine. Elasticsuite installation went smoothly and the module is correctly installed. The search bar ...
0
votes
2answers
1k views

Magento Get Attribute values Collection by filter

I am using Magento 1.9.3.6 version. I have an attribute called brand. I want to get brand attribute's values collection by filter in order to show it in input text box as autocomplete suggestions. I ...
0
votes
2answers
994 views

Additional Attributes

I saw you helped someone out. I am just seeing if you could assist me as well. I am using Magento 2 now instead of Magento 1. I have created my attributes for each of my products but in Magento 1 it ...
20
votes
2answers
78k views

Magento 2 : Get Custom Attribute Value of Product [duplicate]

I'm trying to get custom attribut from my product. I tried various methods like below, but non of them worked. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); /** @...
1
vote
3answers
2k views

Show brand attribute in product listing

I would like to show the Brand attribute under the product name on the listing page. Attached is a screenshot for reference.
1
vote
1answer
3k views

Echo custom attribute with getResource() ->getAttribute

I'm trying to show all available sizes for one product on list.phtml I've set up a custom attribute size_age (id:142) but when I try use the code $attributeLabel = $customer->getResource() ->...

1
2 3 4 5
45