Questions tagged [attribute-options]

The tag has no usage guidance.

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

Magento 2 Update Attribute Options Data Programatically

I have created the 2 attributes in the Admin 1. Color 2. Material. I'm going to add the attribute options with swatch image programatically. For this I have created the custom code. Import Color: ...
m2dev's user avatar
  • 63
0 votes
0 answers
14 views

Quick search can't receive products by attribute options name. Magento 2

this is a config attribute, i added yes in search of usage, also i do indexing and clearing the cache, but search can't return product by attribute option name, who can can say what the problem ? ...
Rub Hayrapetyan's user avatar
3 votes
1 answer
78 views

How to manage many product attributes in Magento 2

We have a website and fetching the products from the third party ERP. In the third party ERP there are around 2100 product attributes. So we need to create all attributes in the Magento. So want to ...
Sunny Rahevar's user avatar
0 votes
1 answer
89 views

Magento2 get product brand option text by value in Plugin

I am trying to get the option text from the option value in Plugin, but I can get the value but can't get the text. May I know any way to do so? app/code/My/Module/Plugin/DefaultItem.php <?php ...
hill2011's user avatar
1 vote
1 answer
321 views

How do I get all option value id's for a given attribute in a specific category in my custom block?

My shop has an attribute manufacturer. This attribute has option values like adidas and nike etc. I have a custom module with a block I placed the block on a specific category through a widget The ...
Akif's user avatar
  • 1,462
0 votes
1 answer
24 views

How can I get the codes from the options of an attribute?

