0

I need to add product custom added Customizable Options to the product Rest API. I have set that custom options to the below core Interface Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface and Model Magento\Catalog\Model\Product\Option\Value file and options in getting in product API.

But can't override interface so how to add as extension attributes or other override solution for below core dependency.

Core dependency file path: magento231\vendor\magento\module-catalog\etc\di.xml

<preference for="Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface" type="Magento\Catalog\Model\Product\Option\Value" />

I have find the issue from github. Can't able to add extenstion attributes for Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface

Github Issue link: https://github.com/magento/community-features/issues/30

Any help would be appreciated. Thanks!

4
  • can you show what you have added in those files? and what you want to achieve? Commented Oct 19, 2019 at 7:38
  • I have added Mageworxs product custom option like ColorCode, Images and Dependancy etc... Commented Oct 19, 2019 at 8:28
  • 1
    you can override Magento\Catalog\Model\Product\Option\Value class instead of interface or try plugin instead of override class Commented Oct 19, 2019 at 8:31
  • I tried to override Magento\Catalog\Model\Product\Option\Value class but not worked solution. Commented Oct 19, 2019 at 9:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.