News:

Support the VirtueMart project and become a member

Main Menu

Hide Pricing from Guests?

Started by geoffr, October 31, 2017, 08:12:16 AM

Previous topic - Next topic

geoffr

My client wishes to run their site as a Catalog only, unless the user is logged in, whereupon they will see the pricing.

Is this possible?  If so, how is it achieved?

Many thanks for your help.
Geoff

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alexanderflr

I needed to have like that so I added in addtocart.php from /templates/youtemplatename/html/com_virtuemart/sublayouts
the following:


<?php 
$user
=JFactory::getUser();
if(
$user->id>0);
   else {
?>

<a class="notify btn btn-primary btn-block" href='http://linktologinorregister><?php echo vmText::('Login or Register to see prices'?></a><?php
return;
 } 
?>


VM 3.2.8, Joomla 3.8.3, PHP 7.0.26

geoffr

So may I clarify:  In VirtueMart 1 (I am doing an upgrade), there was the Config option:

Price Configuration
Show Prices      
Membergroup to show prices to: (options):
"Registered"

Is this simple Config option no longer available? 

thanks,
Geoff

K&K media production

configuration -> pricing -> Show Prices

and each shoppergroup has this config option: Enable shoppergroup specific price display


pacecdn

Speed up websites with PaceCDN.com