public function getOptions($attributeCode) { $attribute = $this->eavConfig->getAttribute('catalog_product', $attributeCode); $tmpOptions = $attribute->getSource()->...
Alfredo Esteban Hernndez Dvalo's user avatar
3 votes
1 answer
143 views

Magento 2.3.4: Add new column to Manage Options of Product Attribute

Like the title, I'm trying add new column to Manage Options. The problem is that the style of the row I want to add is select. It is showing but when I click on the select box, the list of options is ...
Simpa407's user avatar
0 votes
1 answer
206 views

Magento 2 : Get option name rather option id in product collection

Hi I am using below product collection,but it returns option id of attribute in collection my question is how to get option label rather than option id in collection. Is there any way ? Because I am ...
Niraj Patel'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
418 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.
Mohit Patel's user avatar
  • 3,671
2 votes
1 answer
1k 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
1 vote
1 answer
329 views

How to get drop-down options in more-information tab in Magento 2

I want to get Configurable products dropdown attributes all options show in more-information tab. See Below image:- below all options show in more-information tab. Please Help How to achieve this. ...
Mohit Patel's user avatar
  • 3,671
0 votes
0 answers
748 views

how to get custom attribute select option values from custom table in Magento 2.3.5

I want to get attribute option value which is created from admin side in using custom field in magento 2.3.5 please anyone can have knowlwdge about it then please share with me. Thank you in advance.
Deep Shah's user avatar
  • 525
0 votes
3 answers
2k views

Sort attribute option alphabetically in Magento 2.3

I am trying to sort show the attribute option in alphabetically for the configurable products. Followed below answer. Configurable product attribute sort order in Dropdown 2.12 But in 2.3.4 the ...
Manjunath's user avatar
  • 177
0 votes
2 answers
109 views

Magento 1.9: How to translate TITLES and TITLES OPTIONS of the "Custom Options" of simple products?

I need to translate all the TITLES and OPTION TITLES of the Custom Options related to simple Magento products. The need is: 1- Export all the fields of the "custom Option" 2- Translate them (or how to ...
ANG's user avatar
  • 11
2 votes
0 answers
279 views

Magento 2 : Add new Product attribute options

I have added a product attribute programmatically. so in store->product->attribute it shows option values readonly. Is it possible to add new option from admin side ? Ex. because it is system ...
Dimple Panchal's user avatar
0 votes
0 answers
458 views

How to add a text column to magento dropdown attribute option in Magento 2?

I would like to extend the options grid for a dropdown product attribute with a new text field which will appear as a new column. In that field I'm going to store the matching ERP_ID but I would ...
gabtzi's user avatar
  • 626
3 votes
0 answers
300 views

Magento 2: Retrieving and updating Attribute Options and Store Lables

I am currently trying to update an attribute options store label and facing some issues. I can successfully update option store labels by calling $storeLables = []; $optionLabel = $this->...
Glen Robson's user avatar
0 votes
2 answers
418 views

Magento 2.3 how to get attribute options label by value in block

I am getting attribute values of an attribute color as 5567, 5568, 5569 etc in block of my custom module. I want to get the attribute color instead of values as red, blue. I am getting values as ...
chanchal's user avatar
  • 397
1 vote
0 answers
26 views

How to add existent options inside product options

I trying to add simple products and after associate these products in a configurable product, but some options of these products can't be exists. So, I add options using EVA config and return id of ...
Matheus Prado's user avatar
0 votes
1 answer
158 views

Manage Attributes - New Options not saving - 1.9.4.1

In Magento Admin going to catalog/attributes/ Choose a specific attribute, such as "Artist" Go to Manage Label/Options Add Option (in this case an artist's name) Click Save Attribute or Save and ...
Classic's user avatar
  • 179
0 votes
0 answers
55 views

Magento 2 :- How to get newly added options id of product attribute & Deleted option id of attribute

I want to get lastly added product attribute options id and also need to deleted option id in the following event: catalog_entity_attribute_save_after Anyone can help me with this?
Deepak Upadhyay's user avatar
2 votes
0 answers
94 views

The image is not assigning to the correct attribute option after sorting when use visual swatch- Magento 2.3.1

Summary of Issue: I am looking to sort the color attribute options programmatically with input type 'Visual Swatch'. I have made customization in below files to sort the attribute options: File 1:...
1990rk4's user avatar
  • 573
3 votes
0 answers
149 views

How to disable duplicated values options when adding new option of an attribute magento 2

I have set the attribute color as unque value but still can add same value and i have tried with an event catalog_entity_attribute_save_before but now he delete all the label and values please any ...
Developper Magento 's user avatar
1 vote
0 answers
64 views

How to get a selected simple product id from configurable option in category product listing in magento 2

How to get a selected simple product id from configurable option in category product listing in magento 2
Divya Sekar's user avatar
  • 1,441
0 votes
0 answers
33 views

How to display options of custom attribute product magento 2?

I have created a custom attribute for product and I can add options dynamically as well. But the problem now I'm facing is that I want to display just the option relative to the current product, so ...
Developper Magento 's user avatar
3 votes
4 answers
6k views

Magento2 : How to add attribute options values into dropdown attribute programmatically

Need way to add options to already created Color attribute.
Sourav's user avatar
  • 1,298
1 vote
0 answers
736 views

magento 2.2.2 You need to choose options for your item

I want to add a configurable products to cart via ajax, for this I have tried below code but it always raised the error “You need to choose options for your item”. Code public function execute() {...
Narayan's user avatar
  • 119
1 vote
0 answers
25 views

Change store attribute option value to display in product edit magento 1

I added my attribute, but it can not display another store view option value (ex: below picture) in product edit. It always display default value. Please help me find a solution to this problem. ...
Thanh TN's user avatar
  • 307
0 votes
1 answer
655 views

Create/Update Attribute Option Custom api issue

I have created custom rest api to create/update attribute options by attribute_id. Here is my webapi.xml file code. <route url="/V1/attribute/AttributeOption" method="POST"> <service ...
Jafar Pinjar's user avatar
  • 1,889
0 votes
2 answers
118 views

What is the recommended method of overriding protected methods?

I was going to create a plugin so that I could extend Magento\Eav\Model\ResourceModel\Entity\Attribute::_processAttributeOptions(). However, because this method is protected, I am unable to do so. I'...
tylersDisplayName's user avatar
2 votes
1 answer
3k views

Magento 2 Get Attribute option Id issue with core method

I am using below code to get the option Id with an attribute value/label in a custom extension. /* * Get attribute id based on option value */ protected function getAttributeOptionId($attributeCode, $...
Akif's user avatar
  • 1,462
0 votes
1 answer
2k views

Update attribute Option label with id magento2

I am trying to update attribute option label with attribute optionid. Used below code. class Attribute { protected $eavAttributeFactory; public function __construct( \Magento\Eav\Model\...
Jafar Pinjar's user avatar
  • 1,889
2 votes
2 answers
1k views

M2.3 - Creating multiple attribute options at once generates error

I am trying to add multiple attribute options to an already existing attribute. During the loop, it will create the first option, and then throw an error. Fatal error: Uncaught TypeError: Argument ...
JJ15's user avatar
  • 820
2 votes
1 answer
444 views

How to add new field in product attribute options in Magento 2

I want to add custom field for attribute options in Magento 2 how can I do?
Vinod Kumar's user avatar
  • 2,045
0 votes
2 answers
1k views

Magento 2 Get product attributeId in foreach loop

I have a collection of product I am looping and displaying for E.G ... $product->getName() ... $product->getProductUrl() ... Now Also I am getting it some option like attributeText foreach ...
Juliano Vargas's user avatar
5 votes
3 answers
5k views

Magento 2: How to get value from attribute from store_id 0 (admin/unique)?

I'm trying to get store label for admin (store 0 - zero) but since I have something in "Default Store Label" I'm getting only that value. I need to find the solution to get always only the admin (...
Fred August's user avatar
0 votes
0 answers
168 views

Attribute options import in magento 2

I have added additional colomns description and image in eav_attribute_option_value table. Which means each option of an custom attribute has its own description and image. I have saved the ...
Jaisa's user avatar
  • 2,522
0 votes
0 answers
951 views

Magento 2 update product attribute options programatically

I have a website with multiple stores (One for each country, around 170 countries in total) and each store has two store views. One for the English language and one for the Greek. Is it possible to ...
Vasilis's user avatar
  • 11
0 votes
2 answers
3k views

How to add new Option to drop down attributes magento2?

How to add an new option to product dropdown attribute? If the option already exist it has to skip adding else add option with new value. I followed the below link How Magento2 add attribute option ...
Jafar Pinjar's user avatar
  • 1,889
1 vote
1 answer
2k 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 ...
Rat's user avatar
  • 834
0 votes
0 answers
228 views

How to get the attribute option list custom block in magento 2?

I tried to get the attribute option list in my custom block for filter the product collection. But not able to get the option list. My Code is: <?php namespace Sample\Shopbyage\Block; use \...
Rat's user avatar
  • 834
6 votes
4 answers
8k views

Magento 2 - How to get additional options product from quote item

I have some Vitrual product with options, I need to get his options but I can just get the info_buyRequest instead of additional_options Here is my code: $objectManager = \Magento\Framework\App\...
PЯINCƎ's user avatar
  • 11.6k
0 votes
0 answers
396 views

Can't Access Checkout Page

I tried to access my checkout page, but it returns blank page, and when i checked the error log, i got this message: [Thu Mar 29 10:30:46.928754 2018] [proxy_fcgi:error] [pid 17712] [client x.x.x....
nortonuser 's user avatar
0 votes
1 answer
129 views

Magento 2: Is there any way to add bulk option add in attribute?

I have list of option value for attribute, But i just need to save this value in attribute at one time . i already used below script, using this script i have to save attribute on every new option ...
Dhaval Vaghela's user avatar
1 vote
0 answers
113 views

Add internal code to Eav Attribute option?

I am new to Magento 2. All my data comes from an external db. Before importing my products into Magento, I want to prepare the environment. I am currently trying to set up custom EAV attributes with ...
Minivio's user avatar
  • 21
1 vote
1 answer
447 views

Configurable product option values in database

Where are configurable product option values, stored in the database?
Metal Mathematician's user avatar
1 vote
1 answer
323 views

Magento BUG : Not able to delete Products Attributes Option/Labels?

If i delete one of the attributes values and save, keep the value exist, it's not delete.. how can i solve the issue magento error. Note: php.ini => max_input_vars = 8000000 (master Value) ...
zus's user avatar
  • 145
3 votes
3 answers
13k views

Create Product Attribute Of Type MULTISELECT or dropdown select & Create Option Labels Diffrent for Diffrent Store using install or upgrade schema

I am creating custom Product Attribute Of type MULTI SELECT, I want to create different option label for each stores for this particular Attribute, I have tried with this below code, $eavSetup->...
Rizwan Khan's user avatar
  • 1,939
2 votes
3 answers
4k views

Get values of your attribute option text from product

I want to get value of attribute option text from product based on store id. I want to get admin text for attribute option. $attribute_option_id = Mage::getResourceModel('catalog/product')->...
user00247's user avatar
  • 638