handleAutocomplete method return SKU only if variation is in english

Created on 18 November 2020, over 3 years ago
Updated 28 March 2024, 3 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.69.0 2024