VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: adomi on April 25, 2013, 10:58:57 AM

Title: Modify "Ask question" button to URL product website
Post by: adomi on April 25, 2013, 10:58:57 AM
Hi,

I would like to replace the link of the button " ask for a question" with a url of product website ( in backend, there's ref,name, alias, and URL). With this, if price is not given, it's possible to go directly on the site dealer.

Could you please help ?
Thanks in advance,
SJ
Title: Re: Modify "Ask question" button to URL product website
Post by: K&K media production on April 25, 2013, 15:34:04 PM
http://forum.virtuemart.net/index.php?topic=108234.msg387280#msg386957
Title: Re: Modify "Ask question" button to URL product website
Post by: adomi on April 26, 2013, 10:24:03 AM
Thanks for reply.

I don't want to add extra field in ask a question. I would like to replace the link of button " ask a question" with existing field in virtuemart, the "URL" field in product details.

Then customer can have access to external page if there no price defined.



Title: Re: Modify "Ask question" button to URL product website
Post by: jenkinhill on April 26, 2013, 10:41:11 AM
This should grab the product url:

<?php echo $this->product->product_url ?>

Edit the section beginning // Ask a question about this product  in productdetails/tmpl/default.php  and use the edited file as a template override.
Title: Re: Modify "Ask question" button to URL product website
Post by: K&K media production on April 26, 2013, 13:04:25 PM
QuoteI don't want to add extra field in ask a question. I would like to replace the link of button " ask a question" with existing field in virtuemart, the "URL" field in product details.

If you read the complete posts and not only the headline of the thread, then you will find the information how to change the link. The user asked also about the link and I've wrote him, he can do this also with a override.
Title: Re: Modify "Ask question" button to URL product website
Post by: adomi on May 15, 2013, 19:14:51 PM
Hi

thanks a lot,

I will try,
Again thanks for reply, it's cool,
SJ