News:

Support the VirtueMart project and become a member

Main Menu

Changing "Call For Price" link

Started by futureclient, July 07, 2016, 16:29:05 PM

Previous topic - Next topic

futureclient

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.

GJC Web Design

over ride  components\com_virtuemart\sublayouts\prices.php

$askquestion_url
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

futureclient

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.

GJC Web Design

change the $askquestion_url

if it has no effect u must be over riding it alreday
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

futureclient

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>

jenkinhill

Using a commercial Joomla/VM template? If so you probably already have overrides, which probably are in templates/[yourJoomlaTemplate]/html/com_virtuemart/sublayouts/  etc.
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

futureclient

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?


GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

If the template is using a bodge of VM2 layout files, then the place to look is templates/[yourJoomlaTemplate]/html/com_virtuemart/productdetails/
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

futureclient

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

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

futureclient

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