Post by dazzul » Fri Jun 30, 2017 2:25 am

Hello,
Have found solutions for 1.5.6.4 however I can't find them for 2.3.0.2.

I would like to somehow start the weight of the shopping cart at 30g before any products are added.
As my packing boxes are 27g each.
I want to give an accurate shipping price as possible.

Thanks in advance.

New member

Posts

Joined
Mon Feb 10, 2014 3:42 am

Post by Johnathan » Fri Jun 30, 2017 4:32 am

As long as your shipping method uses $this->cart->getWeight() to get the weight of the cart, you should be able to make an edit like this:

Code: Select all

IN:
/system/library/cart.php or /system/library/cart/cart.php

REPLACE:
$weight = 0;

WITH:
$weight = 30;

Note: that assumes your default weight class is grams, so if it's not, you should convert the 30 value appropriately.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by dazzul » Thu Jan 18, 2018 7:57 am

Sorry for the delayed thank you!

But this did work a treat so thanks :D

New member

Posts

Joined
Mon Feb 10, 2014 3:42 am
Who is online

Users browsing this forum: No registered users and 222 guests