Order controller populate method should be able to handle multiple variants #4574
seand7565
started this conversation in
New Features or Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think there are a lot of circumstances where it's desirable for the order controller to be able to accept multiple variants. For instance, if I sell selectable "add-ons" or extras on a product page, that are separate products, I'd want to be able to add both the initial product and the add-on product to the cart at the same time, if it's selected.
I've made this change in other stores, and it's a pretty small one - order_controller just needs to be able to accept params[:variants] instead of params[:variant] and params[:quantity], then do the same action it's doing now, just looping over params[:variants]. Lots of people have custom frontends, so we'll need to deprecate this carefully, but it's a small change and introduces a lot of flexibility.
Beta Was this translation helpful? Give feedback.
All reactions