Order controller populate method should be able to handle multiple products #3973
seand7565
started this conversation in
New Features or Ideas
Replies: 3 comments 4 replies
-
Do you mean the orders controller, like the populate endpoint? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I agree, this is a valid point and seems a low-hanging fruit. Can you open an issue on the project for this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Speaking of the populate action… what about also moving the quantity check out of the controller into order-content, and bound it to a preference for the maximum number of items that can be added at once? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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 acceptparams[:variants]
instead ofparams[:variant]
andparams[:quantity]
. But it adds a lot of flexibility to the controller, and it's definitely on my wishlist for the platform. What do you all think?Beta Was this translation helpful? Give feedback.
All reactions