I am trying to use a custom Yes/No attribute to show/hide an element within the Price.phtml file but whenever I add the condition I keep getting this error and I can't understand why since I had it working previously.
Here is what I have added from line 359 of Price.phtml
<?php if ($_taxHelper->displayBothPrices()): ?>
<p class="special-price">
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
<span class="price-excluding-tax">
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
</span>
</span>
<span class="price-including-tax">
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
</span>
</span>
</p>
<?php else: ?>
<?php if ($_product->getAttributeText($_specialPriceStoreLabel['hide_special_price']) == "Yes"): ?>
<span class="del" style="display: none;"><?php echo $this->__('RRP') ?> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?><?php $regularprice = $_regularPrice; ?></span>
<?php $price_diff = $regularprice-$finalPrice;
$discountPercent = ($price_diff/$regularprice)*100;
$discountPercent = ceil($discountPercent); ?>
<span class="discount" style="display: none;">(-<?php echo $discountPercent; ?>%)</span>
<?php else: ?>
<span class="del"><?php echo $this->__('RRP') ?> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?><?php $regularprice = $_regularPrice; ?></span>
<?php $price_diff = $regularprice-$finalPrice;
$discountPercent = ($price_diff/$regularprice)*100;
$discountPercent = ceil($discountPercent); ?>
<span class="discount">(-<?php echo $discountPercent; ?>%)</span>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
Basically what I would like to achieve is by adding a new attribute and adding it to the price group I can set whether to display special price on the frontend or not for certain products.
I keep getting this error:
function getSource() on a non-object in /*****/*****/public_html/app/code/core/Mage/Catalog/Model/Product.php on line 1390
Can anyone see what I have done wrong?