Support translation in BuyXGetY

Created on 24 June 2025, about 1 month ago

Problem:
If you use BuyXGetY promotion to auto add a product variation, this will always be added in the default language. This is especially relevant for the order item title as this is not a reference to the variation but directly a field on the order item.

Solution:
If you return $purchasable_entity->getTranslation($langcode) instead of $purchasable_entity in BuyXGetY::findSinglePurchasableEntity() this bug is fixed.

🐛 Bug report
Status

Active

Version

2.0

Component

Promotions

Created by

🇨🇭Switzerland milanbombschliip

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024