Skip to main content
1 of 6
Nagaraju Kasa
  • 5.9k
  • 8
  • 58
  • 114

magento 2 how to add custom methods to product.php?

Magento 2 how to add custom Methods set and get for the product.php from our custom module ?

For example:-

public function getChildernData();
public function setChildernData();
          

since i have tried in magento 2.2.1 version in the vendor files as mentioned below.

/vendor/magento/module-catalog/Api/Data/ProductInterface.php

/vendor/magento/module-catalog/Model/Product.php
Nagaraju Kasa
  • 5.9k
  • 8
  • 58
  • 114