magento 默认添加到购物车数量

    Magento admin 1009次浏览 已收录

    Magento – Change getProductDefaultQty from 0 to 1

    默认数量是 0

    In magentoproduct pages at add to cart input field, it shows either 0 or blank. But QA team wanted it to show 1 as default.

    1 <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>"class="input-text qty" />

    So this is how it was resolved.

    Magento admin > System > Catalog > Inventory > Product Stock Options

    Find “Minimum Qty Allowed in Shipping Cart‘ and click ‘Add Minimum Qty‘ and add a minimum quantity you want to show as default to the appropriate customer group(s) and then save it. It was ’1′ in my case and assigned to ‘All Groups‘ Customer Group.

    There were lots of tips about changing codes to get such result but it worked in my case and was showing 1 as default quantity in the Magento product page add to cart input field without changing single line of magento’s core code.

    乐趣公园 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明magento 默认添加到购物车数量
    喜欢 (0)