Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [select]

The tag has no usage guidance.

1
vote
1answer
21 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="...
0
votes
0answers
22 views

How to create select form to choose categories in Magento 2.3.1?

I would like to create a search by selecting the categories in select form. So there will be four select forms and search button. &1 SELECT TYPE and there will be categories to select: ...
0
votes
0answers
15 views

Bootstrap3 Multi-Select-Field - select an ID twice

I want a Multi-Select-Box with the ability to select an Id/value twice. So the user can add multiple items of the same value/id <select class="panels form-control select2-taggable select2-...
0
votes
0answers
18 views

Iniline editor type select not working

Im trying to do an editor type select on a column of a grid but the inline editor is always type text. Ive cleaned cache, compiled and upgraded but nothing changes. I leave the code here: listing....
1
vote
2answers
24 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() ...
1
vote
1answer
31 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->...
1
vote
1answer
22 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="...
1
vote
1answer
76 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.
0
votes
2answers
201 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.
0
votes
1answer
47 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', '...
1
vote
1answer
339 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 ...
1
vote
2answers
340 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->...
0
votes
1answer
33 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 ...
1
vote
1answer
192 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\...
0
votes
2answers
347 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="...
0
votes
2answers
662 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 ...
1
vote
1answer
174 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 ...
0
votes
0answers
285 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/...
1
vote
3answers
716 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 ...
0
votes
0answers
42 views

Display color in the widget panel Magento 2

I need to create a custom widget, where the Content Manager will be able to select a color from a set of 6 hex colors. Because the names of the colors are in hex format, how can I display the color ...
0
votes
0answers
106 views

How to Implement auto text box with multi select in Magento 2 admin?

I am new Magento 2.2.3. I want to implement a select box with multi select option and search filter. I am able to see multi select option but there is no search box to type. Please help me. Any ...
2
votes
1answer
2k 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?
0
votes
2answers
371 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 ...
0
votes
1answer
423 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-...
0
votes
0answers
93 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'...
0
votes
1answer
877 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 (...
2
votes
0answers
904 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', ...
1
vote
0answers
21 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:...
2
votes
0answers
208 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, $...
1
vote
0answers
236 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 ...
0
votes
2answers
1k 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:...
0
votes
1answer
984 views

how to set Custom Select and MultiSelect value while Product add Programatically Magento 2

I am working on to create a simple product programmatically. I have created 2 custom Attribute Select(select_testing) MultiSelect(multiselect_testing) select_testing attribute value ==> 1, 2, ,3, 4....
5
votes
3answers
1k views

Magento 2: “Empty option” for programmatically populated select attribute

I have a product attribute dropdown select box that I populate via a source model. The population works fine, but I want the first option in the list to be "Select one...". I've used the following ...
0
votes
1answer
844 views

Set select option default value as first one in Magento 2

Today I am working with select controller, I have tried different ways to set the default value as the first one but can't. For this stuff, I tried below code. Array $colorProductId = array('2' =>...
1
vote
3answers
883 views

My javascript doesn't run in a custom magento1.9 module

I try to use javascript for a dropdown list I've implemented into a grid as shown in the image. The renderer I use for this dropdown list is like <?php class ...
1
vote
1answer
2k views

Nested/subquery select in a join query

I have this working SQL query : select prd_brand.* from prd_brand inner join ( select distinct value from catalog_product_entity_int where rowid in (select rowid from ...
0
votes
0answers
68 views

Custom options dropdown switch product

Is there a way to add a dropdown to a simple product, that's giving alternative products and when selecting, it navigates to that product? For example I have the following product: Apple iPad Pro ...
0
votes
1answer
41 views

Question about SQL query on collection - Magento 1.7

I'm displaying data in a grid using a prepareColumns function. I have two tables I want to join table "admin_user" to: table "customer_group" where both have 'customer_group_id' and I want to ...
0
votes
1answer
314 views

Magento 2 : Sorting Customer Attributes Option Array

I used these posts: http://www.extensions.sashas.org/blog/magento-2-1-3-how-to-make-customer-attribute-update.html Adding customer multiselect attribute For creating a custom customer attribute ...
0
votes
1answer
263 views

How to build in Magento select attribute with image?

Is there any possible way to create select attribute with image? For example dropdown list: NEW/SALE/FAV/RATED ... etc and each option with it's own image ?
1
vote
1answer
5k views

How to set field select option value selected in admin form?

i set the value for select field in admin form like this $categories = Mage::getModel('test_yeezy/test')->getCollection(); foreach ($categories as $category) { $values[] = array(...
0
votes
1answer
305 views

Get product select value in module

We needed to have out of stock products show for configurable products. I have managed to get this working all ok, however I have a custom attribute called fulfilment which is a select option for the ...
1
vote
2answers
537 views

Get back from select object to collection object

If I do $collection->getSelect() I am moving from collection object to select object and I can use some useful stuff more close to raw sql. But what can I do to get back from select to magento ...
0
votes
1answer
52 views

Why Attribute Saving via Admin Side Changes Backend Type to INT

I saw a serious issue with Select type attributes in Magento. If backend model of a select attribute is other than INT (for example : varchar, text) etc. then if we edit this attribute via admin ...
1
vote
2answers
451 views

How to stop Javascript alert box from popping up on each page load?

I've been trying to create a popup for the Currency Selector on Magento. With some help I finally got this to working but it pops up on each page load. Maybe someone knowledgeable in javascript can ...
6
votes
1answer
1k views

Magento 2 - It is possible to create a select with optgroup using \Magento\Framework\Data\Form\Element\::addField?

As the title says, Looking at Magento\Framework\Data\Form\Element\Select looks like it does but i cant figure out the array? that i have to pass to my addField(id, type, [name, label, options]);
4
votes
3answers
911 views

“random” order clause added to my collection

For a module I load a custom product collection where I select products based on IDs in an array, I also try and sort the collection by the same order as the IDs have in the array(). To achieve the ...
0
votes
1answer
928 views

Include SKU within Product Drop-Down (Bundle Options)

When dealing with a bundled product, the associated bundle items when in the drop-down option, will display the product title along with the additional price. I have been tinkering yet unable to ...
0
votes
1answer
248 views

How to use Chosen in magento

I need to use Chosen in magento instead of "select " for multi select.I didn't find any thing about it. How should I add jquery for it. I am trying to solve Following issue
1
vote
4answers
75 views

select sales_order_item

Hi i want to select a sales_order_item by order_id $collection=$this->orderCollection; $collection->getSelect() ->join( array('order_item'=> 'sales_order_item'), ...