VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: cdh992 on August 06, 2014, 11:58:15 AM

Title: How to link "call for price" button to contact page
Post by: cdh992 on August 06, 2014, 11:58:15 AM
Hi, when I leave the price on a product empty I get a button 'call for price' which links to an ask a question form on a separate page. I want to link the button to my contact page instead. Can anyone help me with this please?

Greatly appreciate any help!

Thanks

I am woking in joomla 2.5.22 and virtuemart 2.6.6
Title: Re: How to link "call for price" button to contact page
Post by: AH on August 06, 2014, 19:40:44 PM
http://forum.virtuemart.net/index.php?topic=79799.0 (http://forum.virtuemart.net/index.php?topic=79799.0)
Title: Re: How to link "call for price" button to contact page
Post by: cdh992 on August 07, 2014, 12:40:35 PM
I am woking in joomla 2.5.22 and virtuemart 2.6.6

Thanks
Title: Re: How to link "call for price" button to contact page
Post by: GJC Web Design on August 07, 2014, 14:10:04 PM
you need to add some logic in your default_addtocart.php over ride to show the link you want

around the if (!( VmConfig::get('askprice', 0) and empty($tmpPrice) ) ) {  statement
Title: Re: How to link "call for price" button to contact page
Post by: cdh992 on August 07, 2014, 15:18:09 PM
Thanks for the reply... I have just tried your suggestion but I still can't get it to link. Please bear with me as I am a beginner, this is the link I have placed around the statement:

   <a href="http://newsite2.g2fdev.com/index.php/contact-us2"><?php
         } else {
            $tmpPrice = (float) $this->product->prices['costPrice'];
         if (!( VmConfig::get('askprice', 0) and empty($tmpPrice) ) ) {
               ?></a>

Is that right as it doesn't seem to work.

Thanks
Title: Re: How to link "call for price" button to contact page
Post by: cdh992 on August 07, 2014, 16:31:55 PM
Solved it!  :D  Had to link it from default_showprices.php.