VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: gvgracing on October 22, 2014, 11:31:33 AM

Title: Prices does not show up
Post by: gvgracing on October 22, 2014, 11:31:33 AM
Hi,

i use joomla 3.3.6 and virtuemart 2.9.9G. The prices doesnt show up on my website. What do i have to check more? I checked the boxes in shopper groups, and in the configuration => pricing.

(http://i23.photobucket.com/albums/b386/tacchini/Capture.png) (http://s23.photobucket.com/user/tacchini/media/Capture.png.html)


(http://i23.photobucket.com/albums/b386/tacchini/Capture-1.png) (http://s23.photobucket.com/user/tacchini/media/Capture-1.png.html)


(http://i23.photobucket.com/albums/b386/tacchini/Capture-2.png) (http://s23.photobucket.com/user/tacchini/media/Capture-2.png.html)
Title: Re: Prices does not show up
Post by: gvgracing on October 23, 2014, 11:25:21 AM
if i change my template, it doesnt work neither, see print screen. (http://i23.photobucket.com/albums/b386/tacchini/Capture-3.png) (http://s23.photobucket.com/user/tacchini/media/Capture-3.png.html)
Title: Re: Prices does not show up
Post by: GJC Web Design on October 23, 2014, 11:27:14 AM
changed to what? Try the native protostar
Title: Re: Prices does not show up
Post by: gvgracing on October 23, 2014, 14:54:28 PM
Quote from: GJC Web Design on October 23, 2014, 11:27:14 AM
changed to what? Try the native protostar
i changed it to breeze. what is native protostar? thanks
Title: Re: Prices does not show up
Post by: GJC Web Design on October 23, 2014, 16:50:29 PM
if you mean Beez  fine  - protostar is the other std. one

but the screen definitely doesn't look like beez to me
Title: Re: Prices does not show up
Post by: bboom on October 24, 2014, 16:35:34 PM
I've the same problem (I use VM 2.9.9.2). I looked in the currencydisplay file and saw that the problem is in the getFormattedCurrency function. When I set $format hard coded it works perfectly, but when you use the normal function the function returns NULL.
Title: Re: Prices does not show up
Post by: gvgracing on October 27, 2014, 14:17:44 PM
Quote from: bboom on October 24, 2014, 16:35:34 PM
I've the same problem (I use VM 2.9.9.2). I looked in the currencydisplay file and saw that the problem is in the getFormattedCurrency function. When I set $format hard coded it works perfectly, but when you use the normal function the function returns NULL.
hi! thank you for your advice. Where can i find the currencydisplay file? i looked under my template folder but couldnt find it.
Title: Re: Prices does not show up
Post by: Milbo on October 27, 2014, 18:19:55 PM
Did you setup a vendor currency?
Title: Re: Prices does not show up
Post by: bboom on October 27, 2014, 18:44:48 PM
That was the problem in my configuration and I think that this will solve the problem by gvgracing also.

Thanks!
Title: Re: Prices does not show up
Post by: gvgracing on October 30, 2014, 12:21:01 PM
Quote from: bboom on October 27, 2014, 18:44:48 PM
That was the problem in my configuration and I think that this will solve the problem by gvgracing also.

Thanks!
oh thank you  i found the currencydisplay.php file. can you give me more information what i have to change? Sorry i dont know much about PHP.
Title: Re: Prices does not show up
Post by: gvgracing on October 30, 2014, 12:25:37 PM
i guess i should change something in here?

/**

* Format, Round and Display Value

* @author Max Milbers

* @param val number

*/

public function getFormattedCurrency( $nb, $nbDecimal=-1){



//TODO $this->_nbDecimal is the config of the currency and $nbDecimal is the config of the price type.

if($nbDecimal==-1) $nbDecimal = $this->_nbDecimal;

if($nb>=0){

$format = $this->_positivePos;

$sign = '+';

} else {

$format = $this->_negativePos;

$sign = '-';

$nb = abs($nb);

}



//$res = $this->formatNumber($nb, $nbDecimal, $this->_thousands, $this->_decimal);

$res = number_format((float)$nb,(int)$nbDecimal,$this->_decimal,$this->_thousands);

$search = array('{sign}', '{number}', '{symbol}');

$replace = array($sign, $res, $this->_symbol);

$formattedRounded = str_replace ($search,$replace,$format);



return $formattedRounded;

}
Title: Re: Prices does not show up
Post by: bboom on October 30, 2014, 13:28:03 PM
I think you don't have to to change the virtuemart code. The only thing you have to do is add a currency to the vendor via the joomla backend.
Title: Re: Prices does not show up
Post by: gvgracing on October 30, 2014, 15:52:22 PM
Quote from: bboom on October 30, 2014, 13:28:03 PM
I think you don't have to to change the virtuemart code. The only thing you have to do is add a currency to the vendor via the joomla backend.
omg, thanks you so much! that did the trick