Hi again,
Is there a way to activate the ADD TO CART button on products on the category page? Right now, have no option to click on the product detail to be able to add a specific product to cart.
Any help would be appreciated !!
Thank you
<a href="<?php echo $product->link; ?>"
<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
<div class="addtocart-bar">
<?php // Display the quantity box ?>
<!-- <label for="quantity<?php echo $this->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" name="quantity[]" value="1" />
</span>
<span class="quantity-controls">
<input type="button" class="quantity-controls quantity-plus" />
<input type="button" class="quantity-controls quantity-minus" />
</span>
<?php // Display the quantity box END ?>
<?php // Add the button
$button_lbl = JText::_('COM_VIRTUEMART_CART_ADD_TO');
$button_cls = ''; //$button_cls = 'addtocart_button';
if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
$button_lbl = JText::_('COM_VIRTUEMART_CART_NOTIFY');
$button_cls = 'notify-button';
} ?>
<span class="addtocart-button">
<input type="submit" name="addtocart" class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
</span>
<div class="clear"></div>
</div>
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
<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 ?>" />
<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
</form>
.quantity-plus {background: url(../images/vm/cartquantity.png) no-repeat 0 0 #000000!important;}
.quantity-minus {background: url(../images/vm/cartquantity.png)no-repeat 0 -38px #000000!important;}
.quantity-plus:hover {background: url(../images/vm/cartquantity.png) no-repeat 0 0 #ff7e57!important;}
.quantity-minus:hover {background: url(../images/vm/cartquantity.png)no-repeat 0 -38px #ff7e57!important;}
.quantity-controls { display:none;}
<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
<div class="addtocart-bar">
<?php // Add the button
$button_lbl = JText::_('COM_VIRTUEMART_CART_ADD_TO');
$button_cls = ''; //$button_cls = 'addtocart_button';
if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
$button_lbl = JText::_('COM_VIRTUEMART_CART_NOTIFY');
$button_cls = 'notify-button';
} ?>
<span class="addtocart-button">
<input type="submit" name="addtocart" class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
</span>
<div class="clear"></div>
</div>
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
<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 ?>" />
<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
</form>
\templates\gk_storebox\html\com_virtuemart\productdetails\default.php
/* Let's see if we found the product */
if (empty($this->product)) {
echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '<br /><br /> ' . $this->continue_link_html;
return;
}
/* Let's see if we found the product */
if (empty($this->product)) {
echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '<br /><br /> ' . $this->continue_link_html;
return;
}
/* Fix for multiple quantity in products quantity steps */
if (isset($this->product->step_order_level))
$step=$this->product->step_order_level;
else
$step=1;
if($step==0)
$step=1;
$alert=JText::sprintf ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED', $step);
<div class="addtocart-area">
<form method="post" class="product js-recalculate" action="<?php echo JRoute::_('index.php',false); ?>" >
<div class="addtocart-area">
<form method="post" class="product js-recalculate" action="<?php echo JRoute::_('index.php',false); ?>" >
<input name="quantity" type="hidden" value="<?php echo $step ?>" />
Purchase Quantity Steps:
Minimum Purchase Quantity:
In Stock: