Skip to content

Naming Conventions are Important

By default, Magento’s UPS module doesn’t report product dimensions to UPS for shipping calculations: a big problem when oversize products can result in a $50 large package fee, or even force a move to LTL.

Looking over the UPS.php file, I can see the following:


($r being the raw xml request object). Now, if you know a little bit about Magento programming, you might think that (if you’re lucky) you have access to a Product clas and can call you dimensional product attributes with $r->getProduct()->getLength() or (if you’re unlucky) that you at least have access to a product ID, or anything at all to do with a product, from which you can suss out the right class with a little digging.

You’d be wrong, though. $r->getProduct() actually contains…a string about the type of shipping and destination, in my test case “GNDRES” for GrouND Shipping to a RESidential address. So, why is it called ‘Product’, again?

Post a Comment

Your email is never published nor shared. Required fields are marked *