0

how to add order qty in mini cart .strong text

This page enter image description here

1 Answer 1

0

You can find the code responsible for displaying the quantity (and the accompanying OK button) in original minicart template: app/design/frontend/rwd/default/template/checkout/cart/minicart/default.phtml

<input
    id="qinput-<?php echo $_item->getId(); ?>"
    data-link="<?php echo $this->getAjaxUpdateUrl() ?>"
    data-item-id="<?php echo $_item->getId(); ?>"
    data-cart-item-id="<?php echo $_item->getSku(); ?>"
    class="qty cart-item-quantity input-text" name=""
    value="<?php echo $this->getQty()?>"
    <?php if ($this->isOnCheckoutPage()) echo 'disabled'; ?>
/>

<button id="qbutton-<?php echo $_item->getId(); ?>"
    data-item-id="<?php echo $_item->getId(); ?>"
    disabled="disabled"
    data-update
    data-cart-item-update
    class="button quantity-button">
    <?php echo $this->__('ok'); ?>
</button>

Copying a part or all of it to your minicart template would be a good starting point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.