Hi,
Yes, that's possible to hide the prices from anonymous or provide different prices for different shopper groups.
(those shopper groups can be regular "register users". or a special group, something like; special shopper that you put them into that group manually.)
Those are all possible through Virtuemart Backend.
First decide which option you need. Because there are 2 possible ways:
- Hide price from anonymous, show add to cart button
- Hide price from anonymous, hide add to cart button
Probably you want to go with the 2nd option, right? Because there is no point to show the add to cart button, if the price is unknown.
So i am assuming you want to go with the 2nd option. This is what you need to do.
Open the VM Backend.
First make sure this option is enabled:
Attachment Pasted_Image_1_29_14__4_52_PM-3.png not found
Then open any product and choose this option:
(you have to do this change to all products one-by one)
Attachment Pasted_Image_1_29_14__4_44_PM-8.png not found
If you choose this option, in the frontend you will see this (if you are not logged in):
Attachment Pasted_Image_1_29_14__4_47_PM-3.png not found
Since the price will be hidden (unknown) to -anonymous- users, the Virtuemart will pretend like, the price field left blank. So the "Call for Price" button will appear.
All you need to do is to change this "Call for Price" text and change it's link to "registration" page.
Open this PHP file:
/templates/flexible_lightmart/html/com_virtuemart/priductdetails/default.php
and find this line:
<a class="FlexibleAskforPrice" <?php if (!($parameter == "quicklook")) { ?>rel="facebox" rev="iframe|550|650"<?php } ?> href="<?php echo JRoute::_('index.php?option=com_virtuemart&tmpl=component&view=productdetails&task=askquestion&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.''); ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
And replace it with this:
<a class="FlexibleAskforPrice" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&flexible=register&task=editaddresscart&addrtype=BT'); ?>">Register to see the price</a>
Change the text:
Register to see the price, as you wish
The result will be:
Attachment Pasted_Image_1_29_14__4_56_PM-3.png not found
(the button "Register to see the price" will be linked to here: index.php?option=com_virtuemart&view=user&flexible=register&task=editaddresscart&addrtype=BT which is the registration page.
Attachment Pasted_Image_1_29_14__4_56_PMs-4.png not found
Regards,
Support