News:

Support the VirtueMart project and become a member

Main Menu

Ask question thank you page url

Started by pm4698, April 04, 2016, 15:21:51 PM

Previous topic - Next topic

pm4698

Hello there,

We use joomla 3 and virtuemart 3 and we would like to know the thank you page url after someone asks for a product through ask a question form.

Thank you in advance

jenkinhill

http://forum.virtuemart.net/index.php?topic=128401

Assuming you are using the default VM templates the url is exactly the same as the product, because the ask question form & response are in a modal. The thankyou template is components/com_virtuemart/views/askquestion/tmpl/mail_confirmed.php
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

pm4698

What i need is a URL in order to track the people that ask for each product. Do you have any ideas? From analytics department they asked me to give this URL in order to use it with Google analytics

pm4698

One idea that just came to mind, is maybe if on submiting the ask questoin form, to open a url window with the product url and something at the end like ?thankyou and open this for example for 1 - 2 seconds and close this, to take the thank you  as analytics data. What do you think?

pm4698

I am trying inside view.html.php file in askquestion folder at the path you specified to add in rendermailLayout function something like this:

$mylink = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component', FALSE) ;
      $link = "<script>window.open('$mylink', 'width=1,height=1,left=0,top=0')</script>";

echo $link;

For sure its not working, but do you have an idea how could this work?

Thank you in advance