Hi there,
I figured this out okay with VM2 but VM3 I can't seem to figure it out.
What I want to do is change the "ask a question" URL to my contact page "/contact" could someone help me out with this and provide an example?
Thanks in advance,
Richard
change
$askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component', FALSE);
in the productdetails default
Hi GJC,
I tried changing what you said, but it's not working for me. I have tried every which way I can think of, but it's still pulling up the old ask a question link.
Could you give me an example of what I need to be replacing it with please? Maybe just to change it to example.com or whatever?
Here's what I changed it to and it was still not changing,
// Ask a question about this product
if (VmConfig::get('ask_question', 0) == 1) {
$askquestion_url = JRoute::_('index.php?');
?>
<div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>
Thanks,
Richard
if thats still triggering the ask template your in the wrong file.. check if your using over rides - confirm the actual details file your using
if u don't want a model popup you need to rename the link class as well
<a class="ask-a-questionxx"
Hi GJC,
I am using the file path components/com_virtuemart/views/productdetails/tmpl/default.php as instructed. Not sure what I am missing here as I thought this was the file to edit, also there are no overrides.
Could the a class be stopping the link from changing? Would it help if I changed it to a btn?
Thanks,
Richard
sorry .. crystal ball broke .. if you change it in the default file and it doesn't change - assumption is your in the wrong file
so then u need to find the right file on YOUR install
Hi GJC,
I've just realized that I'm editing it correctly but I asked the wrong question, hence why I couldn't figure it out. What I want to do is change the "call for price" link, not the "ask a question" sorry, my bad :( Your first reply works for the "ask a question" link for anyone else looking for the answer.
For anyone looking to change the "call for price" link it's in the components/com_virtuemart/sublayouts/prices.php file at around line 30
One last question GJC, how would I stop the "call for price" from opening in a popup?
Thanks,
Richard
QuoteOne last question GJC, how would I stop the "call for price" from opening in a popup?
haven't checked but probably change the class of the a -- as mentioned below in ask a ?