Вопрос

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