News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to change the "ask a question" URL?

Started by gringo211985, January 21, 2015, 18:18:41 PM

Previous topic - Next topic

gringo211985

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

GJC Web Design



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
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

gringo211985

#2
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

GJC Web Design

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"
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

gringo211985

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

GJC Web Design

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
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

gringo211985

#6
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

GJC Web Design

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 ?
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