Post by bigkev890 » Sun Sep 26, 2010 9:45 pm

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?

Newbie

Posts

Joined
Sun Sep 26, 2010 9:42 pm

Post by bigkev890 » Mon Sep 27, 2010 7:20 am

Anyone that can help would be great. I can pay for a solution to this problem.

Newbie

Posts

Joined
Sun Sep 26, 2010 9:42 pm

Post by jty » Tue Sep 28, 2010 1:01 pm

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

Code: Select all

'weight'       => $product_query->row['weight'],
to

Code: Select all

'weight'       => $product_query->row['weight']+ 100,
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
bigkev890 wrote:I can pay for a solution to this problem.
It this solution works, feel free to drop some pennies into the OpenCart donation link. It's on the front page
About a million should be enough :laugh:

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by jty » Tue Sep 28, 2010 1:02 pm

Oh, I just thought of a better way to do this.
Just define your weights in weight based shipping to be 100g more or is it less.

eg if it's $10 for 500g, then make it $10 for 400g of weight

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am
Who is online

Users browsing this forum: No registered users and 6 guests