Magento Forum

   
Magento quantity field doesn’t work when product have custom option
 
fevis
Member
 
Avatar
Total Posts:  49
Joined:  2011-02-24
 

Hello all

I have a strange problem with qty box in Magento. Whatever number i type in qty box, only 1 item gets transferred to the cart.

I have found, that if i remove all product options (eg. color/size etc.) it works fine and whatever qty i type gets transferred to the cart, but with product option it does not work.

I have checked this Magento quantity field doesn’t work without luck.

It is a simple product and i didn’t modify anything in addtocart.phtml

Any suggestoions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
G_Mehta
Guru
 
Avatar
Total Posts:  418
Joined:  2010-01-27
India
 

not sure about your issue, please paste your site URL, so may can helps you after reviewing your site.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fevis
Member
 
Avatar
Total Posts:  49
Joined:  2011-02-24
 

Hi

URL here.

As you can see it only ads 1 to the cart even though i change qty to something else. If i remove the option “Vælg farve” it works fine.

This is how addtocart.phtml:
/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml

<?php $_product $this->getProduct(); ?>
<?php $buttonTitle 
$this->__('Add to Cart'); ?>
<?php 
if($_product->isSaleable()): ?>
    
<div class="add-to-cart">
        
<?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->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        
<?php endif; ?>
        
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
        
<?php echo $this->getChildHtml(''truetrue?>
    
</div>
<?php endif; ?>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top