Hi all!
I noticed, that the shipping costs are rendered empty, if the value is 0 ():
$this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], FALSE);
Why?
And how can I make VM render 0,00 [CurrSign] instead?
Thanks a lot in advance for any useful hint!
Kind regards,
Gerald
Try something like 0,0001
Regards
Jörgen @ Kreativ Fotografi
Wow - how ugly! ;D
But it seems to work.
Couldn't this cause rounding problems somewhere?
And most interesting:
Why does VM take the decision to display no amount at all on a price being 0 - shouldn't the layout creator be able to decide that?
Yes it is a shame that there is not a choice to display 0
This is controlled by :
\administrator\components\com_virtuemart\plugins\vmpsplugin.php
protected function getPluginHtml ($plugin, $selectedPlugin, $pluginSalesPrice) {
if ($pluginSalesPrice) {
existing code
} else { //added this custom element to deal with shipping free.
$costDisplay = '<span class="zero_' . $this->_type . '_cost">0.00</span>';
}
I added the "else" clause
Hi!
Thank you for that hack.
Actually I am not fond of core hacks as they mean big expense updating VM.
What does the VM team think about that issue?
Hello
If You make the "cost" small enough it will not show. Rounding to 2 decimals makes sure of that.
regards
Jörgen @ Kreativ Fotografi
@joergens solution does function
But a value for shipping will be stored for shipping charges in your tables
I personally don't like doing this as the value gets passed to our accounting platform and reported - no matter how small