Add a variations table display with the variations attributes and add to cart (as submodule)

Created on 13 September 2023, 10 months ago
Updated 27 October 2023, 8 months ago

Problem/Motivation

This isn't a request for the maintainer to solve, just an idea we *might* follow in the future or not.

Complex variations (e.g. technical products) often need to be compared by their technical details. When visiting the parent product page, in those cases you'd like to have a table with the attributes and in the last column then the add to cart button...

While this might also be custom solved by creating a custom product variation view and ✨ Provide views integration (add to cart form) Active it might be a huge benefit to have this basic functionality as submodule of this module. I guess without this module, it won't work at all.
Another alternative would be to create a separate commerce_variations_table module or something like that with a dependency here.

So for now this is a discussion issue.

Steps to reproduce

Proposed resolution

Possible alternatives or starting points:

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    I dunno. This module operates at the single variation entity level, and I would like it to stay that way. It really does sound like a job for views.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks for the feedback @John, I agree that's a valid point. That means, we should better create a separate module for that.

    Still ✨ Provide views integration (add to cart form) Active would help then.
    Can we leave this issue open to document the need and ideas, until someone (or me) creates that separate module?

  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    Is there any reason you can't add a views field of "rendered entity" in your view that compares variations, and set that to use a view mode that only displays the add to cart form?

    You can't use the rewrite option on that field (it will strip form tags), but otherwise it should work.

  • Status changed to Closed: works as designed 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    I'm closing this. The solution I recommend is to build the comparison view you need, and add a rendered entity field to display the add-to-cart form for each row.

    The requirements for the comparison view will be different for every site depending on the product variation fields and attributes, so I don't feel it is a good candidate for a generic solution. Existing tools should be sufficient to build what you need.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Hi @John Pitcairn yes thanks, totally fine! I had this task on my list and still have. But your points are correct and even if we build something like that, I can do that in contrib. I'll let you know then.

    Thanks for the conversation and your feedback! :)

Production build 0.69.0 2024