How do you get results so it’s up to date with AJAX, it will in view.phtml? At present it loads again the entire page.
I’ve added a quantity box to my item list. Following is the code exactly what I added in list.phtml:
<form action=”<?php echo $this->getAddToCartUrl($_product) ?>” method=”post” id=”product_addtocart_form_<?php echo $_product->getId()?>”<?php
if($_product->getOptions()): ?> enctype=”multipart/form-data”<?php endif; ?>>
<?php if(!$_product->isGrouped()): ?>
<label for=”qty”><?php echo $this->__(‘Qty’) ?>:</label>
<input type=”text” name=”qty” id=”qty” maxlength=”12″ value=”<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>” />
<?php endif; ?>
<button type=”button” class=”button btn-cart” onclick=”this.form.submit()”>
<span>
<span><?php echo $this->__(‘Add to Cart’) ?></span>
</span>
</button>
</form>
Listed here are the files:
list.phtml -> http://pastebin.com/UJ0YvUq9 view.phtml -> http://pastebin.com/7pQtYvfe
Hopefully someone out there can help me out of it and get exactly what I want.
Thankyou.
The post How to modify the Quantity box Item list while using Magento? appeared first on .