Questions tagged [dropdown-attribute]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
3k views

How to create customer custom Drop Down attributes in magento 2

Namespace/Module/setup/installData.php $customerSetup->addAttribute(Customer::ENTITY,'credit_type', [ 'type' => 'int', 'label' => '...
4 votes
2 answers
3k views

Magento2 Add dropdown option in product listing page for configurable product

I want to change text-swatch to dropdown in category page. I want here drop down instead swatch
1 vote
1 answer
2k views

Magento 2 how to add city dropdown

i am trying to city as dropdown in only checkout page with following script in Magento\Checkout\Block\Cart\LayoutProcessor.php $elements = [ 'city' => [ 'visible' => true, ...
0 votes
1 answer
37 views

Magento 2 Add Quantity Dropdown and to show Textbox when Quantity selection is 10 from dropdown at Cart Page

I want to add dropdown of 1 to 10 of quantity at cart page and if customer choose the 10 from quantity dropdown then the textbox appears for quantity field. please help me. thank you.
2 votes
1 answer
1k views

Magento2 - Set value for dropdown type product custom attribute programatically

I have a custom attribute with code 'manufacturer'. Its Catalog Input Type for Store Owner is 'Dropdown'. How can i set the value for this attribute programmatically on product save. I am trying ...
2 votes
2 answers
3k views

Magento 2 Rest API - how do I add values to dropdown product attribute

I have problems in adding values to an existing product attribute, using the API POST /products/attributes/:attribute_id/options. The corresponding GET API is working fine, as explained below. I have ...
0 votes
1 answer
2k views

Magento Configurable Product Page Update Custom Dropdown With Attribute Value

So I have a configurable product which has a number of associated simple products. I am trying to obtain functionality on product page where the user can choose a colour for the product, and then ...
2 votes
1 answer
67 views

how to make country dropdown with search box in magento 2

How can i add search input on country drop dawn field in magento i need to add the search input like show in below screenshoot
0 votes
1 answer
43 views

Magento 2 - how can I add 2 dropdowns in the same row?like the picture below

how can i add 2 dropdowns in the same row,how can i add 2 dropdown like the image above
2 votes
1 answer
1k views

How to place sizes in order

We sell clothing and have configurable products that consist of simple products with sizes S,M,L,XL etc. When we choose a product and click on the size dropdown the sizes turn up in random order: M ...
1 vote
2 answers
1k 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 ...
1 vote
1 answer
565 views

CE 1.9.2 - Create Product Attribute based on Custom Module

Sorry, I know the title sounds vague and could be misleading, but here is what I have and what I would like to achieve. I have successfully created an extension which manages Product Distributors. ...
0 votes
2 answers
374 views

Default value for checkout field

I have a custom drop down field on my checkout on the shipping address and am having a difficult time making a default value. I have tried creating a template, specifying a default in a custom layout ...
3 votes
2 answers
620 views

How to Show Admin Label in drop down fillter on product grid?

Admin: When we add any product attribute(Type Drop-Down) in the filter on the product list at that time default store value is showing in filter drop-down options so I want to show admin label value ...
0 votes
1 answer
289 views

Display product attribute dropdown box value on product page, with custom placement?

I'm building a Luma child theme and I want to display my "brand" product attribute above the product title on my product page. I am currently using the following code in my child theme's ...
0 votes
0 answers
1k views

Notice: Array to string conversion in vendor/magento/framework/Data/Form/Element/Select.php on line 135

When I am trying to delete any CMS page or delete any product in the admin backend it throws an error of the Array to String Conversion in directory /vendor/magento/framework/Data/Form/Element/Select....
-1 votes
2 answers
895 views

Magento2 get the customer custom attribute option value

In Magento2 observer, How can I get the customer custom attribute option value as my customer custom attribute in a dropdown. I tried below code but it is not working in observer, it works in block $...
0 votes
1 answer
160 views

Change entries in dropdown list (Customer Title/Prefix list items)

We set up a Magento 2 shop. There are forms for customers to fill out e.g. register in the shop. In the dropdown menu for Name Prefix, I can see some entries for the user to choose. Where can I change ...
0 votes
1 answer
352 views

How to get value for dropdown in custom form?

customform.phtml <div class="field country required"> <label class="label" for="country"><span><?php /* @escapeNotVerified */ echo __(...
14 votes
5 answers
19k views

How to show the drop down attribute value using getData() method in magento 2?

When I try to get data from the material attribute like $_product->getData('material'), it shows the integer value. How can I convert it to the actual front-end value and in which file do I have to ...
0 votes
1 answer
307 views

Unable to select first value from dropdown in jquery

I populated the dropdown with the help of array. for example I have array with elements (ali,abid,naqvi). Problem..... when I clear the cache and reload the page. and first time I am unable to select ...
0 votes
1 answer
55 views

Get dropdown value in helper file?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); /** @var \Magento\Eav\Api\AttributeOptionManagementInterface $attributeOptions */ $attributeOptionsManagement = $...
0 votes
0 answers
69 views

The Text Appears with the dropdown on Custom Module

My code on a custom delivery time module works all fine but it shows the given text outside the dropdown box , I racked my brain trying to fix this and I still couldn't , please do help!! WorkingOff....
1 vote
0 answers
631 views

How to remove price from configurable products drop down options in magento 2.3.2

I have configurable products made with multiple simple products on my magento 2.3.3 site. I have one attribute called Product lenght which consists of Yards and Swatch option. In the dropdown along ...
1 vote
0 answers
154 views

how can I get the custom customer attributes dropdown box to checkout page?

I created a customer custom attribute with options. It did show on the user profile(able to save and edit). How do I make this dropdown box also show at the checkout page? (above shipping method) It ...
1 vote
0 answers
126 views

I create attributes for customer, how to add storefront properties?

I created a dropdown customer attributes by default Magento2. I would like to pull this dropdown box out to the checkout page. When customer at checkout page, they will see that dropdown box above ...
1 vote
0 answers
130 views

Magento 2: How use attributes options for the dropdown box?

I created a customer attribute. it is a dropdown box, I did create Options inside the attributes. It was use in customer profile page. I have a checkout page, want to display this attributes dropdown ...
3 votes
3 answers
14k 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->...
1 vote
0 answers
52 views

Magento 2: Customer dropdown attribute not selecting first option

I have added a new customer attribute which is working fine. The only thing is that I would like it to display the first option selected by default in both admin and frontend side (account create / ...
1 vote
0 answers
436 views

How to get Data of a UI Component Admin Form and use it in Controller?

So i'm creating a UI Component Admin Form with a few fields, and one of them is a Dropdown field. I want to get the value that user selects, using a custom controller that i made. I tried this comands:...
9 votes
6 answers
17k views

Configurable product attribute sort order in Dropdown 2.12

The order of the dropdown is not consistent with the order of the attribute itself. Within the attribute size I have it ordered Newborn 0-3 mo and in the dropdown it shows up as 0-3 Newborn the ...
1 vote
0 answers
148 views

How to create a custom UI Component dropdown field?

Hi i'm new at magento 2 and i want to create a dropdown field with two custom strings options. And if possible in other ocasion i would like to customize with a sql select values.
2 votes
0 answers
16 views

Create 3 product attributes of dropdown, with its values

I am not able to make appear 2 of the 3 new attributes in magento_admin_site here is the code in InstallaData.php <?php namespace Ht\Mymodule\Setup; use Magento\Eav\Setup\EavSetup; ...
0 votes
1 answer
541 views

How to set string value in dropdown attribute programmatically in magento 2.2.X?

I want to set one string value to sizes attribute in drop-down ? //get sage dimension value $dimension = $value->Dimensions; //set value $product-...
1 vote
1 answer
4k views

Add a drop-down field in checkout form Magento 2

I want to add a drop-down here I can add area text field but when it comes to drop-down, I am facing problem.
2 votes
0 answers
984 views

Configurable Product - Disable and grey out out of stock

I've seen some posts about this but can't get to a conclusion. In a configurable product with dropdown all option appears (in stock and out of stock), what I need is to disable the ones out of stock ...
1 vote
1 answer
1k views

How to show the product attribute in the product listing page Magento 2.3

How to show the product attribute in the Product listing page i had used the helper in Magento_Catalog (Magento_Catalog/templates/product/list.phtml) but it gives the value of the product attribute ...
1 vote
1 answer
916 views

How to enable search for selected dropdown values?

I want to keep the dropdown attribute along with their values at frontend (Home Page) for searching the catalog. I entered following code: <div class="search"> <li class="fields"> <...
0 votes
0 answers
31 views

Magento 2 : Custom dropdown for city and state not loading in IE

I created custom city and state dropdown all working fine but in the IE it is not loading. Can anyone please help.?
1 vote
1 answer
812 views

attributes not hiding unavailable product options on product page

I switched from an old magento version ( 1.9.0.1) to the latest stable release (1.9.2.4) and suddenly discovered that the new version has a lot of issue with product attributes. I've managed to solve ...
1 vote
0 answers
94 views

Limiting the number of drop-down options

I have created an attribute which consists of two option. say A and B and on the front-end, I have another attribute which is a drop-down. Is it possible to limit the number of options in the front-...
1 vote
0 answers
127 views

Strike orginal price and show advanced pricing and show total saving in 2.3.3

I have a configurable product in which each simple product is given as advanced pricing. I need to show the both advanced pricing and the original price to be striked out as shown below. It has to ...
0 votes
1 answer
664 views

Add a custom field's in registration form with relationship

I need a little help .. I need to create a new field in the registration form, and this field needs to be dynamic. I enter the panel and add the options that I want to appear in this form, and in ...
2 votes
1 answer
825 views

Magento 2: Configurable product dropdown attributes on category listing page

I am looking for an option to get the configurable product attributes with each product on category listing page. Magento 2 defaults to swatches only. How can we change it to dropdown? Thanks
0 votes
1 answer
113 views

Changing Dropdown attribute to text in magento 1.9 without changing data

In Magento 1.9, I am going to convert my drop-down attributes to text field without changing my current data Below is the image of current attribute set
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 ...
1 vote
1 answer
2k views

Magento 2 : Display dropdown attribute with its label in product listing page [duplicate]

How to display dropdown type product attribute in product listing page and I also want to display that label name? How to display that drop-down attributes? I created in admin. But, it's not ...
0 votes
0 answers
119 views

Magento : Custom extension overwrites gender values. How to Fix?

Shop owner called telling me the gender select in the store contains Apple and Banana instead of male and female. Turns our this was the case in all form frondend/backend. After some digging I found ...
5 votes
0 answers
1k views

Magento 1.7 : Custom Option Validation Dependent on another Custom Option

I need help to apply validation on custom option, that is dependent on another custom option value. Here is the image, which describes what I actually want : Please suggest, I am using Custom ...
1 vote
0 answers
76 views

Magento2 - add dropdown city everywhere in store

Magento2 - I want to show city in dropdown for everwhere in store. I was tried with https://github.com/EaDesgin/Magento2-City-Dropdown but its not working properly.