[SOLVED] currencydisplay.php helper returns no prices at all (VM 2.0.6)

Started by razor7, May 14, 2012, 18:04:55 PM

Previous topic - Next topic

razor7

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.
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store

razor7

Sorry, forgot to edit Pricing tab in VM config.

Best regards!
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store