
My client would like to enable his consumers to view the prices upon login, and also be able to send inquiries to him directly from the product page. Since Virtuemart only allow you to “Call for Pricing” redirect to an product inquiry form, this lacks of user friendliness upon user. So I would like to add a login link right next to “Call for pricing”. I would also like to rename the “Call for pricing” to Inquiry. It should look something like the above image.
Here’s how you accomplished this.
2 files you will need to alter to get this done.
- price.tpl.php – Located at your joomla root folder
\components\com_virtuemart\themes\ja-zeolite\templates\common\price.tpl.php - english.php – Located at your joomla administrator folder
\administrator\components\com_virtuemart\languages\common\english.php
Open your english.php file.
locate this code
'PHPSHOP_PRODUCT_CALL' => 'Call for Pricing',
and change to this>
'PHPSHOP_PRODUCT_CALL' => 'Product Inquiry', 'PHPSHOP_PRODUCT_LOGIN' => 'Login for Pricing',
Open your price.tpl.php file and make the following changes
locate this code
$link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&product_id='.$product_id.'&subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );
below this code add the following>
echo " | ";
$link =$_SERVER['PHP_SELF'] . '?option=com_user&view=login&product_id='.$product_id;
echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_LOGIN') );
I hope you have enjoyed this post, be sure to subscribe to my rss feed by click the subscribe button at the top.
Good Luck!

Just a quick thank you. Really saved me a ton of time. I did not seem to need to make changes to the price.tpl … we will see. Really appreciate your work.
I’m glad to have visited your blog and good to know you! I find it interesting and informative.
Hello, thank you so much for this tutorial, but could you help me I'd like an image for Call for Pricing (not the text), and also I don't want the product inquiry… How do I achieve that?
hi there, is this can be done with virtuemart 2 version? because i want to put login required to show price. but it seems not avialable in virtuemart 2..
games for xbox kinect…
What number of mutants can it decide to try screw in the light? 60 %….