Display minimum quantity

Hi all,

How can I display the minimum quantity before the regular price

See example: The red letters indicate how I want it and the should replace the standard price

4 answers

Profile photo of Robert Bollen 0.00 $tone March 24, 2010
Public

Hi all,

How can I display the minimum quantity before the regular price

See example: The red letters indicate how I want it and the should replace the standard price

PHP Code:

<?php $_productItem $_product->getStockItem() ?>

<div class="minqtysale">From: <?php echo $_productItem->getMinSaleQty()*1 ?> pcs for </div>


This ads the minimum quantity. But where should I place it in order to get it before the standard price????

#1
Profile photo of JA Developer 0.00 $tone March 26, 2010
Public

Hi imagine

It is the default of magento.

You should post this question to forum of magento. Somebody will help you to solve it. I am sorry for not being of much help in the case.

#2
Profile photo of Robert Bollen 0.00 $tone March 26, 2010
Public

Hi imagine

It is the default of magento.

You should post this question to forum of magento. Somebody will help you to solve it. I am sorry for not being of much help in the case.

WTF -- it is a theme issue.
If you would look into the Magento forums yourself you would learn that you must modify the themetemplate.
I already did some work for you to provide the code. My only question is where to put it!!!

What kind of support is this by redirecting me to Magento Forums… It is your template

#3
Profile photo of JA Developer 0.00 $tone March 27, 2010
Public

PHP Code:

<?php $_productItem $_product->getStockItem() ?>

<div class="minqtysale">From: <?php echo $_productItem->getMinSaleQty()*1 ?> pcs for </div>


This ads the minimum quantity. But where should I place it in order to get it before the standard price????

I am sorry for my misunderstand. In the case, please:

+ open app\design\frontend\default\jm_fabiantemplate\cat alog\product\view.phtml file, find this code:

PHP Code:

 <?php echo $this->getChildHtml('product_type_data'?>


and change to:

PHP Code:

        <?php

        $quality 
null;

         if ($stockItem $_product->getStockItem()) {

            
$quality =  $stockItem->getMinSaleQty()>= $stockItem->getMinSaleQty()*null;

         }

        
?>

         <?php if(!$_product->isGrouped()): ?>

         <span class="qty-box"><label for="qty"><?php echo $this->__('Qty'?>:</label>

         <input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $quality ?>" /></span>

         <?php endif; ?>



            <?php echo $this->getChildHtml('product_type_data'?>


+ open app\design\frontend\default\jm_fabiantemplate\cat alog\product\view\addtocart.phtml file, remove following red texts:

Code:

<?php $_product = $this->getProduct(); 

$quality = null;

 if ($stockItem = $_product->getStockItem()) {
    $quality =  $stockItem->getMinSaleQty()>= 1 ? $stockItem->getMinSaleQty()*1 : null;
 }


?>

<?php if($_product->isSaleable()): ?>
    <fieldset class="add-to-cart-box">
        <legend><?php echo $this->__('Add Items to Cart') ?></legend>
        <?php if(!$_product->isGrouped()): ?>
        <span class="qty-box"><label for="qty"><?php echo $this->__('Qty') ?>:</label>
        <input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $quality ?>" /></span>
        <?php endif; ?>
        <button type="button" class="form-button" onclick="productAddToCartForm.submit()"><span><?php echo $this->__('Add to Cart') ?></span></button>
    </fieldset>
<?php endif; ?>

Hope it helps.

#4

This question is now closed

Written By

Comments