Show product attributes in list.phtml - Magento

前端 未结 4 1834
有刺的猬
有刺的猬 2021-01-03 06:39

Hello I have read many posts about this, and while it works its not complete.

For example; Attribute 1= shoesize and attribute 2 = shoe color. Both are in a dropdown

4条回答
  •  日久生厌
    2021-01-03 07:16

    Another way

    $_product = Mage::getModel('catalog/product')->load($this->getProduct()->getId());
    

    If you create an attribute like yours "shoesize" then you can access by following code.

    If your attribute type Text Field ( $_product should loaded ) :

    getShoesize();
      // if your arribute was shoe_size then
      echo $_product->getShoeSize();
    ?>
    

    If your attribute type Multiple Select or Dropdown, to get all attribute value :

    getAttributeText('shoesize');
    ?>
    

提交回复
热议问题