I have been trying to display a product attribute that i created called “PDF” in a tab. I tried to re-use the code that had been used to get the product description but change it to reference my new Attribute, well so i thought.
This is the code i used:
The attribute code is: pdf
Admin title is: PDF
<?php $_pdf = $this->getProduct()->getPDF(); ?>
<?php if ($_pdf): ?>
<h2><?php echo $this->__('PDF') ?></h2>
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_pdf, 'pdf') ?>
<?php endif; ?>
You are using
$this->getProduct()->getPDF() when you should be using
$this->getProduct()->getPdf(). Magento camel cases attribute names for its magic methods.
You could also use