News:

Looking for documentation? Take a look on our wiki

Main Menu

plugin vmshipmet weight_countries template override

Started by d0ublezer0, November 13, 2017, 07:29:16 AM

Previous topic - Next topic

d0ublezer0


d0ublezer0

He surrounds the text with parentheses and adds a plus sign.

d0ublezer0

Before my template, in the standard template file of the standard delivery method comes an array
$this->shipments_shipment_rates, which already contains the generated html
<span class="vmshipment"><span class="vmshipment_name">Самовывоз в Нижнем НовгороSPAMе</span><span class="vmshipment_description">ул. Обухова, 11 оф, 101</span><span class="vmshipment_cost fee"> ( +3 000 р)</span></span>
Where was it generated?
I cant found this.
Long searches with debugging did not help me.

d0ublezer0

Anyone? Please answer if you know:
Which code generates this and transfers to vmshipment plugin?:
<span class="vmshipment_cost fee"> ( +3 000 р)</span>

AH

It is created in:

\administrator\components\com_virtuemart\plugins\vmpsplugin.php

   protected function getPluginHtml ($plugin, $selectedPlugin, $pluginSalesPrice) {
Regards
A

Joomla 3.10.11
php 8.0

d0ublezer0

Quote from: AH on November 14, 2017, 09:42:42 AM
It is created in:

\administrator\components\com_virtuemart\plugins\vmpsplugin.php

   protected function getPluginHtml ($plugin, $selectedPlugin, $pluginSalesPrice) {
Wow! many thanks!
As I see, this is core files. So, override is not possible?

AH

A simple override is not possible.

But you could edit this file - and just reapply the change when you update VM

$costDisplay = '<span class="'.$this->_type.'_cost fee"> '.$fee.' '.$costDisplay."</span>";
Regards
A

Joomla 3.10.11
php 8.0