Magento:如何获得产品“最低销售数量"显示

问题描述:

下面的代码中的Magento 1.7我试图使产品属性购物车中允许的最小数量"显示到前端.我想念什么?谢谢

Magento 1.7 in the code below I'm trying to get the product attribute "Minimum Qty Allowed in Shopping Cart" to display to the front end. What am I missing? Thanks

<dl class="product-sku">
                    <dt><?php echo $this->__('Product SKU') ?>:</dt>
                    <dd><?php echo $_helper->productAttribute($_product, $_product->getSKU(), 'sku') ?></dd>

                    <dt><?php echo $this->__('Dimensions') ?>:</dt>
                    <dd><?php echo $_helper->productAttribute($_product, $_product->getDimensions(), 'dimensions') ?></dd>

                    <dt><?php echo $this->__('Configuration') ?>:</dt>
                    <dd><?php echo $_helper->productAttribute($_product, $_product->getConfiguration(), 'configuration') ?></dd>

                    <dt><?php echo $this->__('Minimum Purchase Quantity') ?>:</dt>
                    <dd><?php echo $_helper->productAttribute($_product, $_product->getMinSaleQty(), 'min_sale_qty') ?></dd>
                </dl>    

这应该有效:

$productQuantity = Mage::getModel("cataloginventory/stock_item")
->loadByProduct($_product->getId());

您的最小数量在这里...

And your minimun qty its here....

$productQuantity->getMinSaleQty();