VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: razor7 on May 14, 2012, 18:04:55 PM

Title: [SOLVED] currencydisplay.php helper returns no prices at all (VM 2.0.6)
Post by: razor7 on May 14, 2012, 18:04:55 PM
Hi, if I do var_dump($this->_priceConfig[$name]) I get this

Quotearray
  0 => string '0' (length=1)
  1 => string '2' (length=1)
  2 => string '0' (length=1)

But the line 382 gets an "empty = true", so it fails to enter the if statement, and of course, no prices div is returned at all
if(!empty($this->_priceConfig[$name][0])){

why if "$this->_priceConfig[$name][0]" = 0 as string, PHP empty() function returns true?

To work arround this, I have changed line 382 to this and got prices shown as I wanted, but don't know if it creates side effects.
if($this->_priceConfig[$name][0]!=''){

Thanks a lot in advise.
Title: Re: [SOLVED] currencydisplay.php helper returns no prices at all (VM 2.0.6)
Post by: razor7 on May 14, 2012, 19:32:59 PM
Sorry, forgot to edit Pricing tab in VM config.

Best regards!