Questions tagged [attribute-options]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
5answers
19k views

Get Attribute option Id by Attribute admin value

For a Magento Dropdown Attribute, it is possible to get an Attribute option Id by Attribute admin value?
6
votes
4answers
5k views

How to get additionnal 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\...
6
votes
3answers
23k views

Get Custom Option Values of a product magento 2

I have two custom options for a product. Color and Size and both are drop-downs. In product detail pages, I have to display all available colors of that product. I tried the following code and it ...
5
votes
3answers
4k views

Can't update or delete attribute options

I have a strange problem with Magento. Recently I'm not able to delete an attribute option or update the postion of an attribute option. When I change the position i.e. from "3" to "0", it will just ...
4
votes
1answer
5k views

Magento 2 how to get product attribute options on checkout cart

How I can get the configurable products attribute options in front end checkout cart page? I have tried with the below answer but can't get any success. Magento 2 - How to get attribute options value ...
3
votes
3answers
9k 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->...
3
votes
2answers
3k 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 (...
3
votes
2answers
618 views

Get Product Options for each Product in the Catalog

I am trying to build a script that outputs all the product options for each product in the catalog into a CSV file. I have tried using the code on this page: http://www.atwix.com/magento/configurable-...
3
votes
1answer
5k views

how to get swatches attribute option in magento 2

how to get progmatically swatches attribute option data in magento 2. I tried this:- \Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\CollectionFactory $options = $this->...
3
votes
1answer
93 views

How do I create a configurable product with 3 options

I apologise for the vague title, I didn't know exactly what I'm asking so I'll explain and maybe someone else can come up with a better title...or the solution. I'm trying to create a website that ...
3
votes
4answers
5k views

How to get option_id of an option by label? (magento 2)

I want to get the option_id of one of the options on an attribute, but I only know the label of the option (by label, I mean the 'value' column in eav_attribute_option_value). How can I get it? ...
3
votes
0answers
117 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->...
3
votes
0answers
63 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 ...
3
votes
1answer
340 views

Configurable Options within a modal for non-selected options

I want to write a frontend functionality for configurable products. If there is no configurable attribute given, I want a modal to popup which asks the user to select options. The options should be ...
3
votes
1answer
418 views

How to group the options of an attribute in layered navigation frontend

How can I group the options of an attribute alphabetically in layered navigation frontend? I have approx 300 options for an attribute and I need to group them, such as [A-C] [D-F], etc. The idea is ...
2
votes
2answers
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 ...
2
votes
1answer
5k views

Get option label associated with admin store in Magento 2

I want to go through all options of attributes configured for filtering and output the label of the Admin Store View. I only managed to get the Default Store View (store_id 1) label with the following ...
2
votes
2answers
3k views

Some product options remain disabled after the first selection

I am using Magento CE 1.9.2.4, and the Porto Theme. I have some Configurable Products with a lot of variants (in some cases there are 5 attributes, each with several options). Each variant has a ...
2
votes
1answer
2k 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, $...
2
votes
1answer
604 views

How to retrieve option store label?

Could someone teach me how to retrieve the option label for current store view? There is a table eav_attribute_option_value where these information are already stored, but I don't know what model I ...
2
votes
2answers
3k views

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

Need way to add options to already created Color attribute.
2
votes
1answer
127 views

Merging Options

Hi to everyone,  can I Merge Options from different Attributes? I have 3 Attributes (Length, Width and Height) that allows Customer to Filter Products by Length and/or Width and/or Height. In ...
2
votes
0answers
57 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 ...
2
votes
3answers
3k 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')->...
2
votes
0answers
3k views

How to add multi select Custom Attribute Options Programatically

I am working on to create custom attribute, While creating the attribute i need to add multiselect custom attribute option via code. $eavSetup->addAttribute( \Magento\Catalog\...
2
votes
0answers
269 views

Manage option value of attribute option disappears

I have an attribute named as Product_type. Catalog > Manage attributes > Attribute Name(Product_type) > Manage Labels/Options > Manage Options (values of your attribute) When I choose Use In Layered ...
1
vote
2answers
3k views

Get Attribute Option Position from Option value

I have a dropdown attribute with many options. In cart.phtml I already get the attribute value for each item Mage::getModel('catalog/product')->load($_item->getProduct()->getId())->...
1
vote
2answers
644 views

Add new option to existing product attribute

I am trying to use the function addAttributeOption to add a new option to an attribute. I do not want to change the current option order or defaults but simply want to append a new option to the end ...
1
vote
1answer
142 views

Programitically created attribute displaying incorrect attribute options

I have written the following code to create an attribute in magento 1.9 $name = $data['name']; $attributeSetId = $data['attributeSetId']; $attributeGroupId = $data['attributeGroupId']; //create a ...
1
vote
1answer
2k views

Foreign key constraint fails when trying to add custom product attribute option

I added a product attribute called size from admin with the same settings as color attribute. Now when i programmatically try to add an option to this attribute I get a MySQL error: Cannot save ...
1
vote
1answer
798 views

How to get list of attribute options in frontend view?

I'm writing a custom display for certain attributes based on its label. Within the 'configurable.phtml' file, it has the following lines: $_product = $this->getProduct(); $_attributes = Mage::...
1
vote
1answer
2k views

Not able to update or delete attribute option in admin

I am not able to update or delete the product attribute options in admin-end. When I am clicking "save" or "save or continue" after updating or deleting the attribute option, Magento shows me the ...
1
vote
1answer
122 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. ...
1
vote
1answer
396 views

Configurable product option values in database

Where are configurable product option values, stored in the database?
1
vote
1answer
70 views

Select attributes with numeric labels

I believe this is a core Magento bug, but thought I'd come here to ask for some suggestions anyway. I've got an attribute, let's call it colour_code. It's a select attribute (backend is int) and it's ...
1
vote
1answer
38 views

How to I add another option to an existing select attribute?

I have created an attribute using the following install script: <?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->...
1
vote
1answer
501 views

Sorting attribute options

I am adding new options to some existing attributes using the method below. $option['attribute_id'] = $attribute->getId(); $option['value'][$value][0] = $value; Mage::getModel('eav/...
1
vote
0answers
21 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 ...
1
vote
0answers
44 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:...
1
vote
0answers
46 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
1
vote
0answers
398 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() {...
1
vote
0answers
21 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. ...
1
vote
1answer
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 ...
1
vote
0answers
108 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 ...
1
vote
1answer
292 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) ...
1
vote
1answer
310 views

Retrieve all the available color in product collection

I have a custom product collection and products inside this collection has variety of colors. I want to retrieve all the colors available inside this product collection and store it in array. $layer ...
1
vote
0answers
2k views

Multiselect attribute The value of Admin must be unique

I upgraded magento2 to 2.1.6 When I try add option to multiselect attribute i see message: The value of Admin must be unique. How can I fix it?
1
vote
0answers
211 views

Configurable Product attibute option selection from Wishlist in magento 1.9?

I want to Display all Configurable swatches and Attribute Dropdowns to Wishlist for Configurable Product, so the customer can select from there and directly move product to cart. No need to go on ...
1
vote
1answer
750 views

Import Bulk Attribute Options in Magento 1.9.2.3

i am using Magento 1.9.2.3 version. I have a brand attribute and i want to import all its option through csv file. Is there any way to import bulk attribute option? thanks
1
vote
0answers
887 views

How To Add Product Option of configurable product To Wish List in magento and show selected on product page

I want to add product option in magento wishlist. And when we click on product it will show selected on product page. I search extension for this but i did not not found this. My need is to saved wish ...