News:

Support the VirtueMart project and become a member

Main Menu

Zero-priced delivery

Started by d0ublezer0, August 22, 2017, 15:36:29 PM

Previous topic - Next topic

d0ublezer0

Standart psplugin code in administrator\components\com_virtuemart\plugins\vmpsplugin.php 
has 
protected function getPluginHtml ($plugin, $selectedPlugin, $pluginSalesPrice)
which not rendering zero-priced plugin methods costs
I want to display the shipping price always, even it is zero
it is possible?
i cant find override for this issue

AH

#1
There is no override unfortunately.

This if statement returns a price and "nothing" when there is no price :-

if ($pluginSalesPrice) {


So you have to add an else clause to the code to return a formatted 0.00

} else { // added this custom element to deal with free shipping.
$costDisplay = '<span class="zero_' . $this->_type . '_cost">0.00</span>';
}
Regards
A

Joomla 4.4.5
php 8.1

d0ublezer0

Thanks for the answer. I understand that this is hack. And it will be deleted after the next update.