1

Lately, I've been having issues getting exact shipping values as we don't have consistent packing to calculate into our shipping cost.

As such I'm going to increase the total order weight by 30% prior to the shipping getting calculated.

Unfortunately I really can't find a good spot to put this calculation in, I've tried a few different files along the way and they don't seem to cover both the shipping quotation at cart stage and the final shipping cost.

Could someone possibly point me in the direction of where i could put the calculation in to globally increase order weight prior to any shipping prices being fetched.

Thanks

1

In this method: Mage_Sales_Model_Quote_Item::setProduct(), the weight is set from the product to the quote item. Maybe this is a good place to increase it.
I mean, turn this line:

->setWeight($this->getProduct()->getWeight())

Into

->setWeight(1.3 * $this->getProduct()->getWeight())

Of course , don't edit the core. Override the method.
Or you can use the event sales_quote_item_set_product called in the same method to change the weight.

Both the methods described above should work, but I would just increase all the product weights in the DB, by 30% to let the Magento price calculation flow as it is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.