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?


You can call the constant variable directly:

($optionType == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_AREA)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.