Skip to main content

Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

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

Magento 2 : attribute not appearing in product

"tax_class_id" is the attribute i am looking for in product, but i cannot find it. I can confirm the attribute is added in "Default" attribute set & product has also same set ...
devhs's user avatar
  • 507
0 votes
1 answer
2k views

magento 2: how to checked use default value for product status programmtically?

I have to update and checked checkbox for use default field for product status. But I do not know how to update and checked that checkbox ? here is my code $objectManager = \Magento\Framework\App\...
Niraj Patel's user avatar
1 vote
1 answer
1k views

REST API and custom attributes

My magento installation has 3 stores (domain+language). I would like to update custom attributes for products. When I call GET products/my_test_sku?storeId=1 i get something like the following json: {...
Mikkel Mortensen's user avatar
0 votes
2 answers
862 views

Custom product attribute storefront property 'Used for Sorting in Product Listing' is disabled

Stores > Attributes > Product > My Custom Attribute > Storefront Properties tab I'm not able to change the Storefront Properties 'Used for Sorting in Product Listing', since it is ...
Sudhanshu Bajaj's user avatar
1 vote
1 answer
2k views

Magento 2: Get all the option label (per store scope) from attribute code

Currently my code is use Magento\Eav\Model\Attribute; use Magento\Eav\Model\AttributeRepository; use Magento\Framework\Api\SearchCriteriaBuilder; $searchCriteria = $this->searchCriteriaBuilder-&...
bryanxkier's user avatar
0 votes
1 answer
737 views

Magento2 | Add select-box with search/filter option | Auto suggestor

I am try to add a search bar to the product custom dropdown attribute. I am able to add it using xml and data is also getting saved, but after loading the product again, it is not showing in admin. ...
Vivek Khandelwal's user avatar
0 votes
2 answers
1k views

Max length as input validation for product name attribute

I want that the maximum of character of product name attribute is 50 character per example in the back office. I can not find that on default input validation on product name attribute managing. Help ...
Toranto mina's user avatar
1 vote
1 answer
2k views

Product attribute create/update using rest api and assign it to attribute set

I am creating product attributes using rest API with the below request body. End point rest/V1/products/attributes/ { "attribute": { "is_wysiwyg_enabled": false, &...
Zahirabbas's user avatar
  • 2,073
-1 votes
2 answers
1k views

Adding custom customer attribute with declarative schema and db_schema

I added a custom attribute in de customer_entity table with db_schema.xml. I can get the value of that attribute with getdata('debtor_id') but I can't set it with setData('debtor_id' ,2). Did I miss a ...
amjada's user avatar
  • 11
0 votes
2 answers
257 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 ...
Angelo's user avatar
  • 89
0 votes
1 answer
81 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 ...
Mr.Devops's user avatar
  • 179
2 votes
1 answer
2k views

Magento2 Graphql get select attribute options label instead of option id

I am using v2.4 in which in the products query I am getting the Optionid of select attribute instead of attribute option label. Like if i try to get color(select type) then I get value of red instead ...
Mage2Solutions's user avatar
0 votes
1 answer
752 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 ...
Ramesh KR's user avatar
  • 876
1 vote
1 answer
49 views

Product attribute creation error in admin catalog product

I have UpgradeData.php script that will install the attributes which I need, if (version_compare($context->getVersion(), '1.4.6', '<')) { $groupName = 'Data ...
Elavarasan's user avatar
0 votes
1 answer
121 views

Why wont the product description attribute, when set to TextArea, convert line breaks to <br>

Magento v2.4.2 My product description attribute was set to TextArea, and its worked fine for the last year. New lines where rendered as in HTML on the product page. I decided to change it to ...
IceCactus's user avatar
1 vote
1 answer
128 views

Move Product Attribiutes from More information Tab to details tab

I would like to move all product attributes from selected product to details tab. I try to do something like this: <move element="product.attribute" destination="content" after=&...
Mateusz's user avatar
  • 25
0 votes
0 answers
187 views

Magento2 - Attribute taking 0 as default value

I have a strange issue and not sure what is wrong, I have identical attributes (see image below), but the strange part is when I keep Metal 02 Weight blank and save the product its taking 0 value ...
NileshPlus91's user avatar
0 votes
2 answers
836 views

Add attributes to bundle-product options

How can I display custom product attributes for bundled products options? Products that are used as bundle-option are not fully loaded, so i cant access all/custom attributes. (Right?) E.g. I'd like ...
sv3n's user avatar
  • 11.7k
0 votes
1 answer
30 views

Removing attributes from New Cart Price Rule - Actions tab

At New Cart Price Rule -> Action Tab. There is a green plus mark, where I can choose Conditions. The problem is, that I see there all added attributes to Magento but I need only few. Is there a way ...
Michał Parma's user avatar
0 votes
1 answer
99 views

possible to write product custom attributes into session?

I have a product custom attribute, want to write in session when then product detail page was load. So I can get use the session value on the other block on the same page. Anyone can give me an advise?...
Paul Fan's user avatar
  • 658
0 votes
3 answers
85 views

Not able to get product image

How to get product image in "default.phtml" file ? Magento2/vendor/magento/module-sales/view/frontend/templates/email/items/shipment/default.phtml I am getting the shipped product object in ...
devhs's user avatar
  • 507
1 vote
4 answers
3k views

Product Attribute always returns null

my products have a custom attribute named producing_days and im pretty sure that it has a value in catalog_product_entity_varchar now I'm trying to access producing_days from quote item /* $item is ...
mendz's user avatar
  • 143
0 votes
0 answers
137 views

Product grid - sorting by custom field - not treating as integer

I have a Magento 2.4.1 site where I've added a custom attribute to store a discount percentage. I want to sort a category by this value. However, in the grid list view (based off the Luma theme), it ...
fistameeny's user avatar
0 votes
1 answer
1k views

Display attribute value as a Product Tab label in Magento 2

I added a new product Tab which displays the custom attribute value. app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml <referenceBlock name="product.info.details"> ...
Manjunath's user avatar
  • 177
1 vote
1 answer
229 views

Magento 2.3.5: Attribute value is changing automatically after every hour

I have created a custom attribute with Yes/No values in Magento 2.3.5. Its value is changing automatically after every hour from Yes to No. I can't figure out what is changing its value. Can any know ...
Ismail Zafar's user avatar
0 votes
1 answer
31 views

In Current variation product weight not showing

I have added weight to the product but weight is not displaying in grid section
Akshay Kamble's user avatar
0 votes
1 answer
230 views

Adding a productAttribute handler in Magento 2.4

I'd like my Magento 2.4 module to be able to modify the output of one of the product attributes programatically. I see that the ability to create a handler for this purpose was added in Magento 2.3.4, ...
Nick's user avatar
  • 121
2 votes
1 answer
654 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 ...
jihollon's user avatar
1 vote
1 answer
675 views

Unable to edit/add product attribute in admin in magento 2.4.1

Kindly help if anybody have any idea
Twinkle Gupta's user avatar
0 votes
3 answers
614 views

Show product attribute on product page magento 2.4

i need to show an attribute to product page under the name of the product. The attribute is text and the code is plustile I try to load it to a shopbybrand extension that has a block in the wanted ...
Pantelis's user avatar
  • 109
0 votes
1 answer
239 views

M2 - How to get attribute on Product Page showing above title

I am using custom theme inherit from blank theme, i want to display my attribute on product page above title, how to do that?
zus's user avatar
  • 175
0 votes
0 answers
150 views

Magento2 - How to update the value of an option of a product attribute programmatically?

I'm using the REST api and believe that we can't update the value of an option of a product attribute: we only have the POST method and no PUT. So, what would be the best way to do it in code? In fact,...
Jorge Silva's user avatar
0 votes
1 answer
199 views

Magento 2: Get price for every attribute

I want to get price per attribute (this price will change when I change color or other attributes). Here is the method that shows the estheics swatch: protected function extractNecessarySwatchData(...
Oancea Ciprian's user avatar
0 votes
1 answer
679 views

Recently viewed products are empty in custom layout template in Magento2

I am loading a new template for product detail page based on the product attribute value. I have used the following code Vendor/Module/etc/events.xml <?xml version="1.0"?> <config ...
Jafar Pinjar's user avatar
  • 1,949
2 votes
0 answers
309 views

Display specified variations of a configurable product in category display page, all linking to configurable PDP

This is less of a coding question and more of community knowledge. We would like to include product filters on our site, specifically for size and width. However, at the moment, for products with ...
callamh's user avatar
  • 21
0 votes
3 answers
1k views

Magento 2 - Field "Tax Class" not showing

I have the problem that for a custom new product type there are no taxes getting calculated and are always 0. I found a solution here. It says there is a dropdown in the product details called Tax ...
Black's user avatar
  • 3,380
2 votes
0 answers
222 views

How to set different product attribute Default value for different store view?

I'm using magento 2.4, i just created a new product attribute like this: $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, 'brand_history', [ ...
Padawan's user avatar
  • 135
0 votes
1 answer
212 views

Magento 2 - Delete/update all products attribute values by attribute_code

In Magento 2, How to do a mass deletion of all products attribute values, by attribute_code. For exemple I want to delete all values for attribute_code = "my_code". EDIT I also want to ...
Fbr's user avatar
  • 167
0 votes
1 answer
1k views

Validate uploaded file extension product save in Magento 2

I have created a product attribute input type as 'file'. Vendor\Module\Setup\Patch\Data\AddProductPdfProductAttribute.php namespace Vendor\Module\Setup\Patch\Data; public function apply() { $this-&...
Manjunath's user avatar
  • 177
0 votes
1 answer
303 views

Magento2 custom sql to get data from external table and import into product

In Magento2 I am trying to connect to an external database and table and use the data to update a custom product attribute where the sku' match in both tables. I temporarily put this code in my footer....
Jayreis's user avatar
  • 725
2 votes
2 answers
12k views

Elastic search illegal_argument_exception error "Text fields are not optimised" but it's NOT A TEXT FIELD

I upgraded to 2.4.1 and elasticsearch, which I did not use before. In my log I find the following error "type":"search_phase_execution_exception","reason":"all ...
iphigenie's user avatar
  • 1,739
2 votes
2 answers
2k views

Magento 2 dynamic rows add row not working

I'm trying to add dynamic rows in the product edit page. I have successfully added a dynamic row UI component; the problem is the 'Add' button is not working after one row is inserted. Thanks! this is ...
user91404's user avatar
0 votes
2 answers
51 views

How to show related products Magento 2.3.5

I want to show related products on product page only from my custom module. I am not sure if I can or is it possible to do it. I am doing a check by if my attribute is enable I will change the outcome ...
Jack Brooks's user avatar
0 votes
0 answers
81 views

Magento 2 I have product id and attribute ids, How can i automatically select that attributes in particular product?

i am making one custom form where i am loading particular atrribute collection, and save attribute id in custom table with product id. now at the moment when data save in custom table, i want that ...
quickshiftin's user avatar
3 votes
1 answer
387 views

how to show product SKU below product name only on product page

I am using porto theme in magento 1.9. i want to display product SKU only on product page below product name. how can we add product SKU on product page.
Syze Developer's user avatar
2 votes
1 answer
2k views

Magento 2: Keep use default value when Updating product attribute programmatically in store view level

I have a dropdown product attribute in store view level that i need to update programmatically for specific store: I tried to update the product attribute programmatically like this: // \Magento\...
Tiny Dancer's user avatar
0 votes
1 answer
921 views

Unable to change product status - for "All store views" (Global Store)

I am in need to disable a list of SKUs. For that I have created a console command, read the CSV and then setting product as disabled. I am facing an issue that I am not able to make product disabled ...
Narendra Vyas's user avatar
1 vote
1 answer
38 views

Using a new attribute as product name

Using Magento 2.3.2. Following on from my other question about changing the product description to another attribute, I would also like to display a new attribute - 'website name' as the product name ...
user355218's user avatar
0 votes
2 answers
37 views

Using a new attribute as product description

Using Magento 2.3.2. We currently sell through our website, and Amazon and Ebay via the M2E Pro extension. Our current product description is used for the website and Ebay, and the short description ...
user355218's user avatar
0 votes
1 answer
261 views

Magento 2 : How to move a block next to size attribute label on product page. [Size Chart]

I want to move a block next to size attribute label: How can I do this? Thank you very much!!
IvannVerano's user avatar

1 2 3
4
5
37