1
votes

I would like to set minimum quantity in my magento site...

Magento configuration allows me to set minimum quantity per product.. But I want to set minimum quantity per order..

I mean my customer can mix any products that he/she would like to get to the minimum quantity..

PS: I found a thread in magento forums which explains how to set minimum order amount.. Can anyone help me to modify this code for minimum quantity?.. Thanks

1
We need the rules to do that, if the customer dont get the min quantity what happens?? You can simply hidde purchase button if dont get min qty:?Guerra
@Guerra I just don't know how to implement that. Can you point me in the right direction? ThanksGiri

1 Answers

4
votes

Have many way to do that, you can go toapp\design\frontend\yourstore\2012\template\checkout\onepage\link.phtml or to your link.phtml the one what you are using. Try remove the code and see if the checkout button miss, if is missing, you are on the right place. So, there put this code(change all):

<?php if ($this->isPossibleOnepageCheckout()):?>
    <?php if(Mage::helper('checkout/cart')->getCart()->getItemsQty() >= $minimunQuantityYouWant):?>//this code is ours
        <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
    <?php else:?>//this code is ours
        Type msg here, like "You need minimum x items to finish."//this code is ours
    <?php endif;?>//this code is ours
<?php endif?>

This solve your problem.