Hi
I am calling the products sublayout, outside Virtuemart. Everything works fine except the add-to-cart button.
Checking it further, i can see that the problem resides in the action attribute of the add to cart form. The action is getting the url of the current page, if it is outside VM.
The solution is in the file: components\com_virtuemart\sublayouts\addtocart.php
in the line 50, there is that code:
<form method="post" class="product js-recalculate" action="<?php echo JRoute::_ ('index.php',false); ?>">
replace it with:
<form method="post" class="product js-recalculate" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart',false); ?>">
This works both if called from the VM pages and modules and outside them
Lets use this then
vmURI::getCleanUrl()
I don't see any difference with the vmURI::getCleanUrl()
Still returns the url of the current page, even if it is not a VM page
okey. got yah.