News:

Support the VirtueMart project and become a member

Main Menu

Trigger plugin

Started by pm4698, February 16, 2015, 12:54:54 PM

Previous topic - Next topic

pm4698

Hello there,

I use joomla 2.5.x and VM 2.6.10.

I use a 3rd-party-component in order to send VM e-mails (orders, change order status etc) in HTML format. In this component, they have VM tags (like name, shipping information etc) but i need to do something extra through PHP.

I need to check the weight of the order and if for example is below 10kg, then to echo a message.

I want to do it like this:

if($this->_psType == 'shipment'){
            $weight = !empty($cart->products) ? $this->getProductTotalWeight($cart->products) : 0.00;
            if($weight > 10.00){echo "Mytext";} else {echo "Another text";}


But it seems that is not working. Assume that i have added this code in the 3rd-party-component's file that is responsible in showing the information i need.

Somehow, it cannot catch the total weight of the order. I don't know maybe i have to include some library or do something else?

Any help appreciated

Thank you in advance