Hi, I have weight based shipping set up and working. It adds the weights of everything in the cart perfectly. However, I can not find anywhere to add the weight of the packaging itself to the total weight. Is there any way to do this? Everything I sell will be put into one package. The packaging and materials will always weigh 100g, so I need to add the 100g to the total product weight before calculating the shipping. My store is set to open today, is there anyone that can help me?
As your packaging is always 100g
Try this -
In system/library/cart.php
around line 126 in the area for $product_data[$key] = array(
Change
to
This is hard-coded and not the way to do things. But hey, if it works, it works. The proper way to do this is too hard.
Disclaimer: I haven't catered for weight class conversions
Also UNTESTED so backup before breaking anything
About a million should be enough
Try this -
In system/library/cart.php
around line 126 in the area for $product_data[$key] = array(
Change
Code: Select all
'weight' => $product_query->row['weight'],
Code: Select all
'weight' => $product_query->row['weight']+ 100,
Disclaimer: I haven't catered for weight class conversions
Also UNTESTED so backup before breaking anything
It this solution works, feel free to drop some pennies into the OpenCart donation link. It's on the front pagebigkev890 wrote:I can pay for a solution to this problem.
About a million should be enough

Who is online
Users browsing this forum: No registered users and 6 guests