Update options on updateCart
After some testing, it seems it's not possible to update options on updateCart method. I'm testing with your simple example:
<form method="POST">
<input type="hidden" name="action" value="multiAdd/updateCart">
<input type="hidden" name="redirect" value="/cart">
{{ getCsrfInput() }}
{% for item in cart.lineItems %}
<input type="text" size="4" name="items[{{ item.id }}][qty]" value="{{ item.qty }}">
<input type="text" size="4" name="items[{{ item.id }}][options][giftWrap]" value="{{ item.options.giftWrap }}">
{% endfor %}
<button type="submit">Update Cart</button>
</form>
Quantities update fine, but options remain unchanged.
@engram-design Yeah think you missed the other stuff here maybe - https://github.com/engram-design/MultiAdd/blob/master/multiadd/controllers/MultiAddController.php#L119 ? Seems to only do qty.
I don't use this one so no quick way to test any fix, would you mind fleshing it out?
We're also a bit behind on releases here...maybe I will do one after you do the above - I've been using the changed db stuff on production for ages now, no issues so that's good to go
@bossanova808 Will advise shortly.
Any progress? Would be good to get the latest chages out as they do seem to fix the potential race condition in multi-add
Yes, an update or progress would be greatly appreciated. Will there be a fix for this in the near-ish future?
Added in the latest master.
Appreciate the plugin—seems like this update came just in the nick of time for me. Just wanted to point out that the updateCart action doesn't check for AJAX to respond with JSON.
I'm not sure on Josh but I'm very busy right now - but it would be easy enough for you to PR @wfifer if you just crib the ajax approach from the add function immediately above the update function....
@wfifer We'll sort that out in the next few days.
@engram-design bump fella :)