Search This Blog

Monday, 7 May 2012

Allow zero price in "Tier Price" of product edit in Magento

 Allow zero price in "Tier Price" of product edit section in administration
Open:  \app\design\adminhtml\default\default\template\catalog\product\edit\price\tier.phtml file and replace the validation class "validate-greater-than-zero" with "validate-not-negative-number" so that field will allow zero and positive numbers.

 In User Section: If you want to show Free text next to the item.
In \app\design\frontend\base\default\template\catalog\product\price.phtml file add following script below  <?php endif; /* if ($_finalPrice == $_price): */ ?> to display "Customer Group: Free" text below the price.

      <?php $prdData = $_product->getData(); if(isset($prdData['tier_price']) and $prdData['tier_price'] != '' and $prdData['tier_price'] == 0): ?>
        <span class="minimal-price-link">
            <span class="label"><?php echo $this->__('Customer Group Price:') ?></span>
            <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">Free</span>
        </span>
    <?php endif; ?>

No comments:

Post a Comment