From e83917a2e62bab778fcaee6c203e9ac483b0f71f Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Tue, 31 Mar 2020 14:50:54 +0200 Subject: [PATCH] attempt to fake 4 instead of 2 decimals in price --- packages/Webkul/Core/src/Helpers/Laravel5Helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index 84c2230d5..efd6a4480 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -210,7 +210,7 @@ class Laravel5Helper extends Laravel5 $I->createAttributeValues($product->id, $configs['attributeValues'] ?? []); - $I->createInventory($product->id, $configs['productInventory']); + $I->createInventory($product->id, $configs['productInventory'] ?? []); return $product->refresh(); } @@ -227,7 +227,7 @@ class Laravel5Helper extends Laravel5 $I->createAttributeValues($product->id, $configs['attributeValues'] ?? []); - $I->createInventory($product->id, $configs['productInventory']); + $I->createInventory($product->id, $configs['productInventory'] ?? []); return $product->refresh(); } @@ -311,7 +311,7 @@ class Laravel5Helper extends Laravel5 'special_price_from' => null, 'special_price_to' => null, 'special_price' => null, - 'price' => $faker->randomFloat(2, 1, 1000), + 'price' => $faker->randomFloat(4, 0, 1000), 'weight' => '1.00', // necessary for shipping 'brand' => AttributeOption::firstWhere('attribute_id', $brand->id)->id, ];