Questions tagged [option]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Use Select2 with Magento2.4 Component create by meta

I have created a custom product attribute of select type has 2000+ values and tried to use UI-select but it slows down my product page so I am trying to use select2 instead of UI select. Due to some ...
user avatar
  • 749
0 votes
0 answers
85 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\...
user avatar
  • 1
0 votes
1 answer
213 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 (...
user avatar
  • 1,123
0 votes
0 answers
102 views

Magento 2 how to get the child product id from configurable product id

how to get the child product id from configurable product id using attributes options. <?php namespace Vendor\Module\Block; class Getprice extends \Magento\Framework\View\Element\Template { ...
user avatar
  • 1,123
0 votes
0 answers
44 views

Translate “custom option” in mini-cart for multistore

I have managed to successfully translate the custom options in the article (see previous question here. But the next step is to reproduce these options also in the "mini-cart". The minicart ...
user avatar
0 votes
1 answer
34 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
user avatar
0 votes
0 answers
49 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.
user avatar
  • 3,157
1 vote
0 answers
14 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 '...
user avatar
0 votes
1 answer
38 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",...
user avatar
  • 1,516
1 vote
1 answer
1k 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 ...
user avatar
  • 161
0 votes
1 answer
665 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 ...
user avatar
  • 360
1 vote
1 answer
267 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', ...
user avatar
  • 894
0 votes
1 answer
40 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/...
user avatar
  • 1,516
0 votes
0 answers
213 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 ...
user avatar
  • 1,587
0 votes
1 answer
124 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/_/...
user avatar
  • 1,516
1 vote
0 answers
35 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 ...
user avatar
0 votes
1 answer
187 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 ...
user avatar
  • 894
1 vote
0 answers
167 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 ...
user avatar
  • 210
1 vote
2 answers
1k 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' => __('...
user avatar
  • 1,719
0 votes
1 answer
90 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)){ $...
user avatar
1 vote
1 answer
111 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')->...
user avatar
1 vote
1 answer
36 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="...
user avatar
  • 2,400
2 votes
1 answer
21 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 ...
user avatar
0 votes
0 answers
41 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.
user avatar
  • 584
2 votes
3 answers
2k 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
user avatar
  • 1,587
2 votes
1 answer
922 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 ...
user avatar
  • 894
7 votes
8 answers
7k 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 ...
user avatar
1 vote
2 answers
763 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 = \...
user avatar
  • 1,719
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 ...
user avatar
  • 1,719
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
user avatar
  • 1,700
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', ...
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 ...
user avatar
2 votes
1 answer
428 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 ...
user avatar
1 vote
1 answer
587 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....
user avatar
  • 11
2 votes
2 answers
323 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'...
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/...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 1,625
0 votes
0 answers
196 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 ...
user avatar
2 votes
1 answer
537 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-...
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 ...
user avatar
  • 867
0 votes
1 answer
733 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.
user avatar
  • 332
0 votes
1 answer
120 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?
user avatar
  • 1,059
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 ...
user avatar
  • 11
1 vote
1 answer
892 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. ...
user avatar
0 votes
1 answer
288 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> <...
user avatar
  • 81
2 votes
0 answers
414 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.
user avatar
0 votes
1 answer
217 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....
user avatar
  • 483
0 votes
1 answer
942 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 ...
user avatar
  • 1,984
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 ...
user avatar
  • 1,549
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" ...
user avatar