Hello,
I'm triying get this in Storebox template but don't work for me, I think that this because this template have the overlay with "View" text and I can't find where put the correct code to work in this template.
I'm triying put this code in my templates/gk_storebox/html/com_virtuemart/category/default.php
<div class="addtocart-bar">
<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 JText::_ ('COM_VIRTUEMART_CART_NOTIFY') ?></a>
<?php } else { ?>
<!-- <label for="quantity<?php echo $product->virtuemart_product_id; ?>" class="quantity_box"><?php echo JText::_ ('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
<span class="quantity-box">
<input type="text" class="quantity-input js-recalculate" name="quantity[]" onblur="check(this);" value="<?php if (isset($product->step_order_level) && (int)$product->step_order_level > 0) {
echo $product->step_order_level;
} else if(!empty($product->min_order_level)){
echo $product->min_order_level;
}else {
echo '1';
} ?>"/>
</span>
<span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus"/>
<input type="button" class="quantity-controls quantity-minus"/>
</span>
<?php // Display the quantity box END ?>
<?php
// Display the add to cart button
?>
<span class="addtocart-button">
<?php echo shopFunctionsF::getAddToCartButton ($product->orderable); ?>
</span>
<?php } ?>
<div class="clear"></div>
</div>
<?php }
// Display the add to cart button END ?>
<input type="hidden" class="pname" value="<?php echo htmlentities($product->product_name, ENT_QUOTES, 'utf-8') ?>"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="cart"/>
<noscript><input type="hidden" name="task" value="add"/></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>"/>
</form>
<div class="clear"></div>
</div>
But with no luck for now.
¿Could some give some help with this?
Thanks.