USPS Shipping Module
Tare Weight - USPS Shipping Module
Tare Weight
My cart is not adding the Tare weight to the postage quotes. Is there something I need to change in this file to get it to?
-
DKarr
- Posts: 2
- Joined: Wed Aug 04, 2021 10:30 pm
- Phoenix Version:
- Contact:
Re: Tare Weight
You can edit the file:
includes/modules/shipping/zipusps.php
And change the calcWeight method to include SHIPPING_BOX_WEIGHT as follows:
includes/modules/shipping/zipusps.php
And change the calcWeight method to include SHIPPING_BOX_WEIGHT as follows:
Code: Select all
private function calcWeight() {
global $order;
$this->shipment_details['shipment'] ['weight'] = SHIPPING_BOX_WEIGHT;
foreach ( $order->products as $product ) {
$this->shipment_details['shipment'] ['weight'] += $product['qty'] * $product['weight'];
}
if (empty($this->shipment_details['shipment'] ['weight'])){
$this->shipment_details['shipment'] ['weight'] = SHIPPING_BOX_WEIGHT;
}
$this->shipment_details['shipment'] ['weight'] = round( $this->shipment_details['shipment'] ['weight'], 3 );
}zipurman
-----------
-----------
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Contact: