Timeline for How to unserialize data from Sales_Flat_Order_Payment (additional_information) column to display in custom Grid?
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2013 at 9:08 | comment | added | user1704524 | let us continue this discussion in chat | |
Dec 27, 2013 at 1:27 | comment | added | mprototype | shoot me an email w/ your skype handle | |
Dec 26, 2013 at 23:22 | comment | added | user1704524 | Thankyou, I really appreciate your patients... See my edit. I am still getting an empty "Array" in my Grid | |
Dec 26, 2013 at 23:04 | comment | added | mprototype | if($order){ then the foreach, and replace $row->getPayment()->getId() with $order->getPayment()->getId() | |
Dec 26, 2013 at 23:03 | comment | added | mprototype | $order = Mage::getModel('sales/order')->load($row->getId()); | |
Dec 26, 2013 at 23:03 | comment | added | mprototype | Ah so... getPayment should work on the sales order model... it sounds like maybe some of your rows aren't of this class possibly... alternatively you can try: | |
Dec 26, 2013 at 22:30 | comment | added | user1704524 |
echo get_class($row); returns Mage_Sales_Model_Order
|
|
Dec 26, 2013 at 22:08 | comment | added | mprototype | Can you please tell me what get_class($row) returns | |
Dec 26, 2013 at 22:07 | comment | added | user1704524 |
Error, Fatal error: Call to a member function getPayment() on a non-object in
|
|
Dec 26, 2013 at 22:00 | comment | added | mprototype | $payments = Mage::getModel('sales/order_payment_transaction')->getCollection() ->addPaymentIdFilter($row->getPayment()->getId()); foreach ($payments as $itme) { $addInfo = $item->getAdditionalInformation()); $value = $addInfo; } return $value; // or some part of value's contents | |
Dec 26, 2013 at 21:52 | comment | added | user1704524 | I'm not sure I understand exactly what you mean??? | |
Dec 26, 2013 at 20:59 | comment | added | mprototype | You're on the right track... since the data doesn't seem to be loading... can you use the second code block I provided in the render function and replace the return value with what you get from $addInfo variable in my block of code. | |
Dec 26, 2013 at 13:23 | comment | added | user1704524 | Yes I believe you are correct, I need to unserialze the data to show in an array... please see my edits! | |
Dec 24, 2013 at 19:07 | comment | added | mprototype | basically you would take the hash and assign the return of unserialize($hash) to a variable... | |
Dec 24, 2013 at 19:06 | comment | added | mprototype | additionally if this doesn't give you an appropriate array (which it should)... I will come back and explain how to use php to convert that hash into an object or array... | |
Dec 24, 2013 at 19:00 | history | edited | mprototype | CC BY-SA 3.0 |
added 429 characters in body
|
Dec 24, 2013 at 18:56 | comment | added | mprototype | Show the output of the above code please... Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info... calling getAdditionalInformation is supposed to format the information as an array. | |
Dec 24, 2013 at 18:50 | comment | added | user1704524 | thanks for your post and advice, the problem I have it the values stored in the additional_information table is sent back in a hash so its difficult to format into separate fields since it contains "Card Brand", "Last4", "PayPal_ID" etc... | |
Dec 24, 2013 at 18:08 | review | Low quality posts | |||
Dec 24, 2013 at 19:01 | |||||
Dec 24, 2013 at 17:52 | comment | added | mprototype | Additionally, you can make the information filterable by using the Admin Grid block and modifying it appropriately as well as formatting the data how you need it so it plays nice with filtering. | |
Dec 24, 2013 at 17:51 | history | answered | mprototype | CC BY-SA 3.0 |