How can I show order_weight in invoice?
Thanks!
http://forum.virtuemart.net/index.php?topic=79799.0
http://forum.virtuemart.net/index.php?topic=104795.0
Sorry, VirtueMart 2.6.14... but v.3 is don't have this too.
You should update at least to vm2.6.22. This should work without any trouble. The update to vm3 is also not a big deal as long you stay with joomla 2.5
Thank you, but right now I try to find solution for showing order weight on Invoice.
There is as far as I know, no native method in vm2
But it shows in order edit, on the bottom of page! In delivery table. How I can show it in invoice?
That is part of your delivery table and depends on your shipment plugin.
Im developing a plugin to generate a file with the order shipping details. So then i can use this file to upload it on the shipping company website, and avoid copying manually all the shipping details.
I need to specify the order weight, but i cant find it in getMyOrderDetails(). Instead there i could find each product weight alone. So i go through all the items in the order adding each product weight. Is this the best approach to do it?
$orderDetails = $orderModel->getMyOrderDetails($id);
foreach($orderDetails['items'] as $item){
if(!empty($item->product_weight)){
$qty = (int)$item->product_quantity;
$weight = (int)$item->product_weight;
//weight in grams
if($item->product_weight_uom == "G"){
$total_weight = $total_weight + ($weight * $qty);
}
//weight in kilos
elseif($item->product_weight_uom == "Kg"){
$total_weight = $total_weight + (($weight * 1000) * $qty);
}
}
}
Thanks
There is no weight for packaging, You have to add to function
Martyn
Yes - there is no weight stored in the order item table or the total order header
Therefore you have to get the current item weight and do the calculation yourself when an order is loaded
As showed before, ive already done the coding, and its working fine.
But woudnt it be grate if VM already had a function to retrieve the order weight?
QuoteBut woudnt it be grate if VM already had a function to retrieve the order weight?
ok, - again :)
You don't have setup for weight of packaging for order. This weight I have to send to shipping company and show in cart nad order summary, because sometime order has another price for shipping, then we added custom code for shipping plugin and change calculation in cart.
Rudolf