Hi,
sorry for my english! I've to hide the button "add to cart" from the category page and the detail product page for who is not registered!
So: who is registered can add to cart the product, while the guest can only see the product...
I'm using Vm 3.0.9
Thanks
HI to all, i solved my problem :)
you can go to components/com_virtuemart/sublayouts/addtocart.php and in line 49
add
if (!VmConfig::get('use_as_catalog', 0) ) {
//here you control the user access, if the user is a guest tell him to log in
$user = JFactory::getUser();
$status = $user->guest;
if($status == 1){
echo "Login to see the price";
}
else //else show him the button to add to cart
{
// Add To Cart Button
echo shopFunctionsF::renderVmSubLayout('addtocartbar',array('product'=>$product));
}
} ?>
You will lose customers!!!
do it to add to cart and register on checkout - you will have customer and registered customer...