News:

Looking for documentation? Take a look on our wiki

Main Menu

Call for price

Started by idor, February 04, 2020, 13:34:18 PM

Previous topic - Next topic

idor

Hello,
I would like to change the "call for price" button´s function. If there isn´t a price to a product and the user hits the call for price button, I would like to try to make a call ej. "tel:00000000" in every page that the button appears (product page, category page, carousel etc.)
Is it possible?

Jörgen

Your question is not quite clear, Change how and why ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

PRO

sublayouts/prices.php


change
<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>


to this below, but change the numbert and text

<a href="tel:+01273123456">Your text here</a>

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

AH

Do a template override

$phone should be taken from the vendor contact number

You can make the ask for price display a simple click to call div that will call the required number when clicked - mostly only used, of course, on mobile phone displays.

$clicktocall = '<div itemprop="telephone mobile-only"><button class="mobile-click-to-call" " onclick="window.location.href=\'tel:'.$tel.'\'">'.$phone.' - ' vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE').'</button></div>';
Regards
A

Joomla 4.4.5
php 8.1