views:

68

answers:

0

By default, at least in v1.3.2.4, Magento doesn't have an option for products that are sold as sets. e.g. Product A sold as 4 units per order. So I created an Attribute called product_set and assigned a default value of 1. Any product that is sold by more than one unit, I consequently updated that said product.

The reasoning behind this attribute is to control the minimum pricing. Since a product is sold as sets, the minimum pricing wouldn't reflect individual unit's price, hence reduce conversion of sales since a prospect might view it as an expensive item.

I edited the price.phtml as shown below, but the outcome keeps having glitches. It works fine at one moment, but whenever I upload a product or edit something else in the admin area, the "as low as" pricing keeps disappearing on me.

Refreshing the cache and rebuilding catalog and products seem not to have any effect on it. Your input appreciated. How can I force the "as low as" pricing to remain intact on the frontend.

following code location: app/design/frontend/default/your-theme/template/catalog/product/price.phtml

<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
    <?php $set = $_product->getProductSet(); //added ?> 
        <?php $_minimalPriceDisplayValue = ($_minimalPrice / $set); ?>
        <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))): ?>
            <?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
        <?php endif; ?>

        <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link minimal-price-link-new-cat">
            <span class="label"><?php echo $this->__('As low as:') ?></span>
            <span class="price price-new-cat" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_minimalPriceDisplayValue,true,false) ?></span>
        </a>
    <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>