Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Show Min. Qty. on Detail Screen? 
 
Tiff
Sr. Member
 
Avatar
Total Posts:  107
Joined:  2008-03-25
Upstate NY
 

I’d like to put a “Minimum Order:” amount on my item detail page so before people add items to the cart, they know how many they must buy. 

Does anyone know what type of code I’d have to put (and where I’d put it,) to display the min.qty requirement from the product’s Inventory admin screen on the front end?

I’ve attached a screen shot of what I’d like to do.

It’s under the Qty/Add to Cart area - which is where I’d like it to be.

Oh - and I only want it to show for items which have a min.qty requirement.  Most (but not all) of my items do.

THANKS FOR YOUR HELP!

Image Attachments
min_order_amt.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacky2008
Member
 
Total Posts:  43
Joined:  2008-04-15
 

Hi, Tiff

Did you get the answer? I need help, too.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacky2008
Member
 
Total Posts:  43
Joined:  2008-04-15
 

up, any tip?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mike222
Member
 
Total Posts:  41
Joined:  2008-04-07
Austria
 

At least for version 1.0 you need to do something like this:
1.
copy app\design\frontend\default\default\template\catalog\product\view\type\simple.phtml
to your own theme e.g. app\design\frontend\default\myTheme\template\catalog\product\view\type\simple.phtml

2. Edit the file: find <button class="form-button" onclick=… ?></span></button>
append your code afterwards e.g.
<div id="min_sale_qty">Minimum qty is <?php $_product->getStockItem()->getMinSaleQty()*1?></div>

You need to define the layout for the id min_sale_qty in one of your css files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacky2008
Member
 
Total Posts:  43
Joined:  2008-04-15
 

Thanks a lot, Mike222

I am using v1.1.3 I do it as you say.  But I cann’t find <button class="form-button" onclick=… ?></span></button> at simple.phtml

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

<?php if($_product->isSaleable()): ?>
<p class="availability"><?php echo $this->__('Availability: In stock.') ?></p>
<?php else: ?>
<p class="availability"><?php echo $this->__('Availability: Out of stock.') ?></p>
<?php endif; ?>

<div id="min_sale_qty">Minimum qty is <?php $_product->getStockItem()->getMinSaleQty()*1 ?></div>

<?php echo $this->getPriceHtml($_product) ?>

==========================================

Is this right?
Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JustinZ
Member
 
Total Posts:  36
Joined:  2008-09-17
 

using 1.1.8

I added :

<?php $_productItem = $_product->getStockItem() ?>
<div class="minqtysale">Mn Qty : <?php echo $_productItem->getMinSaleQty()*1 ?></div>

to

app\design\frontend\default\myTheme\template\catalog\product\view\type\simple.phtml

which works great

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top