I tried to figure out how to do this, but I just can’t solve it, I tried to search here on Google and on Virtuemart forums without success.
I am trying to display the Add to Cart button that is on the Product Details page of the Categories Overview page. I did this earlier in Virtuemart 1.1 using the following code:
<?php echo $form_addtocart ?>
However, trying to use the same code in Virtuemart 2, I do not get any result, although their leadership still claims this, as far as I can see:
http://virtuemart.net/documentation/Developer_Manual/Modifying_the_Layout.html
I tried to copy the exact code from the products page, but this also does not work, the code:
<?php
if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices)) {
echo $this->loadTemplate('addtocart');
}
?>
, , :
/components/com_virtuemart/views/category/tmpl/default.php (the Category template)
/components/com_virtuemart/views/productdetails/tmpl/default.php (the Product page that the button is from)
=====
, - .
,
alexnire.