Skip to main content
12 events
when toggle format what by license comment
Jan 18, 2020 at 21:49 comment added kao @jafarpinjar in this code make an array $options in $setupObject->addAttributeOption($options); and dont forget to use di instead object manager, using object manager is bad practice! $options - array of optionIds and values foreach ($options as $optionId => $value) { $options['value'][$optionId] = true; $options['delete'][$optionId] = true; } $setupObject->addAttributeOption($options);
Jan 23, 2019 at 3:09 comment added Jafar Pinjar @KhoaTruongDinh, how to delete multiple options at a time ?
Jan 23, 2019 at 3:08 comment added Jafar Pinjar @KhoaTruongDinh, I have to remove these options, from json "OptionValues": [ { "OptionId": "01", "OptionName": "Test3" }, { "OptionId": "Null", "OptionName" : "Test" }
May 23, 2017 at 12:37 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 13, 2017 at 12:54 history edited CommunityBot
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Jul 27, 2016 at 14:52 history edited Khoa TruongDinh CC BY-SA 3.0
added 5 characters in body
Jul 21, 2016 at 14:01 vote accept Sophie Baxter
Jul 21, 2016 at 12:17 history edited Khoa TruongDinh CC BY-SA 3.0
improved formatting.
Jul 21, 2016 at 11:18 comment added Khoa TruongDinh I update my code, I tested with playground file.
Jul 21, 2016 at 11:17 history edited Khoa TruongDinh CC BY-SA 3.0
Add more testing code.
Jul 20, 2016 at 11:08 comment added Sophie Baxter Hi, thanks so much for this response, this doesn't seem to be deleting the options though. Can you explain why i need to call addAttributeOption($options), and does this imply the option manipulation this should be done from within the UpgradeData class? Currently i'm using an external source file to add an attribute and it's options, it's within this file that i would like to delete all options that have been created but are no longer in use.
Jul 18, 2016 at 16:08 history answered Khoa TruongDinh CC BY-SA 3.0