Customizing the addtocartbar.php file so the product thumbnail, name and price display next to the Quantity box, I have run into an issue concerning the price display.
<?php echo $product->prices['salesPrice']; ?>
I wish to display only the final sales price, but the above code 1) returns only an integer if the number is round 2) displays a dot(.) instead of a comma(,) as a decimal separator and 3) does not display currency symbol.
I have already tried calling the prices sublayout but the page breaks since calling a sublayout from a sublayout seems to do just that.
Any advice?
You can include a sublayout inside a sublayout. Maybe forgot to set currency or product data? This should work:
$currency = CurrencyDisplay::getInstance();
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$product,'currency'=>$currency));
Or you can add just the price div:
$currency = CurrencyDisplay::getInstance();
echo $currency->createPriceDiv('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
Issue solved instantly, thank you Ghost!!! :) :) :)