Magento: How to get attribute values used in products

后端 未结 4 1328
北荒
北荒 2021-01-30 03:43

How I can get attribute values for some attribute that are used at least in one product?

4条回答
  •  情书的邮戳
    2021-01-30 04:09

    If 'height' is a product attribute. We can use the below code to get the product height.

    $product->getHeight();
    

    If 'weight' is a product attribute. We can use the below code to get the product weight.

    $product->getWeight();
    

提交回复
热议问题