File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Block/Adminhtml/Sales/Order/Items
Model/Sales/Order/Pdf/Items Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,11 @@ public function getOrderOptions($item = null)
179
179
180
180
public function getOrderItem ()
181
181
{
182
- if ($ this ->getItem () instanceof Mage_Sales_Order_Item) {
182
+ if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Invoice_Item) {
183
+ return $ this ->getItem ();
184
+ } else if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Shipment_Item) {
185
+ return $ this ->getItem ();
186
+ } else if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Creditmemo_Item) {
183
187
return $ this ->getItem ();
184
188
} else {
185
189
return $ this ->getItem ()->getOrderItem ();
Original file line number Diff line number Diff line change @@ -233,7 +233,11 @@ public function getOrderOptions($item = null)
233
233
*/
234
234
public function getOrderItem ()
235
235
{
236
- if ($ this ->getItem () instanceof Mage_Sales_Order_Item) {
236
+ if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Invoice_Item) {
237
+ return $ this ->getItem ();
238
+ } else if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Shipment_Item) {
239
+ return $ this ->getItem ();
240
+ } else if ($ this ->getItem () instanceof Mage_Sales_Model_Order_Creditmemo_Item) {
237
241
return $ this ->getItem ();
238
242
} else {
239
243
return $ this ->getItem ()->getOrderItem ();
Original file line number Diff line number Diff line change @@ -1032,15 +1032,15 @@ public function getTotals()
1032
1032
/**
1033
1033
* Add total data or model
1034
1034
*
1035
- * @param Mage_Sales_Model_Quote_Total |array $total
1035
+ * @param Mage_Sales_Model_Quote_Address_Total |array $total
1036
1036
* @return Mage_Sales_Model_Quote_Address
1037
1037
*/
1038
1038
public function addTotal ($ total )
1039
1039
{
1040
1040
if (is_array ($ total )) {
1041
1041
$ totalInstance = Mage::getModel ('sales/quote_address_total ' )
1042
1042
->setData ($ total );
1043
- } elseif ($ total instanceof Mage_Sales_Model_Quote_Total ) {
1043
+ } elseif ($ total instanceof Mage_Sales_Model_Quote_Address_Total ) {
1044
1044
$ totalInstance = $ total ;
1045
1045
}
1046
1046
$ totalInstance ->setAddress ($ this );
You can’t perform that action at this time.
0 commit comments