Skip to content
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

Update options on updateCart #11

Open
skogendev opened this issue Jun 13, 2017 · 10 comments
Open

Update options on updateCart #11

skogendev opened this issue Jun 13, 2017 · 10 comments

Comments

@skogendev
Copy link

skogendev commented Jun 13, 2017

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.

@bossanova808
Copy link
Collaborator

@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?

@bossanova808
Copy link
Collaborator

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

@engram-design
Copy link
Member

@bossanova808 Will advise shortly.

@bossanova808
Copy link
Collaborator

Any progress? Would be good to get the latest chages out as they do seem to fix the potential race condition in multi-add

@skogendev
Copy link
Author

skogendev commented Jul 3, 2017

Yes, an update or progress would be greatly appreciated. Will there be a fix for this in the near-ish future?

@engram-design
Copy link
Member

Added in the latest master.

@wfifer
Copy link

wfifer commented Jul 7, 2017

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.

@bossanova808
Copy link
Collaborator

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....

@engram-design
Copy link
Member

@wfifer We'll sort that out in the next few days.

@bossanova808
Copy link
Collaborator

@engram-design bump fella :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants