s22_tech Moderator Nuo United States Narys nuo spal. 2019 s22_tech 5 gruod. 2020 02:19 Usually, lc_orders_items.options contains a:0:{} when there are no options. But sometimes it contains: s:0:""; What could cause the difference?
tim Founder Nuo Sweden Narys nuo geg. 2013 tim 5 gruod. 2020 04:57 These are both PHP serialized variables. One says an empty array, the other an empty string. That is what was set to the order item option.
s22_tech Moderator Nuo United States Narys nuo spal. 2019 s22_tech 5 gruod. 2020 16:36 But what would cause the difference? In both cases there are no options on the products ordered.
tim Founder Nuo Sweden Narys nuo geg. 2013 tim 5 gruod. 2020 23:09 To answer that I would need to reverse engineer all code that sets items in the order entity. Is this a problem?
s22_tech Moderator Nuo United States Narys nuo spal. 2019 s22_tech 5 gruod. 2020 23:18 No, not for LiteCart. It was when I first imported it into my FileMaker db, but I worked around it. I was just curious as to why there should be a difference. It just seems that if a product has no options, the value of that field should always be the same.
tim Founder Nuo Sweden Narys nuo geg. 2013 tim 6 gruod. 2020 00:20 Here is a fix: https://github.com/litecart/litecart/commit/b76bd2e4f685ccb3976a3462cca792ec1dbc5ac4 I am migrating serialized PHP variables into JSON with the release of 2.3.
s22_tech Moderator Nuo United States Narys nuo spal. 2019 s22_tech 6 gruod. 2020 01:58 Here is a fix: Nice fix! I keep forgetting that isset() and !empty() return different results. :\ I am migrating serialized PHP variables into JSON with the release of 2.3. That sounds like a good choice. Besides options, what other fields (pertaining to orders) will be affected by this change? I'll need to update those calcs in my FileMaker db, as well.
tim Founder Nuo Sweden Narys nuo geg. 2013 tim 6 gruod. 2020 03:30 You will be able to tell by the upgrade patches once the day come.