How can I add the same custom option (checkbox) to all products of the same Type? In my case, certain products are of type "Event Ticket Product", due to changes from a 3rd party extension (Magenest_Tickets). I wish to add the product options programmatically rather than manually. (To add it manually for a single product, in most cases I would edit that Product and go to Custom Options.) I need to include in the program the text that goes next to the checkbox. Also where do I call the code? In a Controller, Block, or somewhere else?
-
Product custom options are different than product attributes, because the product information has to be specific to the customer. – kig Aug 12 '16 at 13:57
Product Attribute has option "apply_to" that responsible for filtering attributes per product type.
see, https://github.com/magento/magento2/blob/develop/app/code/Magento/Bundle/Setup/InstallData.php#L58 for example
-
Ok thanks, although the thing is the product custom options I believe are not the same thing as product attributes. Reason being is the information is specific to the customer. – kig Aug 12 '16 at 13:56