I using JL 2.5 & Vm 2.0.12b . I checked "call for price, when the price is empty" in Price configuration. But it dont show anything.
Plz see an image in attach file and tell me how I can show "Call for price"
Thanks alot.
[attachment cleanup by admin]
Hello,
I am using the following code for the ask for price inside default_showprices.php
if (empty($this->product->prices['salesPrice']) and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
?>
<a class="ask-a-question bold" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
Also please can you turn vmdebug on and check the prices if are 0?
Regards
thanks for reply.
my file : default_showprice.php is:
//vmdebug('view productdetails layout default show prices, prices',$this->product->prices);
if (empty($this->product->prices) and VmConfig::get ('askprice', 1) and !$this->product->images[0]->file_is_downloadable) {
?>
<a class="ask-a-question bold" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
}
How I can rewrite it to show "Call for price" ?
I think i post it before
if (empty($this->product->prices['salesPrice']) and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
Regards
btw, you should upgrade at least to version 2.0.12f if not to 2.0.14
Regards
thanks all. I have upadated to VM 2.0.14 & fixed Call for price.
Nice,
Don't forget to update your template files: http://virtuemart.net/index.php?option=com_content&id=416
Regards
Hello
My problem is that I cannot turn on the link "Call for price" in category view.
To do this I think that we must change the category/default.php code below to be a link in the popup call for price:
echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
How can we achieve that?
Thank you
Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Hello,
I use this (may be i use different classes), make it as you wish:
<?php //code to display call for price in category with enabled !
if (empty($product->prices['salesPrice']) and VmConfig::get ('askprice', 1)) {
$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component');
?>
<div class="call-for-price">
<a class="modal button" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE_CART') ?></a>
</div>
<?php } ?>
Regards
Yes it worked !!!
Fast and reliable.
(I just added a "?>" in the 1st line.)
As I checked in VM 2.0.15d the link is also missing.
I think that somebody should put it in the next revisions.
Thank you
etna I believe that is already done. Odd numbered verions (like 2.0.15) are test versions for debugging, not for use on live sites.
Yes,
Is embedded under prices section, printouts only the label, not the 'link' to open the from like "ask a question" ... i think :)
Problema!
"Call for price" works perfect locally (WAMP) but when in live I got a blank page.
Writing back the original code
echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
turns OK.
The only difference is the PHP version, instead of 5.3.13 is 5.3.10
Any ideas?
Thank you.
Hello,
I think this is related to your sef/htaccess settings. Please disable them for start (disable both joomla/vm2 sef and also mod_url_rerwriting and rename your htaccess file to something else). Also please check your joomla error log file and paste here your results.
Regards
Well
I disabled both SEF, renamed .htaccess, cleared the cache, reupload the file and worked.
Then I reactivate both SEF .htaccess and it worked again.
I think that it was cache issue.
Thank you again
Yes, or maybe wrong session information when testing ...
but you solved it.
Regards