Questions tagged [select]

The tag has no usage guidance.

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

Magento 2 how add product select to the widget xml?

I want to add a sku product selection to the widget, but I can't find how to do it Please tell me how can this be done
David Young's user avatar
3 votes
1 answer
160 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
685 views

Magento 2: Select first dropdown option on change

I'm new in Magento 2 frontend development (and in development in general) and I am really lost at it, it's being hard to get arround some concepts, so I would like to ask for help in some specific ...
Alberto Privado's user avatar
1 vote
1 answer
558 views

Magento 2 graphQL Get Select attribute option labels in Products Query

I want to get the attribute label value along with the id in the Products graphQL query. like color { id: 12, label: black }, size{ id: 15, label: xl } Currently, it returns the id only. How can I ...
Jancy Abraham's user avatar
0 votes
0 answers
529 views

Get value of dropdown selected option attribute in magento 2

I have added a drop down attribute with data in the product, now I need to get the selected value of option, not label, label i can get via getAttributeText('provider');?>, but i need get only ...
Lerry's user avatar
  • 69
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
702 views

Find all SKU products with tier price?

I want to compare products with tier prices from two databases. From database Magento 1 and Magento 2. Compare them to generate a list of products from Magento 1 that do not have tier prices in ...
Alice's user avatar
  • 148
2 votes
0 answers
76 views

Add search functionality in admin for select

Hi I want to add search functionality in select box in admin form. screenshot: https://nimb.ws/Rj5osS , anyone had any idea? I have this code which creates the field: $baseFieldset->addField( ...
Arsalan Ul Haq's user avatar
0 votes
1 answer
387 views

magento2, create correctly SELECT used collection

