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

Call for price just text not button

Started by agps, October 15, 2013, 21:27:37 PM

Previous topic - Next topic

agps

Hi,

I would like to display in product details only a text "Call for price" how can I disable the Ask a question button?

J2.5.14 & VM2.0.24

Regards

jenkinhill

If for all products then turn off "Allows to Ask a question" in Config/Shopfront

If just for selected products then edit the template and create an override just for those items
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

agps

I want it for all products the parameter "Allows to Ask a question" is unchecked. I have enabled only "Show call for price, when the price is empty".

In view of product detail I did not find any way to override it.

jenkinhill

Quote from: agps on October 15, 2013, 21:40:54 PM
I want it for all products the parameter "Allows to Ask a question" is unchecked.

In which case that should not show on the product details page - unless you are using template overrides which do not perform the check for that switch.
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

agps

I have override only in category (template/html/com...).

In product details if the price is empty/zero I would like to display a text "Call for price". Now it displays a button "Call for price" that opens a pop up window to send a message.

Sorry for the misunderstanding.

agps

I have found it. In default_showprices.php I have to change the following line

<a class="ask-a-question bold" href="<?php echo $this->askquestion_url ?>" rel="nofollow" ><?php echo JText::('COM_VIRTUEMART_PRODUCT_ASKPRICE'?></a>

to

<?php echo JText::('COM_VIRTUEMART_PRODUCT_ASKPRICE'?>