Posts Tagged ‘ Attribute value ’

Display Attribute label – and Attribute value in magento

To display attribute label:
$_product->getResource()->getAttribute('my_attribute')->getStoreLabel();
and attribute value:
getAttributeText('my_attribute'); ?>

thanks
for more info visit mage-people

Advertisements

Saving problem for Large Number of Attribute Option Labels in Magento

I had a problem (POST truncated) today and it comes from a too little POST limit. (or the standard PHP post_max_size)

i solved it with changing php.ini

max_input_var=1000
to
max_input_var=10000

you can try if you have same problem.

thanks
for more info visit mage-people

How to get Product attibute name of a specific product in magento

In my running project I faced a problem to print product attribute value for a specific product with product name and SKU. lastly it is solved here is solution so i liked to share it.


<h5><?php echo $this->htmlEscape($_item->getName()) ?></h5> // for product name
 <div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?></div> // for SKU
<h5>

<?php

$_prod = Mage::getModel('catalog/product')->load($_item->getProductId());

?>

<?php
//echo $_prod->getDropshipper(); // for printing attribute ID
?>

<h5>Drop Shipper : <?php echo $_prod->getAttributeText('dropshipper')?>  </h5> // for pribting attribute value's name

so enjoy magento

for more magento tutorial visit: http://blog.free-extension.com/