VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: d0ublezer0 on November 13, 2017, 07:29:16 AM

Title: plugin vmshipmet weight_countries template override
Post by: d0ublezer0 on November 13, 2017, 07:29:16 AM
How to override this plugin?
i dont need this:
(https://image.prntscr.com/image/uHMOJOVQSNiJFc4cKiL1oQ.png)
Override instruction not work for this plugin:
https://docs.virtuemart.net/tutorials/templating-layouts/101-how-to-overwrite-plugins.html
Title: Re: plugin vmshipmet weight_countries template override
Post by: d0ublezer0 on November 13, 2017, 12:24:13 PM
He surrounds the text with parentheses and adds a plus sign.
Title: Re: plugin vmshipmet weight_countries template override
Post by: d0ublezer0 on November 13, 2017, 13:48:53 PM
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.
Title: Re: plugin vmshipmet weight_countries template override
Post by: d0ublezer0 on November 14, 2017, 07:47:16 AM
Anyone? Please answer if you know:
Which code generates this and transfers to vmshipment plugin?:
<span class="vmshipment_cost fee"> ( +3 000 р)</span>
Title: Re: plugin vmshipmet weight_countries template override
Post by: 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) {
Title: Re: plugin vmshipmet weight_countries template override
Post by: d0ublezer0 on November 14, 2017, 12:21:57 PM
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?
Title: Re: plugin vmshipmet weight_countries template override
Post by: AH on November 14, 2017, 14:53:01 PM
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>";