In my product page there is no Quantity box. I found the in this file gk_quark/html/com_virtuemart/productdetails/default.php I found the code which makes me problem.
Is there any body to help me? What I have to change for this Quantity box to works?
<div class="addtocart-bar">
<span class="addtocart-button"> <?php echo $addtoCartButton ?> </span>
<noscript>
<input type="hidden" name="task" value="add"/>
</noscript>
<?php
$templateSettings = JFactory::getApplication()->getTemplate(true)->params;
if($templateSettings->get('vm3_show_quantity', '0') == '1' ) :
?>
<script type="text/javascript">
function check(obj) {
// use the modulus operator '%' to see if there is a remainder
remainder=obj.value % <?php echo $step?>;
quantity=obj.value;
if (remainder != 0) {
alert('<?php echo $alert?>!');
obj.value = quantity-remainder;
return false;
}
return true;
}
</script>
<?php
// Display the quantity box
$stockhandle = VmConfig::get ('stockhandle', 'none');
if (($stockhandle == 'disableit' or $stockhandle == 'disableadd') and ($product->product_in_stock - $product->product_ordered) < 1) { ?>
<a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=' . $product->virtuemart_product_id); ?>" class="notify"><?php echo vmText::_ ('COM_VIRTUEMART_CART_NOTIFY') ?></a>
<?php
} else {
$tmpPrice = (float) $product->prices['costPrice'];
if (!( VmConfig::get('askprice', true) and empty($tmpPrice) ) ) { ?>
<?php if ($product->orderable) : ?>
<label for="quantity<?php echo $product->virtuemart_product_id; ?>" class="quantity_box"><?php echo vmText::_ ('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label>
<span class="quantity-box">
<input type="text" class="quantity-input js-recalculate" name="quantity[]"
onblur="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>');"
onclick="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>');"
onchange="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>');"
onsubmit="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>');"
value="<?php echo $init; ?>" init="<?php echo $init; ?>" step="<?php echo $step; ?>" <?php echo $maxOrder; ?> />
</span> <span class="quantity-controls js-recalculate">
<input type="button" value="+" class="quantity-controls quantity-plus"/>
<input type="button" value="-" class="quantity-controls quantity-minus"/>
</span>
<?php endif; ?>
<?php
}
} ?>
<?php endif; ?>
</div>
<?php endif; ?>
<input name="quantity" type="hidden" value="<?php echo $step ?>" />
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="cart"/>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>"/>
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>"/>
<?php
$itemId=vRequest::getInt('Itemid',false);
if($itemId){
echo '<input type="hidden" name="Itemid" value="'.$itemId.'"/>';
} ?>
</form>