Re: display the total weight on the view cart page
I also used this mod. Thank you, lookformeb.
I use grams for shipping, and the problem I have is that there is several decimal places. This is a little bit of overkill.
Is there a way to round to a whole number?
I modified my shipping.php file slightly to add 15% to the weight total, to allow for packing materials.
Here is what it looks like, in case this is where I have to modify for rounding:
$total_weight = 0;
foreach ($products as $product) {
if (@$product["deleted"]) continue; # for Advanced_Order_Management module
if (
($product["free_shipping"] == "Y" && ($config['Shipping']['free_shipping_weight_select'] != 'Y' || ($config['Shipping']['free_shipping_weight_select'] == 'Y' && !$ignore_freight))) ||
($active_modules["Egoods"] && $product["distribution"] != "") ||
(!$ignore_freight && $config["Shipping"]["replace_shipping_with_freight"] == "Y" && $product["shipping_freight"] > 0)
) {
continue;
}
$total_weight += $product["weight"] * $product["amount"];
}
$total_weight *= 1.15;
return $total_weight;
__________________
4.1.11
Rob Dolliver
www.jessicasonline.com
Xcart Skin - Fashion Mosaic
X-Cart 4 Level Horizonal Flyout Menus
alteredCart One Page Checkout
alteredCart Buy Together
CDSEO
|