- 🇮🇹Italy finex
I've the following use case: a bookstore where every product (book) has two variations: the physical paper book and the digital ePub version.
The product title is the book title, to keep the variation select field compact, the variation titles are: "paper book" and "digital download".When the user add the product to the cart, the variation title is shown, this is not a problem during the checkout because I'm able to change the views in order to also display the product title.
What I'm trying to solve now is to do the same on the order details page (both backend and frontend) and in the receipt email.
The problem could be easily solved updating the commerce_order_item table with a concatenation of the product and the variation title.
Now I can join the order item data with the product, but if the product title is changed or the product is deleted, I loose the information.
How should I resolve this issue?
- 🇩🇪Germany Anybody Porta Westfalica
Yeah we just ran into EXACTLY the same discussion, so we can confirm this is Major ;)
We'll discuss this internally and try to contribute...What dies the Centarro team think about this?
- 🇩🇪Germany Anybody Porta Westfalica
Okay I read through the points in the issue summary now and also the comments. Some comments seem to address related, but different problems, as it seems to me. I really like the plan from the issue summary, but would suggest to eventually split some of them into separate issues, especially (5) and (6) from "proposed changes"?
Maybe it would make sense to create a META issue or make this one a meta issue? (I think better a new one with less noise)
Regarding ✨ Do not require a 'title' field Needs work I don't really like the idea to not have labels per product variation and I'd say that's a related topic, but an edge-case, while having a better visible bottom-up relation from product variation title to product title is a logical important thing.
What I'd also like a lot would be to simply have field formatters for the title, so you could simply select:
- "Short title"
- "Full title"
- "Product title"
- "Token"
- ...=
and easily extend this by custom field formatters!
But that might depend on ✨ [META] Expose Title and other base fields in Manage Display Active .So how should we proceed? Any chance to first get some Centarro feedback here to push this into the direction they like?
- 🇮🇱Israel jsacksick
So how should we proceed? Any chance to first get some Centarro feedback here to push this into the direction they like
Honestly, this wasn't really on my radar, this issue was initially opened 5 years ago and afaik, this never was a major concern on any of the projects I've been working on.
I had that one on my radar instead 🐛 Auto generated product variation title does not change when product title changes Needs review .
This late in the project lifecycle, this should target 3.x. - 🇮🇱Israel jsacksick
@Anybody: Could you elaborate on the pain points you're currently experiencing? Are there no way to work around those?
- 🇩🇪Germany Anybody Porta Westfalica
@jsacksick thanks! The issue summary already points out the things we experienced very well.
The final thing that lead me here, is the slight visibility of the parent product in the product variation CRUD forms. (e.g. /product/43/variations/9/edit)
Product variations have a very strong relation to their parent products (can not exist without), but working on such a form you feel to be "somewhere".The same happens to us in other places where product variations are shown, especially in the admin backend. As a workaround you can prefix all product variations with the product name, but that leads to other issues.
So all in all we came to the same conclusions suggested in the issue summary to be able to bring the product variations closer to their parent product con(textually) all over the projects.
And yes of course there are workarounds, but it seems to us that this is a conceptual thing that should be improved in general and we're willing to help, as it would help us and our clients.
- 🇮🇱Israel jsacksick
My concern is that, I certainly wouldn't expect changes (as a merchant) around how the title is handled for variations if I'm already running a live cycle, which is why I feel it is too late to change anything in Commerce 2 at this point.
Regarding:
The final thing that lead me here, is the slight visibility of the parent product in the product variation CRUD forms. (e.g. /product/43/variations/9/edit)
This is relatively easy to fix, by altering the route and specifying a different title callback. I'm guessing for some merchants, it might actually make sense to output the SKU in there too?
Also, the product title is visible in the breadcrumb.
Additionally, for a variation type that opts in to automatically generate variation titles, without actual attributes, the parent product title is going to be used. - 🇩🇪Germany Anybody Porta Westfalica
Thanks @jsacksick yes it should definitely be backwards-compatible.
This is relatively easy to fix, by altering the route and specifying a different title callback. I'm guessing for some merchants, it might actually make sense to output the SKU in there too?
Would you accept this in Commerce Core or does it have to be solved in contrib?
For the other points, can you tell which of the proposed changes from the IS you would accept for Commerce 2 and which could be considered for Commerce 3 future?
We'd then create a META issue, split the proposed points into subissues and start working on them where it makes sense based on your decision.
In general my late hope is that one day you'll perhaps see the points yourself, at least partially, so we can revive it ;) I don't think I'll be able to convince you that most of this makes a lot of sense, if you don't run into this yourself :P
And yes, Commerce 3 would be fine for the large parts, as I think this is a conceptual thing. And of course especially for breaking changes! - 🇮🇱Israel jsacksick
Just to clarify, I don't disagree that there are things that can and should be improved. But changing this now will lead to other issues and other people complaining that it doesn't work like the way it used to be, that's all I'm saying...
It's hard to find the right behavior that'd satisfy everyone here... Depending on the business and what's being sold (digital vs physical etc)...
- 🇩🇪Germany Anybody Porta Westfalica
Thanks, yes totally with you! :)
We just need a direction to go, so we don't waste valuable time. So let's wait for your and your teams feedback! Thanks!! - 🇩🇪Germany Anybody Porta Westfalica
FYI: I've started a (yet simple) contrib module to implement possible improvements to the product variation label / title.
https://www.drupal.org/project/commerce_better_product_variation_label →We can of course implement different strategies, for example as submodules, as a first step to resolve this in contrib, before it gets (partially) moved into Commerce possible.
If anyone is interested to help or become Co-maintainer, contact me!