Issue
I am looking for a snippet that will give me the length, width, and height of the packaging to ship the items currently in the cart.
I am creating a shipping rates module and this is the last piece of the puzzle.
Any information is greatly appreciated!
Jeff
Solution
Take a look @ Create Shipping Method Module
In collectRates(Mage_Shipping_Model_Rate_Request $request)
you can get all items using
$request->getAllItems()
See /app/code/core/Mage/Shipping/Model/Rate/Request.php
So you could Loop through each item to get their dimension
foreach($request->getAllItems() as $item){
//do you logic per item
$item->getLength();
$item->getWidth();
$item->getHeight();
}
Answered By - MagePal Extensions Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.