I am new with Magento. Now I'm using magento 1.9
So I add new attribute for my products via backend magento admin. I already assigned that attribute to my product's Attribute sets.
the attribute code is
full_bertahap_price
It appeared at edit product page. And the value can saved. No problem at all
But when I try to get the attribute's value in Frontend, it returned NULL.
this is my code
<?php
$quote = Mage::getSingleton('checkout/session')->getQuote();
$cart = $quote->getAllVisibleItems();
?>
<div class="row">
<?php foreach($cart as $_item): ?>
<?php
$the_item = $_item;
?>
<?php endforeach ?>
</div>
<?php
$value = Mage::getModel('catalog/product')->load($the_item->getProductId());
echo $value->getFullBertahapPrice(); ?>
I try to use
Zend_Debug::dump($value->getFullBertahapPrice());
And the result is
NULL
Can someone help me to solve this? Where I went wrong? In the admin backend that attribute has value but in Frontend its NULL?
Please help !
Edit : My cache is disabled and I also already Reindex Data but
nothing work.
Best Answer
You have to write your code inside the
foreach
loop, It may be multiple item in your cart.