Looking for documentation? Take a look on our wiki

Main Menu

Call for Price

Started by denyal, December 14, 2011, 12:15:03 PM

Previous topic - Next topic


J 1.7.3 V 2.0.0RC3

When I leave a price empty, I'd like to show a link Call For Price. Or maybe I could write some text instead of putting numbers in Price.

I'm reading that this could be done in V 1.1

edit: this is some code from V 1.1 that I found in the forum, but I don't know if or how I can use it in V 2

// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {

$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') );

and this is the topic where it says how to modify it in the old VM - but I cannot find anything similar in the new VM

PS: Personally I'm interested in showing Call For Price in Category page


this is a quick fix I made

I put a link-button under the pic-thumbs in Category when the price is empty, and it connects me to my Contact form

in line 212

I added
<?php if ($this->show_prices == '1'){

<div class="ask-a-question">
<a class="ask-a-question" href="contact.html" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE'?></a>
<?php }

and in

I added:


well ... nope

If you put Prices ON, and you leave the price empty, then on Product Details page, you got a 'Price:' showing ... :-/


<?php if(empty($this->$basePrice)){  echo '<div class="ask-a-question">
<a class="ask-a-question" href="contact.html" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>


Banquet Tables Pro = LEGEND!


but I'm a noob, I couldn't make it work like that  :-\


it will only work in the product page like that


I need it to show on the category page as well as the product page
Jeff MacDougall


Quote from: Jeff on December 28, 2011, 06:44:56 AM
I need it to show on the category page as well as the product page

different between category and product page is $this->



this will be added to the core templates soon


Jeff, this can be added to the product page , but for the category page you will not get the ask question modal link. BUT it can display

"Call for price"


this has been added to the svn for category, and product details.

Category does pop up ask question.


I am using Joomla! 1.7 and Virtuemart 2 and I would like to have a "call for price" (in a multilingual site) in a product when I leave the price empty and also in some custom fields that i define as cart variants. Please give me a detailed answer as I am a new to this.

Thank you in advance.


ChristinaT, what have you done? and where is the problem?

Vmart already has call for price.

Are you having problems with the other languages strings?


When I leave the price empty in a custom field it is filled automatically with a zero, which is not what I want, and in a product it is just left empty and when added to cart it seems to be also free.