Dear freelancer,
I wanted to add a qty box on product list page of my magento shop. I managed to do so by adding this code:
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
<label for="qty"><?php echo $this->__('???.:') ?></label>
<input type="text" name="qty" id="qty" maxlength="12" value="1" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="[login to view URL](this)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
</form>
and
<script type="text/javascript">
var productAddToCartForm = new VarienForm('product_addtocart_form');
[login to view URL] = function(){
if ([login to view URL]()) {
[login to view URL]();
}
}.bind(productAddToCartForm);
</script>
Everything works great without Ajax pagination, but with Ajax pagination enabled the add to cart button doesn't do anything after 2nd(...) page is loaded.
I can provide a mirror site of my magento installation where you can work directly. What I need is to have this issue fixed and a file list with the updated files so I can update my original site myself.
Thanks