Guest Posted January 17, 2004 Share Posted January 17, 2004 I'm trying to figure out how OScommerce is deciding what is considered a "larger package" in the admin I can change the percent of increase for these "larger packages" but I dont know how to change what is considered larger. I've searched the forums and seen the question asked before but I found no answers. Anyone know? Thanks, Chris Falco Blue Moon Bikes Link to comment Share on other sites More sharing options...
Dave_in_the_UK Posted January 17, 2004 Share Posted January 17, 2004 Yes I've been wanting to know that too. <_< I've had a rummage around and I've found the offending piece of code. I think the problem lies in the text "Larger packages - percentage increase" ... it doesn't mean what we all think it means!! :huh: The code that uses this is the "quote()" function in includes/classes/shipping.php line 54: if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); } From the 'configuration' table in the database: SHIPPING_BOX_WEIGHT = "Package tare weight" SHIPPING_BOX_PADDING = "Larger packages - percentage increase" What this is saying, in English(!), is : - if the "package tare weight" is > "total weight of goods" * "larger packages percentage" then add the "package tare weight" to "total weight of goods"... otherwise add "larger packages percentage" to "total weight of goods". Thus the "larger packages percentage" is applied in ALL cases - and it is a percentage of the "goods weight" NOT the packaging weight. I'm not sure how useful this is. Let's say I send goods weighting 450g with a package weight (tare weight) of 50g and a "larger packages percentage" of 10%. In this case the package weight of 50g will be used. I then send goods weighing 750g with a package weight (tare weight) of 50g and a "larger packages percentage" of 10%. In this case 75g will be added for packaging. Hmmm... it assumes that the packaging weight correlates to the weight of the goods. I suppose that IS valid is some cases...? Not true in my case though; over 500g my real package weight ("tare weight") doubles and is not otherwise linked to the weight of goods. E.g. tare weight is 100g for 600g parcel and it is still 100g for a 1.5kg parcel. HTH Dave Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.