Questions tagged [option]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
4answers
3k 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 ...
1
vote
2answers
553 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' => __('...
0
votes
0answers
19 views

Bundle product add to cart issue

We have bundle products having options with input type radio buttons.When we add to cart we are facing error Call to a member function renderTierPrice() on null in vendor/magento/module-bundle/view/...
5
votes
2answers
4k views

Remove and recreate custom option programatically on product before save event

I m creating custom option programatically using observer with catalog_product_save_before event.Custom option created successfully on product save.but the problem is whenever product save second time ...
0
votes
1answer
33 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",...
0
votes
0answers
30 views

Magento 2.3.3 : Edit product in minicart error

I am facing an error like this: when I add product have option and press button "edit cart" of it product it redirects to product detail and show error js like this: this error only in the product ...
1
vote
1answer
386 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 ...
1
vote
2answers
1k 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
0
votes
0answers
186 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 ...
0
votes
1answer
129 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 ...
0
votes
2answers
1k 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 ...
0
votes
0answers
276 views

How to display SKU for each bundle items in the bundle product in Magento 2?

I am using Magento 2.3.1 I have created one bundle product and in this product, I have added all types(Radio, checkbox, dropdown and multiple select) of bundle options. I have displayed SKU for each ...
1
vote
1answer
61 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', ...
0
votes
1answer
29 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/...
0
votes
0answers
99 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 ...
0
votes
0answers
44 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/_/...
1
vote
0answers
26 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 ...
0
votes
1answer
46 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 ...
1
vote
0answers
57 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 ...
0
votes
1answer
45 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)){ $...
1
vote
1answer
75 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')->...
1
vote
1answer
29 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="...
2
votes
1answer
18 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 ...
0
votes
0answers
28 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.
1
vote
2answers
416 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 = \...
2
votes
1answer
557 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 ...
0
votes
3answers
2k 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 ...
2
votes
2answers
279 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'...
1
vote
0answers
47 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 ...
0
votes
1answer
2k views

Magento 2 : Get Category Attribute Value By Option Id

How to get category attribute value by option id in magento 2. Thanks
1
vote
2answers
1k views

Magento Translation of option labels and values [closed]

I have 6 store views for different languages. My problem is, $_option['label'] and the $_option['value'] which are using in product-view page, cart page, cart-sidebar, onepage-chekcout is always ...
2
votes
0answers
1k 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', ...
2
votes
1answer
245 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 ...
1
vote
1answer
486 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....
3
votes
2answers
2k 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/...
2
votes
1answer
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 ...
2
votes
1answer
477 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-...
1
vote
1answer
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 ...
0
votes
1answer
886 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 ...
0
votes
1answer
559 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.
0
votes
1answer
113 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?
6
votes
2answers
3k views

How does magento create bundle option selections?

I've been looking at programmatically creating bundle products, and got stuck on adding a selection to the options. The problem is that when you create a new selection (Mage_Bundle_Model_Selection) ...
1
vote
1answer
835 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. ...
0
votes
1answer
213 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> <...
0
votes
2answers
2k views

Custom event on product option change

In my magento store my products have several custom options which alter the price of the product. I also need to add in a custom function which shows or hides particular content when this event ...
7
votes
3answers
11k views

Add product to cart with custom option using PHP

I am trying to add a product to the cart programmatically with some custom options. The item gets added to the cart correctly but none of the options ever get added. My code is: require_once '../../...
2
votes
0answers
403 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.
0
votes
1answer
206 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....
2
votes
2answers
2k views

Specific price per quantity

I'm trying to set a product with different prices depending on quantity "chosen from drop-down" But I have no idea how to create this. basically I have a product which comes in this quantities: 20, ...
2
votes
1answer
1k 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 ...