News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

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 3.10.11
php 8.0

d0ublezer0

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