VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: agps on October 15, 2013, 21:27:37 PM

Title: Call for price just text not button
Post by: agps on October 15, 2013, 21:27:37 PM
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
Title: Re: Call for price just text not button
Post by: jenkinhill on October 15, 2013, 21:36:01 PM
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
Title: Re: Call for price just text not button
Post by: agps on October 15, 2013, 21:40:54 PM
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.
Title: Re: Call for price just text not button
Post by: jenkinhill on October 15, 2013, 23:16:00 PM
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.
Title: Re: Call for price just text not button
Post by: agps on October 15, 2013, 23:33:48 PM
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.
Title: Re: Call for price just text not button
Post by: agps on October 16, 2013, 08:17:53 AM
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'?>