Fixed Code According To Test Case
This commit is contained in:
parent
9cbabe1a8b
commit
c956389251
|
|
@ -886,6 +886,8 @@ class Cart
|
|||
*/
|
||||
public function prepareDataForOrderItem($data): array
|
||||
{
|
||||
$locale = ['locale' => core()->getCurrentLocale()->code];
|
||||
|
||||
$finalData = [
|
||||
'product' => $this->productRepository->find($data['product_id']),
|
||||
'sku' => $data['sku'],
|
||||
|
|
@ -904,7 +906,7 @@ class Cart
|
|||
'discount_percent' => $data['discount_percent'],
|
||||
'discount_amount' => $data['discount_amount'],
|
||||
'base_discount_amount' => $data['base_discount_amount'],
|
||||
'additional' => array_merge($data['additional'], ['locale' => core()->getCurrentLocale()->code]),
|
||||
'additional' => is_array($data['additional']) ? array_merge($data['additional'], $locale) : $locale,
|
||||
];
|
||||
|
||||
if (isset($data['children']) && $data['children']) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue