Merge pull request #2894 from shubhwebkul/master

Issue #2875 resolved
This commit is contained in:
Jitendra Singh 2020-04-15 18:55:20 +05:30 committed by GitHub
commit cce548f2cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -110,12 +110,14 @@ class Helper extends Review
foreach ($orderItems as $key => $orderItem) {
$products[] = $orderItem->product;
$this->orderBrandsRepository->create([
'order_item_id' => $orderItem->id,
'order_id' => $orderItem->order_id,
'product_id' => $orderItem->product_id,
'brand' => $products[$key]->brand,
]);
try {
$this->orderBrandsRepository->create([
'order_item_id' => $orderItem->id,
'order_id' => $orderItem->order_id,
'product_id' => $orderItem->product_id,
'brand' => $products[$key]->brand,
]);
} catch(\Exception $exception) {}
}
}