Hi,
I've been trying to workout how to change the link, as well removing the pop-up box when clicking on "Call For Price" on a products page.
I've searched all around my template and Virtuemart files to find the link, but after over 2 hours I've had no luck.
I've searched the forum and other sites to find a solution, but no 'fix' has worked for me yet.
Please help, it would be greatly appreciated :)
I'm currently running on:
Joomla 3.5.1
VirtueMart 3.0.16
Thanks.
over ride components\com_virtuemart\sublayouts\prices.php
$askquestion_url
Quote from: GJC Web Design on July 07, 2016, 16:35:25 PM
over ride components\com_virtuemart\sublayouts\prices.php
$askquestion_url
Hi,
I've tried this already, but can you please confirm which area I have to change to re-direct this to my contact page (/contact) :
$askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component', FALSE);
?>
<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
Thanks in advance.
change the $askquestion_url
if it has no effect u must be over riding it alreday
Quote from: GJC Web Design on July 07, 2016, 16:46:21 PM
change the $askquestion_url
if it has no effect u must be over riding it alreday
Thanks for your reply,
I've changed the code as below. Its made no difference.
I can't see how it would be overridden elsewhere, as I've made no other changes
$askquestion_url = "/contact";
?>
<a class="ask-a-question bold" href="/contact>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
Using a commercial Joomla/VM template? If so you probably already have overrides, which probably are in templates/[yourJoomlaTemplate]/html/com_virtuemart/sublayouts/ etc.
Quote from: jenkinhill on July 07, 2016, 17:26:20 PM
Using a commercial Joomla/VM template? If so you probably already have overrides, which probably are in templates/[yourJoomlaTemplate]/html/com_virtuemart/sublayouts/ etc.
Cheers, I had already checked this from a previous forum post and I don't have a 'sublayouts' folder in templates/captivashop/html/com_virtuemart/.
Why is there not an option in the VM config to allow this URL change?
QuoteWhy is there not an option in the VM config to allow this URL change?
you want a core change because u can't find your file?
The method IS to change it in the templates.. that is what a template is....
every possibility your template doesn't even use sublayouts... I have seen many templates still using VM2 code base
If the template is using a bodge of VM2 layout files, then the place to look is templates/[yourJoomlaTemplate]/html/com_virtuemart/productdetails/
I took a-look in; templates/captivashop/html/com_virtuemart/productdetails/ and found the line of text in the correct file. Change the url's and nothing happened.
I however decided to see if the 'ask-a-question' was related to the question pop-up product form, I re-enabled this and it was related, this has now changed url's to my contact page. I've managed to add a langue override so the button displayed the text I want it to. Not what I originally wanted to change, but it still works.
I just need to remove the pop-up box that appears when I click this. I've searched the forum but I couldn't find any recent related threads, (not really sure what to call this box ether... fancybox? popup?)
If you could let me know what to add/remove that would be perfect.
Cheers :D
Hmm.. how could we know the code of an obviously very out of date code base template???
the pop is usually either called by class (change it) or an attribute
Alright. After more searching, I found out there is an area in Configuration/Templates where you can Activate/Disable the Fancybox. Glad that this is part of the configuration :)
Thanks for your help. Solved my problems