<?php
/**
 * Avalanche for Magento 1.8+
 * Designed by Fast Division (http://fastdivision.com)
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://fastdivision.com/legal/license.txt
 *
 * @author     Fast Division
 * @version    1.5.0
 * @copyright  Copyright 2013 Fast Division
 * @license    http://fastdivision.com/legal/license.txt
 */
?>

<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>
    <div class="add-to-cart">
        <?php if(!$_product->isGrouped()): ?>
        	<?php $showQuantityField = Mage::getStoreConfigFlag('avalanche_config/avalanche_product_details/show_quantity'); ?>
			<div class="form-field<?php if(!$showQuantityField) { ?> hidden<?php } ?>">
				<table id="add-to-cart-row"><tr><td>
					<label for="quantity"><?php echo $this->__('Quantity:') ?> &nbsp;</label>
				</td><td>
					<input type="text" title="<?php echo $this->__('Quantity') ?>" name="qty" id="quantity" maxlength="12" style="font-size: 20px; font-weight: bold; text-align: center; width: 34px" value="<?php echo $this->getProductDefaultQty() * 1 ?>">
				</td><td>
					<div id="quantity-spinner">
						<div id="q-more"><a href="#"><img src="<?php echo $this->getSkinUrl('images/quantity-more.gif'); ?>" alt="More"/></a></div>
						<div id="q-less"><a href="#"><img src="<?php echo $this->getSkinUrl('images/quantity-less.gif'); ?>" alt="Less"/></a></div>
					</div>
				</td></tr></table>
			</div>
        <?php endif; ?>
		<div class="form-submit">
			<button type="submit" title="<?php echo $buttonTitle ?>" id="add-to-cart-button" class="action-button action-button-large" onclick="productAddToCartForm.submit(this)"><span><?php echo $buttonTitle ?></span></button>
		</div>
        <?php echo $this->getChildHtml('', true, true) ?>
    </div>
<?php endif; ?>