i have this code $collection = $this->orderCollectionFactory->create() ->addFieldToSelect(['increment_id', 'global_currency_code', 'status', 'updated_at', 'total_due', '...
Denys Maksiura's user avatar
1 vote
0 answers
16 views

How to Make Grid Component Select Filter Convert to the Like Comparison Operator in SQL

when a filter dataType is configured as select. It will be converted to filterName=selectedValue in the final SQL. When dateType is text, it will be converted tofilterName like '%inputValue%'. My ...
Nero's user avatar
  • 749
2 votes
1 answer
443 views

Magento 2: Custom field Dropdown options admin form always empty

I'm using magento 2.3.4 and I tried to create a custom form with dropdown options like this: <field name="year"> <argument name="data" xsi:type="array"> <...
jojo's user avatar
  • 149
1 vote
1 answer
313 views

Dropdown 'selected' not working in config

I created dropdown in a table similar to Store > Config > Catalog > Invenotry, everything is working perfectly except selected is not working in my dropdown, however values are stored in a ...
Sagar Parikh's user avatar
0 votes
2 answers
296 views

Select option in configuration not store in database

I am following the answer to creating a table with dropdown in Store>Configuration. Its looks good but not storing my selected dropdown value in core_config_data table. currently its storing null ...
Sagar Parikh's user avatar
0 votes
1 answer
432 views

How to sort the options of the dropdown attribute in magento 2

I am using the following code to get the options of the select attribute. Now I want to get the options that should be ordered alphabetically. file.php $eavConfig = $object_Manager->get('\...
Jaisa's user avatar
  • 2,552
1 vote
1 answer
2k views

Magento2: how to create Toggle button yes/no in admin side

here I created a new payment method and want to change the current dropdown option into toggle yes/no button. please check the below code and images. Packt/Shipme/etc/adminhtml/system.xml <?xml ...
irshad's user avatar
  • 171
0 votes
1 answer
824 views

Magento 2 : Out-of-stock not selectable option

I display out-of-Stock in my configurable products. But it is selectable, I like to set as not selectable option for only out of stock. Please let me know.
Priya's user avatar
  • 579
0 votes
1 answer
2k views

Magento 2 Reset Modify FROM select query

How can one modify the FROM in select query without losing the left joins innerJoin etc... ? as I have tried: $collection->getSelect()->reset(\Zend_Db_Select::FROM)->from('table_2') but then ...
Juliano Vargas's user avatar
0 votes
1 answer
710 views

Dependent dropdowns in Magento 2 Frontend

How can I create a pair of dropdowns such that when one is selected, the options for the other one are updated? PHTML <?php $stateList = $block->getStates(); ?> <div> &...
May McFly's user avatar
0 votes
0 answers
124 views

Magento 2 custom module select query doesn't work

I have the following query: SELECT `main_table`.*, `secondTable`.* FROM `table_one` AS `main_table` LEFT JOIN `table_two` AS `secondTable` ON main_table.blog_id = secondTable.blog_id WHERE (...
Juliano Vargas's user avatar
0 votes
1 answer
383 views

Display 'Choose an Option' in select as title only, not as option

I would like to keep the title 'Choose an Option' but when the user click on the dropdown, this label not appear in the proposition. Did you know if it's possible ? What I currently have and I don't ...
Kozame's user avatar
  • 964
1 vote
2 answers
11k views

How to keep lable choosed on select option after refresh page

I wand keep lable choosed on select option after refresh page. Please help me ! Ex : I choosed "Architekten" My select dropdown I want after refresh page, it keep "Architekten" like this My ...
TN98's user avatar
  • 923
4 votes
1 answer
2k views

multiselect form field not saved to database in magento 2

I have created a custom admin form. $fieldset->addField( 'core_units', 'multiselect', [ 'name' => 'core_units[]', 'label' => __('Select Core units'...
Jafar Pinjar's user avatar
  • 1,929
1 vote
2 answers
2k views

Add select options dynamically to admin form in magento2

I have created a model. $fieldset->addField( 'test1', 'text', array( 'name' => 'test1', 'label' => __('Test 1'), 'title' => __('...
Jafar Pinjar's user avatar
  • 1,929
1 vote
1 answer
996 views

How to add a select field to an adminhtml ui_component xml

The goal is to get a drop down list of stores the site has. The current implementation is attempting to add the following into a ui_component xml file around line 100. <field name="store_id"> ...
LucasMaliszewski's user avatar
1 vote
1 answer
140 views

How to add custom attribute to select options?

Is it possible to add custom values to select options e.g. in configurable products? I need to add the sku of the option to the option, so that it will become <option id="354" price="10" sku="...
Black's user avatar
  • 3,130
1 vote
2 answers
44 views

Getting Custom Collection without some fields

It is magento 1.9.4.0 and i need a array with some nodes. When i get the models collection with: Mage::getModel('nstok/nstok') ->getCollection() ...
bahadirdogru's user avatar
1 vote
1 answer
308 views

Magento2 select field value

I am having a form, and a select type field which is rendering good and have correct options but when I am editing an existing record it won't point to the corresponding value. CODE $fieldset->...
Newb's user avatar
  • 85
1 vote
1 answer
90 views

Magento 1 How are div classes generated?

I have this output in couple product pages: <div class="input-box"> <select name="options[82]" id="select_82" class=" required-entry product-custom-option" title="" onchange="...
Trenox's user avatar
  • 397
1 vote
2 answers
2k views

Change attribute from text to dropdown

How can I convert a product attribute type from Text to Dropdown in Magento? I already have attribute values assigned to many products, so don't want to lose these in the process.
John Doe's user avatar
0 votes
2 answers
2k views

How to create customer custom attribute for radio buttons, checkbox in magento 2

I wish to create customer custom attributes with following types: 1.radio buttons 2.checkbox 3.dropdowns Please provide me a solution to create customer custom attribute.
Jaisa's user avatar
  • 2,552
0 votes
1 answer
288 views

add condition to collection join

$collection = $observer->getOrderGridCollection(); //get the attribute id of our custom eav $attributeId = Mage::getResourceModel('eav/entity_attribute') ->getIdByCode('catalog_product', '...
Eudemon's user avatar
  • 47
2 votes
1 answer
3k views

Magento 2 -Admin Grid Select filter with comma separated values

I have created a custom admin grid in my module. It contains a customer group column and it has a select filter. The column values are comma separated groupIds. When I filter the grid based on ...
Jancy Abraham's user avatar
4 votes
2 answers
4k views

Magento 2, addAttributeToSelect not working with product collection?

I am applying these fillers: $collection->addAttributeToSelect('name'); $collection->addAttributeToSelect('sku'); but every time getting full record as comes form: $collection->...
Ajwad Syed's user avatar
  • 1,591
1 vote
1 answer
429 views

Magento 1 and 2 SQL Select Count of picture of all SKUs?

We are in the final steps to migrate from 1 to 2. Now we found that some picture got lost. Is there a way to select all SKUs and their picture counts like: SKU Count 123 2 234 6 345 2 ...
Michael Müller's user avatar
1 vote
1 answer
2k views

Magento 2.2.6: I have an error modifying the select collection

I need to modify the query of the orders in the grid of the backend by representative attribute (custom attribute). I get the following error: Item (Magento\Framework\View\Element\UiComponent\...
chdzma's user avatar
  • 952
1 vote
2 answers
4k views

Select validation in magento2

I am using magento2.1 If I am using class="validate-one-required-by-name and validate-select" it's not working. <div class="control" style="margin:10px"> <select id="myselect" name="...
gill's user avatar
  • 329
0 votes
2 answers
3k views

Magento2 | Listing grid / "select all" option not working

I’m having issue building listing grid in my own module. The fact is that if I select one or severals checkboxes, it works. If I select all (one by one or using the select all dropdown above), nothing ...
Jakk64's user avatar
  • 79
1 vote
1 answer
380 views

custom select type customer attribute not showing magento2

I am trying to create a custom select type of customer attribute for admin only. When I am running my upgradeData script, Its running fine and attribute created in the database, but not showing in ...
Atul's user avatar
  • 905
0 votes
1 answer
1k views

Select2 / Selectize JS does not start domReady! - RequireJs

I have add my requirejs-config.js app/design/frontend/Altravista/my_theme/requirejs-config.js var config = { deps: [ 'js/custom' ], paths: { 'select2': 'js/select2/...
Altravista's user avatar
7 votes
9 answers
9k views

Magento 2.2.3 - Remove price from select field on product page

I was trying to remove the price which Magento adds to the options in a Select field but can't seem to get rid of the price. From what I could find on the internet it should be edited on the following ...
Remco Hendriks's user avatar
8 votes
1 answer
10k views

How to make auto select first child product of configurable product in magento2?

I am trying to make auto select first child product from the configurable product in product detail page. Is this possible?
Jafar Pinjar's user avatar
  • 1,929
0 votes
2 answers
1k views

How can i add select dropdown side of Mass action Button In Magento 2 Admin Side

I would like to get the select dropdown button on the side of Action Dropdown,for my custom grid collection at admin end, how can i achieve it,I would like to display the same dropdown beside. For ...
Learing_Coder's user avatar
0 votes
1 answer
2k views

Add attribute name to configurable select option in Magento2?

By default, the drop-down box for configurable products displays 'Choose an option...'. I'd like to change this to 'Select {attribute label}'. I found the code for this in: vendor\magento\module-...
TimDavies's user avatar
0 votes
0 answers
141 views

set programmatically an option that is not the default one

I have a select, and programmatically sets the default value: $attributes->setData($attributeToApply->getAttributeCode(), $attributeToApply->getDefaultValue()); select 'foo' has option 'bar'...
Alex's user avatar
  • 811
1 vote
1 answer
2k views

Magento 2 : How to get Select Options in Template from Attribute Source Model

I created a custom attribute for customer entity, with options from another db_table I want to display this field as a select item (with options from source model) in the registration page (...
MageD's user avatar
  • 107
2 votes
0 answers
2k views

Update Options of a Select Element Dynamically using Knockout Js

I am looking for updating a custom Select Option at Checkout. <select name="city" id="city" data-bind=" options: availableCities, optionsText: 'name', optionsCaption: 'Select City', ...
Richard Valsalan's user avatar
1 vote
0 answers
34 views

Generate options category list with PHP instead of xml

I have a list of options grouped by category I did it with xml <field name="categorie_id"> <argument name="data" xsi:type="array"> <item name="options" xsi:...
lisa's user avatar
  • 133
2 votes
0 answers
354 views

Join table to get the detail of customer, customer ordered item, and the item product

i'm following this tutorial to create the grid for custom report, and to get the collection there's a function which accept the from date and to date like this: public function setDateRange($from, $...
Hunter's user avatar
  • 1,484
1 vote
0 answers
457 views

Magento 2: Query For Product Attributes, SKU, SetID, AttributeID

I need a full table query of all my SKUs in the following structure. I feel I am pretty close but can't seem to figure out the relationships: valueID = eav_attribute_option_value.value ...
ToddN's user avatar
  • 111
0 votes
2 answers
5k views

magento 2 get value of selected select box in custom module

I have created a form using UI component, I want to retrieve value selected select box option on change. I have created a requirejs-config.js file var config = { map: { '*': { customAdmin:...
user00247's user avatar
  • 638