Questions tagged [option]

The tag has no usage guidance.

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

2.4.6: Filter available attribute sets according to product type, using a plugin

In my custom plugin, the InstallData.php script creates a custom attribute set. For the purposes of this Q&A, we will call it 'Custom Attribute Set #1'. I would like the attribute set to only be ...
Muckee's user avatar
  • 699
0 votes
1 answer
17 views

created bundle option into existing bundle wont save programatically

Magento 2.4.2-p1 Goal is to create a bundle option with a selection in it based on array of skus. The array has 4 skus of simples existing in the catalog, lets say: [50702640,50702240,90102870,...
user968865's user avatar
4 votes
1 answer
712 views

magento 2.4 difference between input argument and option in console commands

on magento 2 when we create a console command, we can add arguments and/or option. But what is the difference between the two? In which cases should we use one or the other?
Lou Nik's user avatar
  • 373
0 votes
0 answers
199 views

Magento 2.4.1 Custom sort option best sellers is not working

I have created a custom bestsellers sorting option, the query working fine but setOrder() and order() is not working, i want to sorting the values using qty_ordered <?php namespace Vendor\...
Ali's user avatar
  • 1
0 votes
1 answer
1k views

magento 2 how to get children product sku or children product id using parent product id or sku

how to get children product SKU or children product id using parent product id or SKU I have these details for particular options, here are 2 arrays and I need particular product id or sku Array (...
sumeet bajaj's user avatar
  • 1,266
0 votes
1 answer
69 views

How to add custom text in custom option in magento 2.3.2

How to add custom text in particular custom option after in magento 2.3.2
Ravindrasinh Zala's user avatar
0 votes
0 answers
86 views

How to Get Attributes options QTY in Magento 2

How to get Get Attributes specific options QTY in Magento 2. Please Suggest me. THANKS.
Mohit Patel's user avatar
  • 3,681
1 vote
0 answers
18 views

magento 2: value not saved for attribute by programmatically

I am trying to save some values in my attribute by programmatically. My attribute name is storage. type is dropdown I am trying to save values like 32GB or 16GB this values do not saved but if I used '...
Niraj Patel's user avatar
0 votes
1 answer
45 views

Custom options programatically magento2

I am trying to save custom options(drop_down type) for a specific product. In my case, I need to add a custom option in the loop. My code is here $json ='{"productID":"1","productPrice":"5585.00",...
HaFiz Umer's user avatar
  • 1,641
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
1k views

Create Magento 2 Bundles with different quantities of the same product

I'm currently running Magento 2.3.2. The Company I work for sells a number of products in bundles of varying quantities which we call "Stacks". For example a product can be sold in bundles of either ...
CJNotts's user avatar
  • 392
1 vote
1 answer
797 views

Curl OPTIONS request in Magento 2

I would like to do this request : curl -i -X OPTIONS my/url/path in Magento 2. This code works : $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => 'my/url/path', ...
Kozame's user avatar
  • 964
0 votes
1 answer
49 views

customizable option file(.pdf) is not open

In product custom option type is File. I allow only png, jpeg, txt, pdf extension. In place order time when I select PDF, it's work. A custom option also select. But when we open that file (pub/...
HaFiz Umer's user avatar
  • 1,641
0 votes
0 answers
259 views

Magento2.3.0 For configurable product attribute variation display this type

I am using Magento2.3.0 an i want to display swatch color and drop-down color name display this type of and after swatch color first attribute selected automatically color name choose in drop-down ...
Rv Singh's user avatar
  • 1,617
0 votes
1 answer
243 views

Custom option file or image save with extension in magento2

I want to save custom option file save with extension. Actually i make pdf and print image in this way $optionvalue["fullpath"]=/var/www/html/magento2/pub/media/custom_options/quote/1/_/...
HaFiz Umer's user avatar
  • 1,641
1 vote
0 answers
70 views

Magento 2 : Show Out of Stock Swatch Options On Configurable Product Page

I want to show outofstock swatch options on the configurable product even if the options is outofstock and the main configurable product is also out of stock. I want to show that swatch options with ...
Chirag Gondaliya's user avatar
0 votes
1 answer
384 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
0 answers
300 views

Add or remove option in quote item

I had to create a controller that added or removed an option from a quote item. I succeeded but did not convince the solution. It seems strange to me that I have to manage the correct populating of ...
BOES's user avatar
  • 210
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
0 votes
1 answer
118 views

Add options to quote programmaticaly

I'm creating quote and order programmaticaly. I can't figure out why options product are not added to my order / quote. See : $superAttr = $item["super_attribute"]; if(!empty($superAttr)){ $...
Morgan Tartreau's user avatar
1 vote
1 answer
139 views

Get values of customizable option

Is there a way to get the SKU of the option of my product ? Can't make anything works Tried this : $customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->...
Morgan Tartreau's user avatar
1 vote
1 answer
141 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,150
2 votes
1 answer
23 views

Adding option to a product create error

I'm extending the \Magento\Catalog\Block\Product\View file in AddToCart.php. In my AddTocart, I've added this line : $stock = $this->isInStockCustom($sku); Now, I'm adding options to my ...
Morgan Tartreau's user avatar
0 votes
0 answers
68 views

Empty row in dropdown admin panel magento 2

I had empty row in drop down for attribute in adminpanel. Although there is no empy value while creating attribute.How to remove it.
Anees's user avatar
  • 624
2 votes
3 answers
3k views

Magento2 how to remove "choose an option" in configurable products drop down

How to remove "choose an option" in configurable products drop down and in the drop-down menu have the first attribute value be the top choice please if anyone idea reply me I need this type of
Rv Singh's user avatar
  • 1,617
3 votes
1 answer
1k views

Get attibute label option for current store

I have a 'size' attribute with lot of option. For each option, I have translation for each my stores : I want to get the translation label for a product and for a given store. So : I load my ...
Kozame's user avatar
  • 964
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
1 vote
2 answers
912 views

How to delete color attribute option by using label in Magento 2?

Can we delete product attribute options by using label? For example say attribute:color has options like green, red, yellow how to delete red from this? I used below code. $objectManager = \...
Jafar Pinjar's user avatar
  • 1,929
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,929
0 votes
1 answer
2k views

Magento 2 : Get Category Attribute Value By Option Id

How to get category attribute value by option id in magento 2. Thanks
Raghu's user avatar
  • 1,710
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
0 votes
3 answers
3k views

Magento 2 Can't add Attribute option upto 100 ? Is there any limit for the option?

I have an issue with the product options. There are 500 option for the attribute but can't add after 100 options. Can you please let me know about this issue? The Product Attribute is successfully ...
Moin Malek's user avatar
2 votes
1 answer
527 views

Something is overriding my onchange script?

I made a script that selects an option from a dropdown. The dropdown has onchange trigger and it trigger correctly when i run the script as a snippet (in a sandbox environment), but when i active the ...
Kennet Leth Sørensen's user avatar
1 vote
1 answer
597 views

Javascript ReferenceError: reloadPriceOfSingleProduct is not defined

I get following errors in console of my browser if I change options on a Product under magento 1.9.3.3 : Uncaught TypeError: Cannot read property 'success' of undefined at klass.initialize (prototype....
SG52's user avatar
  • 11
2 votes
2 answers
338 views

Unable to access custom options section [closed]

Using mageworx advance product options extension i have created option templates and associated to the products and saved. in the magento 1.9.2.4 Now i came to product and clicked on 'custom options'...
Nagaraju Kasa's user avatar
3 votes
2 answers
3k views

How can i remove the dropdown option in country in checkout page in magento? I need to put only one country

From the following files : /app/design/frontend/base/default/template/customer/form/reg‌​ister.phtml /app/design/frontend/base/default/template/customer/form/add‌​ress.phtml /app/design/...
Dipak Kumar's user avatar
2 votes
1 answer
3k views

Magento2 : How to load quote item option by id?

In a module under Magento 1.9. I was loading quote item option using $_quoteOption = Mage::getModel('sales/quote_item_option')->load($Option_id); I would like to do the same thing under magento2 ...
Alexglvr's user avatar
  • 1,675
0 votes
0 answers
200 views

Magento : Grouped Product with Configurable Product Mandatory to Add to Cart

I have a few grouped products, with more than one configurable products (with different colour as simple product) associated as sub products. The problem is, because simple product (colour) in a ...
Magento Learner's user avatar
2 votes
1 answer
575 views

Magento2 : Auto Select Options for Products with Multiple Options

I'm trying to get url with already selected options. If I have only one options, code is working fine adding #{attribute_id}={attribute_value} after url. https://nyhomedecor.com/cordless-dual-sided-...
Andrei Andronache's user avatar
1 vote
1 answer
1k views

How to get selected option of the attribute for the product?

Struggling to get value of the selected option for product. Example:Product require assembly so created attribute dropdown Below few methods I've tried echo $data = $_product->getAssembly(); echo ...
Rob D. A.'s user avatar
  • 867
0 votes
1 answer
801 views

Magento add another custom dropdown field in bundle items of bundle product

How to add new dropdown field, next to the position field of bundle item like shown in the below screenshot.
InfoBeans's user avatar
  • 332
0 votes
1 answer
135 views

How to set the option type area in Magento 2?

In Magento 1 ($optionType == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): But, in Magento 2, I have to pass responsible class object type in constructor. How I change this in Magento 2?
Rahul Katoch's user avatar
  • 1,119
1 vote
0 answers
48 views

Get Option Description by Option ID (outside the product)

I got Option ID from single attribut in category page by: $request = $this->getRequest()->getParams(); Of course i parse it and i receive attribute name and attribute option ID. I want ...
dominik's user avatar
  • 11
1 vote
1 answer
963 views

How to add a selection for an option in bundle items in Magento

I have already created Bundle product in magento 1.9.2.2. All the bundle items are of "Radio Buttons" input type having few options already defined to them. This I have created using admin-panel. ...
Anurag Khandelwal's user avatar
0 votes
1 answer
306 views

my radio button can't save to my database

i have table 'a_installment' and the column is 'id' and 'nama', i try save to 'a_installment' using radio button with this code etc/config.xml <?xml version="1.0"?> <config> <...
gufran's user avatar
  • 81
2 votes
0 answers
418 views

How can I get Visual Swatch option imange in magento 2 product view page

I have attribute option Id but I can't get the image of swatch. Is there any way of getting image.
Sahak T.'s user avatar
0 votes
1 answer
218 views

Magento Exception:Wrong product type to extract configurable options

I have a custom module for viewing products in cart at the My account Dashboard. It's working fine, but some times it throws exceptional error at the getItemOptions() function. Customer/Block/Cart....
Gayathri's user avatar
  • 483
0 votes
1 answer
978 views

Magento Product Custom option value setPrice not working programmatically

I just don't get it. I have installed Magento 1.9.2.2 CE in my site. But when I run following code as custom script from root directory, it doesn't set product custom option value price to my desired ...
Vicky Dev's user avatar
  • 1,982
2 votes
1 answer
2k views

Bundle Products - how to use 2 different renderers for bundled product options? (to show in tab)

I need two renderers for Bundle Product Select Style Options, to show the same thing differently in two places. Context: At the moment all my bundle products are fixed (wine cases). I have decided ...
iphigenie's user avatar
  • 1,679
1 vote
1 answer
97 views

Multiple Price Options -

I am trying to have multiple price options for books, for example Book A - hardcover will be $20 and softcover will be $16.00 But I want it to display the price as "$16-$20" or say "Price Varies" ...
sdeals527's user avatar