Allow product variation (delta) sorting by SKU or label

Created on 21 October 2024, 2 months ago

Problem/Motivation

Product variations are managed in the "Variations" tab (product/X/variations) of their products. They can be sorted manually (delta) via drag & drop. Some products may have a larger amount of product variations.

In these cases, sorting them manually is heavy work. Typically - if you want to sort them - you'd want them to be shown in a logical order by default. In most situations it might be

  • SKU
  • Label
  • Price

It would be super helpful to have sorting functionality like in taxomomy terms, but for variations at (product/X/variations).

Maybe it would make sense to use JS to sort them instead of PHP, so the user has a smart helper in the frontend and can afterwards click "Save" to store it.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

3.0

Component

Product

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
  • 🇮🇱Israel jsacksick

    Your project might have different sorting requirements than any other site would need... I don't think we can build something generic here that suits everyone...
    You're free to use a contrib module like https://www.drupal.org/project/draggableviews and implement your own sorting logic... I don't believe this logic belongs to Commerce core.

  • 🇩🇪Germany Anybody Porta Westfalica

    Thanks for the rapid feedback @jsacksick!

    Yeah of course you can discuss that. I think the three values might match 95% of all commerce projects, but I'm unsure who of these need sorting for variations at all. If one day more people report their need here, we can reopen this.

    Note: The variations list within products is not a view. So this can't be solved using a views-based module. But it could surely be solved in commerce contrib.

    Thanks! :)

  • 🇮🇱Israel jsacksick

    This can be replaced by a view in your project is what I'm saying.. This isn't done in Commerce to not introduce another contrib dependency such as Draggable views.

Production build 0.71.5 2024