handleAutocomplete method return SKU only if variation is in english

Created on 18 November 2020, about 4 years ago
Updated 28 March 2024, 9 months ago

Hi !

Problem/Motivation

The "handleAutocomplete" method to retrieve variation list set the following condition :

$query->condition('cpv.langcode', 'en', 'LIKE');

But when website use another language no sku are retrieved. You can set manually the sku but a simple change on language management can resolve the problem.

Steps to reproduce

Create variation in another language than english and try to add stock from inventory management using sku autocomplete field.

Proposed resolution

Change the condition like this :

$query->condition('cpv.langcode', $this->languageManager()->getCurrentLanguage()->getId(), 'LIKE');
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland titouille

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024