VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: stjaniben on January 24, 2012, 20:43:02 PM

Title: Remove "Ask question" button
Post by: stjaniben on January 24, 2012, 20:43:02 PM
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
Title: Re: Remove "Ask question" button
Post by: design609 on January 26, 2012, 02:31:49 AM
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
Title: Re: Remove "Ask question" button
Post by: stjaniben on January 26, 2012, 12:53:28 PM
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
Title: Re: Remove "Ask question" button
Post by: 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.

Title: Re: Remove "Ask question" button
Post by: PRO on January 27, 2012, 20:03:35 PM
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');
Title: Re: Remove "Ask question" button
Post by: r_ekkie on February 16, 2012, 15:12:52 PM
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>
Title: Re: Remove "Ask question" button
Post by: jenkinhill on February 17, 2012, 11:29:20 AM
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
Title: Re: Remove "Ask question" button
Post by: flykari on August 31, 2012, 17:19:01 PM
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
Title: Re: Remove "Ask question" button
Post by: partone on September 12, 2012, 10:25:12 AM
Has anyone managed to find an answer to this problem yet? I followed the steps recommended by design609 but nothing changed.
Title: Re: Remove "Ask question" button
Post by: ivus on September 12, 2012, 14:50:29 PM
@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.
Title: Modify "Ask question" button
Post by: adomi on April 25, 2013, 10:57:35 AM
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