I have a custom plugin in which I have a controller action which I want to validate some values and then update a custom field on the Cart
.
I can get the values from the form and validate them, I'm just missing how to get them saved to the Cart
.
I've tried the following:
$this->cart->setRawPostContent('orderShippingOptions', $myValue);
$this->cart->setContentFromPost('fields');
And also just:
$this->cart->setContentFromPost(['orderShippingOptions' => $myValue]);
I'm feel like I'm in the right area, I'm just missing something simple.
Any help gratefully received.