Describe your bug or feature request.

Table on the page with product variations contains untranslatable machine name of product variation type.

If a bug, provide steps to reproduce it from a clean install.

Enable module commerce_product. Add a product and a product variation. Open page with list of product variations (/product/{product_id}/variations)

Solution

It would be better to display label of product variation type instead of their machine name because the label is translatable and the label can be clearer for users who do not configure site but manage products on the site.

CommentFileSizeAuthor
#5 3335429-5.patch3.69 KBjsacksick

Issue fork commerce-3335429

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergei_brill created an issue. See original summary.

sergei_brill’s picture

Status: Active » Needs review
jsacksick’s picture

Status: Needs review » Needs work

@sergei_brill: Kinda tricky to modify the constructor arguments like this, but well, that should only be a problem for people extending the list builder.

Instead of having a $productVariationTypeStorage, let's just inject/use the entity type manager in case we need to get a different storage later too.

jsacksick’s picture

Status: Needs work » Needs review
StatusFileSize
new3.69 KB
jsacksick’s picture

Status: Needs review » Fixed

Committed, thank you!

sergei_brill’s picture

@jsacksick Good note about the backward compatibility. But you made release with this issue so fast so, I couldn't fix it in time :)
Just in case you want to keep \Drupal\commerce_product\ProductVariationListBuilder compatible with previous versions of commerce 2, there is one more MR.
PS Commit it to 8.x-2.x only, 3.0.x may have BC breaks, I think.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.