Jump to content

Adding packaging weight


zandrauppzala

Recommended Posts

Hi everyone,
As per this thread, we've always added 125g packaging weight:
http://www.prestashop.com/forums/topic/75866-solvedhow-to-add-packaging-weight/
 
We have now upgraded to 1.6 - could someone please confirm that this is the correct way of doing it also in 1.6, so that it isn't causing any issues. 
 
 /classes/cart.php
 
self::$_totalWeight[$this->id] = round((float)$weight_product_with_attribute +(float)$weight_product_without_attribute, 3);
self::$_totalWeight[$this->id] += 125;
 
/classes/oder/order.php
 
public function getTotalWeight()
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT SUM(product_weight * product_quantity)
FROM '._DB_PREFIX_.'order_detail
WHERE id_order = '.(int)($this->id));
return 125 + (float)($result);
 
 
Thanks so much.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...