VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: DPVK on July 30, 2013, 22:13:25 PM

Title: " Call For Price" Button Re-Direct
Post by: DPVK on July 30, 2013, 22:13:25 PM
I am trying to make it so when you click on the Call For Price button it redirects you to the contact page but no matter what I do it always sends me to my home page. Any thoughts on how I might do this?
Title: Re: " Call For Price" Button Re-Direct
Post by: Maxim Pishnyak on July 31, 2013, 10:55:04 AM
What did you try to do?
Title: Re: " Call For Price" Button Re-Direct
Post by: CGLaidlaw on August 19, 2014, 03:43:48 AM
I too have this same issue, I am using VM 2.9.9 and I have not changed anything within .php files at all. Yet the "Call for Price" button still redirects to Home. Any help on this topic would be majorly helpful and much appreciated! I have looked for the file price.tpl.php and cannot find it within my installation, or on my computer at all. (Using a local WAMP server for testing purposes)

Thank you in advance!
Title: Re: " Call For Price" Button Re-Direct
Post by: GJC Web Design on August 19, 2014, 10:19:46 AM
in templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default.php

$serviceurl = 'index.php?option=com_contact&view=contact&id=9&Itemid=470&tmpl=component';//whatever your id and Itemid are
$serviceurl = JURI::root().$serviceurl;
$document = JFactory::getDocument();
$document->addScriptDeclaration("
   jQuery(document).ready(function($) {
      $('a.ask-a-question').click( function(){
         $.facebox({
            iframe: '" . $serviceurl . "',
            rev: 'iframe|550|800'
         });
         return false ;
      });