문제

How can i get custom product attribute custom_attribute_1 using $product->getCustomAttribute1 .Is camel casing works for numbers?

도움이 되었습니까?

해결책

This does not work:

$product->getCustomAttribute1()

This does work:

$product->getCustomAttribute_1()
$product->getData('custom_attribute_1')

다른 팁

If camel case won't working, you should try with

->getData('attribute')

Use $product->getCustomAttribute_1() for getting custom_attribute_1 value

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top