News:

Support the VirtueMart project and become a member

Main Menu

Remove "Ask question" button

Started by stjaniben, January 24, 2012, 20:43:02 PM

Previous topic - Next topic

stjaniben

Hi,

Joomla 1.7.3 - VM 2.0.0.
How do I remove the "Ask a question" button? Been searching, reading and none of the answers have worked for me as 99% of them are for older versions.

Thanks,
Stjani

design609

Use FTP
Go to file:
yourdomain.com/components/com_virtuemart/views/productdetails/tmpl/default.php

Download a copy to local machine

Go to your template folder and template (create or use the folder "html" within there) 
yourdomain.com/templates/yourtemplate/html/

in this folder create folders:
com_virtuemart/productdetails/

So now you have path::::::::::::
yourdomain.com/templates/yourtemplate/html/com_virtuemart/productdetails/

Inside here you upload the file you downloaded
default.php

So now we have on the server:
yourdomain.com/templates/yourtemplate/html/com_virtuemart/productdetails/default.php

Edit this file (template override)
Look after this in the file and delete it:

Quote// Ask a question about this product ?>
      <div class="ask-a-question"> <a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>-->
      </div>

Save

Now you ask link is gone

Cheers

stjaniben

Thanks - tried that but for some reason all I get is a white screen once I've saved and refreshed the page. Any thoughts?

Stjani

prismalight

Is there a way to use the com_contact module for all inquiries?
Theproduct sku or / and a link of the product should be send in the body message of contact_form.
I would recommend to use for all email request the mod_contact as this can be easily modified like "captcha" and is one central module.


PRO

Quote from: prismalight on January 27, 2012, 19:23:08 PM
Is there a way to use the com_contact module for all inquiries?
Theproduct sku or / and a link of the product should be send in the body message of contact_form.
I would recommend to use for all email request the mod_contact as this can be easily modified like "captcha" and is one central module.




productdetails/tmpl/default.php

change this
$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');

r_ekkie

Which part of this code should be replaced then??

// Ask a question about this product
if (VmConfig::get('ask_question', 1) == '1') { ?>
   <div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
<!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->
</div>

jenkinhill

A switch to remove Ask a Question in included in the config in VM2.0.1K   http://forum.virtuemart.net/index.php?topic=98112.0
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

flykari

I have tried hard the switch to remove Ask a Question which is included in the newest VM.
How ever it does not work ?

How can I remove the Ask question button?

Kind regards,
Kari

partone

Has anyone managed to find an answer to this problem yet? I followed the steps recommended by design609 but nothing changed.

ivus

@partone

are you running a 3rd party theme? design609 instructions are spot on and should work.

Just to clarify: design609 said...
Quote
Go to your template folder and template (create or use the folder "html" within there) 
yourdomain.com/templates/yourtemplate/html/

/templates/yourtemplate/html/  <-- did you put it into "yourtemplate" folder? the one you're using for VM.

adomi

Hi,

It's nearly the same question for me, and after search i'm block.
I would like to replace the link of the button " ask for a question" with a url of product ( 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