-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable product custom options not visible in order summary after order status change #5686
Comments
@ToshiroMifune thank you for your report. |
Actual problem is in Order Item Model, It serializes the product_options column data in sales_order_item table every time it saves so the array becomes string next time and Block fails in rendering it. I created a small snippet to convert the additionally serialized data to serialized array info only for the existing orders, waiting for the fix. |
@amansrivastava I've noticed this issue as well. Would you be able to share what you did to address the issue? |
I'll share it shortly. Currently I don't have it with me. |
@joshuafredrickson, this might not be pretty but it was quick and fast with the expectation that this will be fixed on the next update, thus no need to go through the hassle of doing an override. (ie. this modifies core code). On Magento/Sales/Model/Order/Item.php in getProductOptions() Change return is_string($data) ? unserialize($data) : $data; To: return is_string($data) ? ( is_string(unserialize($data)) ? unserialize(unserialize($data)) : $data ) : $data; I'm basically just checking if the unserialized data is still a string or not and if so, unserialize it again. I know this is a very dirty way of doing this, but it's fast and there's bigger fish to fry :) It doesn't change the fact that the re-serialized data remains in the database though so whenever the fix is rolled out in Magento's core, a quick update of the product_options field in sales_order_item will be required. |
@tigerx7 I love it! ;) 👍 I actually had to unserialize it one more time for it to work on my end. Hopefully this issue will get a proper fix from Magento shortly, but this'll keep business moving along in the interim. |
@joshuafredrickson I ran into the same issue on some of the order items. Not sure what the correlation is since the number of re-serializations varied from once to several times. Whichever the case, I've updated my dirty code to reflect those situations: while (is_string($data)){
$data = unserialize($data);
}
return $data; |
Need help for solve this similar issue: Product custom options is missing in order confirmation mail, just recive correctly product name without selected custom options during checkout. |
@ToshiroMifune, thank you for your report. |
Hi,
There is one configurable product in our shop, which has two extra paid custom options set.
Just after payment we can see the custom options for this product in order summary (status Pending payment).
When status of the order changes (to cancel, processing, complete etc), the custom options disappear.
It does not matter if status change is initialized by hand or as a result of payment confirmation.
I understand that it can be expected result when the order is cancelled, but not for other status changes. After all we need those informations to process the order.
Magento ver. 2.0.7
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: