Jump to content

Adding Packaging Weight on Total Weight


Recommended Posts

I want to add a carton weight on top of total weight, I did this with PS 1.3 however it doesn't seems to work with PS1.4.8.

What I did was adding "+ 0.08" on getTotalWeight function inside order.php.

Can anyone give me a clue on what I did wrong? TIA, boy.

 

public function getTotalWeight()
{
 $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
 SELECT SUM(product_weight * product_quantity) weight
 FROM '._DB_PREFIX_.'order_detail
 WHERE id_order = '.(int)($this->id));
 return (float)($result['weight']) + 0.08;

Link to comment
Share on other sites

  • 3 years later...
×
×
  • Create New...