mehdi2405 Posted July 12, 2012 Share Posted July 12, 2012 Hello at the request of one of my clients I need to change the delivery of benefits 1.4.5 I have to add the volume of parcels and so I used a variable that did not use (variable width) I manage to recover the variable and display it on the bl by cons I would make the sum so I create a function on the file classes / order.php: public function getTotalWidth() { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT SUM(product_width * product_quantity) FROM '._DB_PREFIX_.'order_detail WHERE id_order = '.(int)($this->id)); return (float)($result['width']); } and added this in the file classes / pdf.php: $pdf->Cell(70, 6, self::l('Volume total : ').' '.(' '.round($order->getTotalWidth(),3).'m3'), 'LRB'); During generation of wheat, volumes appareissent well on each product but not the sum can you please help me Thank you in advance Link to comment Share on other sites More sharing options...
mehdi2405 Posted July 16, 2012 Author Share Posted July 16, 2012 up Link to comment Share on other sites More sharing options...
bied Posted July 16, 2012 Share Posted July 16, 2012 yes,i agree with you . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now