oc-shopaholic-plugin
oc-shopaholic-plugin copied to clipboard
[Orders for Shopaholic v1.22.1] Cart::onSetShippingType does not update cart data in database
\Lovata\OrdersShopaholic\Components\Cart::onSetShippingType
returns cart data with updated shipping type information, but it does not save the new shipping type id to the database.
Is this an expected behavior?
Hi! There is no logic to save selected shipping type. I think you're right, we need to add saving of selected shipping type to database. This is useful feature.
@kharanenka Thanks for your response.
On second thought, I decided not to send pull request adding feature to save selected shipping type.
Now I feel like Cart::onSetShippingType
is intentionally not saving it to the DB, because there is a generic Ajax method Cart::onSaveData
to save user's input including selected shipping type. It saves only properties specified in the sent data.
I'm sorry for disturbing you with this issue.
But, if you think onSetShippingType
should save it to DB, then I'll just send you my pull request for that.
I will come back to this issue later. I think I need to think hard. Thank you for your activity.