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" dont show

Started by ngodoan, December 10, 2012, 06:39:21 AM

Previous topic - Next topic

ngodoan

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]

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ngodoan

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" ?

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

bytelord

btw, you should upgrade at least to version 2.0.12f  if not to 2.0.14

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ngodoan

thanks all. I have upadated to VM 2.0.14 & fixed Call for price.

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

etna

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

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

etna

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

jenkinhill

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.
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

bytelord

#11
Yes,

Is embedded under prices section, printouts only the label, not the 'link' to open the from like "ask a question" ... i think :)
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

etna

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.


bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

etna

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