From b8e4692114018b2a0221ceb938edfbd77db52c74 Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Wed, 18 Mar 2020 14:34:27 +0100 Subject: [PATCH 001/256] refactor haveProduct() method to allow custom attribute handling --- composer.json | 7 +- composer.lock | 122 +++++++- .../Core/src/Helpers/Laravel5Helper.php | 264 ++++++++--------- .../ProductAttributeValueFactory.php | 277 +----------------- 4 files changed, 255 insertions(+), 415 deletions(-) diff --git a/composer.json b/composer.json index ae4374109..aff60f497 100755 --- a/composer.json +++ b/composer.json @@ -37,16 +37,17 @@ }, "require-dev": { + "barryvdh/laravel-debugbar": "^3.1", "codeception/codeception": "4.1.1", "codeception/module-asserts": "^1.1", "codeception/module-filesystem": "^1.0", "codeception/module-laravel5": "^1.0", + "codeception/module-webdriver": "^1.0", "filp/whoops": "^2.0", + "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.0", - "barryvdh/laravel-debugbar": "^3.1", - "fzaninotto/faker": "^1.4" + "phpunit/phpunit": "^7.0" }, "replace": { diff --git a/composer.lock b/composer.lock index fbf4257d3..cff3f202f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dca322023597f38ef7991bc9d9bdc50f", + "content-hash": "027ac2836216da68226e72e0ca7e4211", "packages": [ { "name": "astrotomic/laravel-translatable", @@ -5619,6 +5619,61 @@ ], "time": "2019-10-10T15:58:56+00:00" }, + { + "name": "codeception/module-webdriver", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/Codeception/module-webdriver.git", + "reference": "cfeadb39170aa80e6fe244de6a130453edd79fe9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/cfeadb39170aa80e6fe244de6a130453edd79fe9", + "reference": "cfeadb39170aa80e6fe244de6a130453edd79fe9", + "shasum": "" + }, + "require": { + "codeception/codeception": "4.0.x-dev | ^4.0", + "php": ">=5.6.0 <8.0", + "php-webdriver/webdriver": "^1.6.0" + }, + "require-dev": { + "codeception/util-robohelpers": "dev-master" + }, + "suggest": { + "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk" + }, + { + "name": "Gintautas Miselis" + }, + { + "name": "Zaahid Bateson" + } + ], + "description": "WebDriver module for Codeception", + "homepage": "http://codeception.com/", + "keywords": [ + "acceptance-testing", + "browser-testing", + "codeception" + ], + "time": "2020-03-06T08:39:02+00:00" + }, { "name": "codeception/phpunit-wrapper", "version": "7.8.0", @@ -6248,6 +6303,71 @@ "description": "Library for handling version information and constraints", "time": "2018-07-08T19:19:57+00:00" }, + { + "name": "php-webdriver/webdriver", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/php-webdriver/php-webdriver.git", + "reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab", + "reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-zip": "*", + "php": "^5.6 || ~7.0", + "symfony/polyfill-mbstring": "^1.12", + "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "jakub-onderka/php-parallel-lint": "^1.0", + "php-coveralls/php-coveralls": "^2.0", + "php-mock/php-mock-phpunit": "^1.1", + "phpunit/phpunit": "^5.7", + "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", + "sminnee/phpunit-mock-objects": "^3.4", + "squizlabs/php_codesniffer": "^3.5", + "symfony/var-dumper": "^3.3 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-SimpleXML": "For Firefox profile creation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Facebook\\WebDriver\\": "lib/" + }, + "files": [ + "lib/Exception/TimeoutException.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.", + "homepage": "https://github.com/php-webdriver/php-webdriver", + "keywords": [ + "Chromedriver", + "geckodriver", + "php", + "selenium", + "webdriver" + ], + "time": "2020-03-04T14:40:12+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.0.0", diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index 1a2666014..dbc75e122 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -5,15 +5,19 @@ namespace Webkul\Core\Helpers; // here you can define custom actions // all public methods declared in helper class will be available in $I +use Faker\Factory; +use Illuminate\Support\Str; use Codeception\Module\Laravel5; use Webkul\Checkout\Models\Cart; -use Webkul\Customer\Models\Customer; use Webkul\Checkout\Models\CartItem; use Illuminate\Support\Facades\Event; use Webkul\Product\Models\Product; +use Webkul\Attribute\Models\Attribute; use Webkul\Checkout\Models\CartAddress; use Webkul\Product\Models\ProductInventory; +use Webkul\Core\Contracts\Validations\Slug; use Webkul\Customer\Models\CustomerAddress; +use Webkul\Attribute\Models\AttributeOption; use Webkul\Product\Models\ProductAttributeValue; use Webkul\Product\Models\ProductDownloadableLink; use Webkul\Product\Models\ProductDownloadableLinkTranslation; @@ -25,7 +29,8 @@ class Laravel5Helper extends Laravel5 public const DOWNLOADABLE_PRODUCT = 3; /** - * Returns field name of given attribute. + * Returns the field name of the given attribute in which a value should be saved inside + * the 'product_attribute_values' table. Depends on the type. * * @param string $attribute * @@ -34,36 +39,23 @@ class Laravel5Helper extends Laravel5 */ public static function getAttributeFieldName(string $attribute): ?string { - $attributes = [ - 'product_id' => 'integer_value', - 'sku' => 'text_value', - 'name' => 'text_value', - 'url_key' => 'text_value', - 'tax_category_id' => 'integer_value', - 'new' => 'boolean_value', - 'featured' => 'boolean_value', - 'visible_individually' => 'boolean_value', - 'status' => 'boolean_value', - 'short_description' => 'text_value', - 'description' => 'text_value', - 'price' => 'float_value', - 'cost' => 'float_value', - 'special_price' => 'float_value', - 'special_price_from' => 'date_value', - 'special_price_to' => 'date_value', - 'meta_title' => 'text_value', - 'meta_keywords' => 'text_value', - 'meta_description' => 'text_value', - 'width' => 'integer_value', - 'height' => 'integer_value', - 'depth' => 'integer_value', - 'weight' => 'integer_value', - 'color' => 'integer_value', - 'size' => 'integer_value', - 'brand' => 'text_value', - 'guest_checkout' => 'boolean_value', + + $attributes = []; + + // @todo implement json_value ? + $possibleTypes = [ + 'text' => 'text_value', + 'select' => 'integer_value', + 'boolean' => 'boolean_value', + 'textarea' => 'text_value', + 'price' => 'float_value', + 'date' => 'date_value', ]; + foreach (Attribute::all() as $item) { + $attributes[$item->code] = $possibleTypes[$item->type]; + } + if (! array_key_exists($attribute, $attributes)) { return null; } @@ -71,16 +63,6 @@ class Laravel5Helper extends Laravel5 return $attributes[$attribute]; } - /** - * Generate a cart for the customer. Usually this is necessary to prepare the database - * before testing the checkout. - * - * @param array $options pass some options to configure some of the properties of the cart - * - * @return array the generated mocks as array - * - * @throws \Exception - */ public function prepareCart(array $options = []): array { $faker = \Faker\Factory::create(); @@ -165,49 +147,6 @@ class Laravel5Helper extends Laravel5 'cartItems' => $cartItems, 'totalQtyOrdered' => $totalQtyOrdered, ]; - - } - - - /** - * Helper function to generate products for testing - * - * @param int $productType - * @param array $configs - * @param array $productStates - * - * @return \Webkul\Product\Models\Product - * @part ORM - */ - public function haveProduct( - int $productType, - array $configs = [], - array $productStates = [] - ): Product - { - $I = $this; - - switch ($productType) { - case self::DOWNLOADABLE_PRODUCT: - $product = $I->haveDownloadableProduct($configs, $productStates); - - break; - - case self::VIRTUAL_PRODUCT: - $product = $I->haveVirtualProduct($configs, $productStates); - - break; - - case self::SIMPLE_PRODUCT: - default: - $product = $I->haveSimpleProduct($configs, $productStates); - } - - if ($product !== null) { - Event::dispatch('catalog.product.create.after', $product); - } - - return $product; } /** @@ -231,19 +170,53 @@ class Laravel5Helper extends Laravel5 } + /** + * Helper function to generate products for testing. + * + * By default, the product will be generated as saleable, this means it has a price, + * weight, is active and has a positive inventory stock, if necessary. + * + * @param int $productType see constants in this class for usage + * @param array $configs + * @param array $productStates + * + * @return \Webkul\Product\Models\Product + * @part ORM + */ + public function haveProduct(int $productType, array $configs = [], array $productStates = []): Product + { + $I = $this; + + switch ($productType) { + case self::DOWNLOADABLE_PRODUCT: + $product = $I->haveDownloadableProduct($configs, $productStates); + break; + + case self::VIRTUAL_PRODUCT: + $product = $I->haveVirtualProduct($configs, $productStates); + break; + + case self::SIMPLE_PRODUCT: + default: + $product = $I->haveSimpleProduct($configs, $productStates); + } + + if ($product !== null) { + Event::dispatch('catalog.product.create.after', $product); + } + + return $product; + } + /** * @param array $configs * @param array $productStates * * @return \Webkul\Product\Models\Product */ - private function haveSimpleProduct( - array $configs = [], - array $productStates = [] - ): Product + private function haveSimpleProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('simple', $productStates)) { $productStates = array_merge($productStates, ['simple']); } @@ -251,9 +224,9 @@ class Laravel5Helper extends Laravel5 /** @var Product $product */ $product = $I->createProduct($configs['productAttributes'] ?? [], $productStates); - $I->createAttributeValues($product->id, $configs['attributeValues'] ?? []); + $I->createAttributeValues($product, $configs['attributeValues'] ?? []); - $I->createInventory($product->id, $configs['productInventory'] ?? []); + $I->createInventory($product->id, $configs['productInventory'] ?? ['qty' => 10]); return $product->refresh(); } @@ -262,12 +235,11 @@ class Laravel5Helper extends Laravel5 * @param array $configs * @param array $productStates * - * @return \Webkul\Product\Contracts\Product + * @return \Webkul\Product\Models\Product */ private function haveVirtualProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('virtual', $productStates)) { $productStates = array_merge($productStates, ['virtual']); } @@ -275,9 +247,9 @@ class Laravel5Helper extends Laravel5 /** @var Product $product */ $product = $I->createProduct($configs['productAttributes'] ?? [], $productStates); - $I->createAttributeValues($product->id, $configs['attributeValues'] ?? []); + $I->createAttributeValues($product, $configs['attributeValues'] ?? []); - $I->createInventory($product->id, $configs['productInventory'] ?? []); + $I->createInventory($product->id, $configs['productInventory'] ?? ['qty' => 10]); return $product->refresh(); } @@ -286,12 +258,11 @@ class Laravel5Helper extends Laravel5 * @param array $configs * @param array $productStates * - * @return \Webkul\Product\Contracts\Product + * @return \Webkul\Product\Models\Product */ private function haveDownloadableProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('downloadable', $productStates)) { $productStates = array_merge($productStates, ['downloadable']); } @@ -299,7 +270,7 @@ class Laravel5Helper extends Laravel5 /** @var Product $product */ $product = $I->createProduct($configs['productAttributes'] ?? [], $productStates); - $I->createAttributeValues($product->id, $configs['attributeValues'] ?? []); + $I->createAttributeValues($product, $configs['attributeValues'] ?? []); $I->createDownloadableLink($product->id); @@ -320,30 +291,22 @@ class Laravel5Helper extends Laravel5 /** * @param int $productId * @param array $inventoryConfig - * - * @return void */ private function createInventory(int $productId, array $inventoryConfig = []): void { $I = $this; - $I->have(ProductInventory::class, array_merge($inventoryConfig, [ 'product_id' => $productId, 'inventory_source_id' => 1, - 'qty' => random_int(100, 666), ])); - } /** * @param int $productId - * - * @return void */ private function createDownloadableLink(int $productId): void { $I = $this; - $link = $I->have(ProductDownloadableLink::class, [ 'product_id' => $productId, ]); @@ -354,49 +317,74 @@ class Laravel5Helper extends Laravel5 } /** - * @param int $productId - * @param array $attributeValues - * - * @return void + * @param Product $product + * @param array $attributeValues */ - private function createAttributeValues(int $productId, array $attributeValues = []): void + private function createAttributeValues(Product $product, array $attributeValues = []): void { $I = $this; - $productAttributeValues = [ - 'sku', - 'url_key', - 'tax_category_id', - 'price', - 'cost', - 'name', - 'new', - 'visible_individually', - 'featured', - 'status', - 'guest_checkout', - 'short_description', - 'description', - 'meta_title', - 'meta_keywords', - 'meta_description', - 'weight', + $faker = Factory::create(); + + $brand = Attribute::where(['code' => 'brand'])->first(); // usually 25 + + if (! AttributeOption::where(['attribute_id' => $brand->id])->exists()) { + AttributeOption::create([ + 'admin_name' => 'Webkul Demo Brand (c) 2020', + 'attribute_id' => $brand->id, + ]); + + } + + /** @var array $defaultAttributeValues + * Some defaults that should apply to all generated products. + * By defaults products will be generated as saleable. + * If you do not want this, this defaults can be overriden by $attributeValues. + */ + $defaultAttributeValues = [ + 'name' => $faker->word, + 'description' => $faker->sentence, + 'short_description' => $faker->sentence, + 'sku' => $faker->word, + 'url_key' => $faker->slug, + 'status' => true, + 'visible_individually' => true, + 'special_price_from' => null, + 'special_price_to' => null, + 'special_price' => null, + 'price' => '1.00', + 'weight' => '1.00', // necessary for shipping + 'brand' => AttributeOption::firstWhere('attribute_id', $brand->id)->id, ]; - foreach ($productAttributeValues as $attribute) { - $data = ['product_id' => $productId]; + $attributeValues = array_merge($defaultAttributeValues, $attributeValues); - if (array_key_exists($attribute, $attributeValues)) { - $fieldName = self::getAttributeFieldName($attribute); + /** @var array $possibleAttributeValues list of the possible attributes a product can have */ + $possibleAttributeValues = Attribute::all()->pluck('code')->toArray(); - if (! array_key_exists($fieldName, $data)) { - $data[$fieldName] = $attributeValues[$attribute]; - } else { - $data = [$fieldName => $attributeValues[$attribute]]; - } + // set a value for _every_ possible attribute, even if empty: + foreach ($attributeValues as $attribute => $value) { + if (! in_array($attribute, $possibleAttributeValues)) { + throw new \Exception( + "The given attribute '{$attribute}' does not exist in the 'attributes' table (column: code)"); } - $I->have(ProductAttributeValue::class, $data, $attribute); + $attributeId = Attribute::query() + ->where('code', $attribute) + ->select('id') + ->firstOrFail() + ->id; + + $data = [ + 'product_id' => $product->id, + 'attribute_id' => $attributeId, + ]; + + $fieldName = self::getAttributeFieldName($attribute); + + $data[$fieldName] = $value; + + $I->have(ProductAttributeValue::class, $data); } } } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php index eeee5f7ef..432963515 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php @@ -5,282 +5,13 @@ use Faker\Generator as Faker; use Webkul\Product\Models\Product; use Webkul\Product\Models\ProductAttributeValue; -use Webkul\Attribute\Models\AttributeOption; -$factory->defineAs(ProductAttributeValue::class, 'sku', function (Faker $faker) { +$factory->define(ProductAttributeValue::class, function (Faker $faker) { return [ - 'product_id' => function () { + 'product_id' => function () { return factory(Product::class)->create()->id; }, - 'text_value' => $faker->uuid, - 'attribute_id' => 1, + 'locale' => 'en', + 'channel' => 'default', ]; }); - -$factory->defineAs(ProductAttributeValue::class, 'name', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->words(2, true), - 'attribute_id' => 2, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'url_key', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'text_value' => $faker->unique()->slug, - 'attribute_id' => 3, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'tax_category_id', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'channel' => 'default', - 'integer_value' => null, - 'attribute_id' => 4, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'new', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'boolean_value' => 1, - 'attribute_id' => 5, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'featured', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'boolean_value' => 1, - 'attribute_id' => 6, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'visible_individually', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'boolean_value' => 1, - 'attribute_id' => 7, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'status', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'boolean_value' => 1, - 'attribute_id' => 8, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'short_description', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->sentence, - 'attribute_id' => 9, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'description', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->sentences(3, true), - 'attribute_id' => 10, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'price', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'float_value' => $faker->randomFloat(4, 0, 1000), - 'attribute_id' => 11, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'cost', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'channel' => 'default', - 'float_value' => $faker->randomFloat(4, 0, 10), - 'attribute_id' => 12, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'special_price', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'float_value' => $faker->randomFloat(4, 0, 100), - 'attribute_id' => 13, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'special_price_from', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'channel' => 'default', - 'date_value' => $faker->dateTimeBetween('-5 days', 'now', 'Europe/Berlin'), - 'attribute_id' => 14, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'special_price_to', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'channel' => 'default', - 'date_value' => $faker->dateTimeBetween('now', '+ 5 days', 'Europe/Berlin'), - 'attribute_id' => 15, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'meta_title', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->words(2, true), - 'attribute_id' => 16, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'meta_keywords', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->words(5, true), - 'attribute_id' => 17, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'meta_description', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', //$faker->languageCode, - 'channel' => 'default', - 'text_value' => $faker->sentence, - 'attribute_id' => 18, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'width', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 50), - 'attribute_id' => 19, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'height', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 50), - 'attribute_id' => 20, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'depth', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 50), - 'attribute_id' => 21, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'weight', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 50), - 'attribute_id' => 22, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'color', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 5), - 'attribute_id' => 23, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'size', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'integer_value' => $faker->numberBetween(1, 5), - 'attribute_id' => 24, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'brand', function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'attribute_id' => 25, - 'integer_value' => function () { - return factory(AttributeOption::class)->create()->id; - }, - ]; -}); - -$factory->defineAs(ProductAttributeValue::class, 'guest_checkout', function ( Faker $faker) { - return [ - 'product_id' => function() { - return factory(Product::class)->create()->id; - }, - 'boolean_value' => 1, - 'attribute_id' => 26, - ]; -}); \ No newline at end of file From 055a6539e144a2038ddafdca1882f6a08cac8193 Mon Sep 17 00:00:00 2001 From: ghermans Date: Mon, 23 Mar 2020 03:57:35 +0100 Subject: [PATCH 002/256] fixed #2525 --- public/installer/CSS/style.css | 398 +++++++++++------- public/installer/EnvConfig.php | 18 +- public/installer/Environment.php | 201 --------- public/installer/Finish.php | 27 -- public/installer/Images/left-side.svg | 23 - public/installer/Images/right-side.svg | 20 - public/installer/JS/script | 90 ---- public/installer/Views/requirements.blade.php | 43 +- public/installer/css/old.css | 258 ++++++++++++ public/installer/index.php | 50 ++- public/installer/js/script.js | 86 ++++ .../{Admin.php => views/admin.blade.php} | 83 ++-- .../{Email.php => views/email.blade.php} | 92 ++-- public/installer/views/environment.blade.php | 247 +++++++++++ public/installer/views/finish.blade.php | 37 ++ .../migration.blade.php} | 164 ++++---- 16 files changed, 1112 insertions(+), 725 deletions(-) delete mode 100755 public/installer/Environment.php delete mode 100755 public/installer/Finish.php delete mode 100755 public/installer/Images/left-side.svg delete mode 100755 public/installer/Images/right-side.svg delete mode 100755 public/installer/JS/script create mode 100644 public/installer/css/old.css create mode 100644 public/installer/js/script.js rename public/installer/{Admin.php => views/admin.blade.php} (63%) mode change 100755 => 100644 rename public/installer/{Email.php => views/email.blade.php} (51%) create mode 100644 public/installer/views/environment.blade.php create mode 100644 public/installer/views/finish.blade.php rename public/installer/{Migration.php => views/migration.blade.php} (62%) mode change 100755 => 100644 diff --git a/public/installer/CSS/style.css b/public/installer/CSS/style.css index b20149138..99d12f2ac 100755 --- a/public/installer/CSS/style.css +++ b/public/installer/CSS/style.css @@ -3,7 +3,6 @@ body { font-size: 16px; font-family: "Montserrat", sans-serif; color: #000311; - text-align: center; background: #fff; position: relative; height: 100%; @@ -13,6 +12,7 @@ a { color: rgb(0, 65, 255); text-decoration: none;} .initial-display{ padding-top: 50px; + text-align: center; } .initial-display .logo { @@ -24,20 +24,17 @@ a { color: rgb(0, 65, 255); text-decoration: none;} color: #333333; text-align: center; font-weight: 600; - margin-top: 30px; + margin-top: 10px; + padding-bottom: 10px; } -.prepare-btn { - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1); - border-radius: 3px; - border: none; - cursor: pointer; - font: inherit; - display: inline-block; - background: #0041FF; - color: #ffffff; - padding: 10px 20px; - margin-top: 20px; +.card { + border-radius: 5px; + box-shadow: 1px 9px 18px rgba(62, 85, 120, 0.45); +} + +.btn-primary { + background-color: #0041FF; } .warning { @@ -51,38 +48,47 @@ a { color: rgb(0, 65, 255); text-decoration: none;} padding-bottom: 20px; } -.left-patern { - position: absolute; - left: 0; - bottom: 0; +.form-control{ + border: 2px solid #C7C7C7; + border-radius: 3px; + -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); + padding: 0px 10px; + font-size: 15px; + margin-top: 10px; } -.right-patern { - position: absolute; - right: 0; - bottom: 0; +.form-control:focus { + border-color: #0041FF; + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(11, 50, 139, 0.5); } -.content { - border-radius: 5px; - box-shadow: 1px 8px 18px rgba(62, 85, 120, 0.45); - min-height: 300px; - width: 600px; - margin-left: calc(50% - 300px); - text-align: left; - overflow-y: auto; +.form-group label.required::after { + margin-left: 1px; + content: "*"; + color: #FC6868; + font-weight: 700; + display: inline-block; +} + +.form-error { + color: #ff5656 !important; +} + +.control-group.has-error .control { + border-color: #FC6868 !important; } .requirements_list { width: 90%; list-style: none; - margin-left: 5%; + margin-left: 4%; padding:0; } .requirements_list li { - padding: 0 8px 8px; - margin-bottom: 8px; + padding: 0 10px 10px; + margin-bottom: 10px; border-bottom: 1px dashed #dcdcdc; line-height: normal; } @@ -94,11 +100,51 @@ a { color: rgb(0, 65, 255); text-decoration: none;} color:#9b9b9b; } -.content .cp-round { - position: auto !important; +.title { + font-size: 16px; + color: #151515; + line-height: 30px; + text-align: left; + margin-top: 30px; + margin-bottom: 10px; + text-align: center; } -.content .cp-round:before { +.welcome, .environment, .migration, .permission, .admin, .finish { + display : none; +} + +pre.bash { + background-color: black; + color: white; + font-size: medium ; + font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; + width: 100%; + display: inline-block; + height: 100%; +} + +.check { + line-height: 35px; + margin-left: 25%; +} + +.composer { + position: auto; + top: calc(50% + 24px); + display: none; +} + +.message { + padding-left: 140px; +} + +.cp-round { + position: auto !important; + padding-bottom: 130px; +} + +.cp-round:before { border-radius: 50%; content: " "; width: 48px; @@ -114,7 +160,7 @@ a { color: rgb(0, 65, 255); text-decoration: none;} left: calc(50% - 24px); } -.content .cp-round:after { +.cp-round:after { border-radius: 50%; content: " "; width: 48px; @@ -136,123 +182,179 @@ a { color: rgb(0, 65, 255); text-decoration: none;} 100% { transform: rotate(360deg); } } -.title { - font-size: 16px; - color: #151515; - line-height: 30px; - text-align: left; - margin-top: 30px; - margin-bottom: 10px; - text-align: center; -} - -span { - font-size: 16px; - color: #333333; - line-height: 30px; -} - -.welcome, .environment, .migration, .permission, .admin, .finish { - display : none; -} - -.control-group { - display: block; - margin-bottom: 25px; - font-size: 15px; - color: #333333; - width: 750px; - max-width: 100%; - position: relative; -} - -.control-group label { - display: block; - color: #3a3a3a; -} - -.control-group .control { - background: #fff; - border: 2px solid #C7C7C7; - border-radius: 3px; - width: 100%; - height: 36px; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 10px; - font-size: 15px; - margin-top: 10px; - margin-bottom: 5px; -} - -.control-group label.required::after { - content: "*"; - color: #FC6868; - font-weight: 700; - display: inline-block; -} - -.form-error { - color: #ff5656 !important; -} - -.control-group.has-error .control { - border-color: #FC6868 !important; -} - -pre.bash { - background-color: black; - color: white; - font-size: medium ; - font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; - width: 100%; - display: inline-block; - height: 100%; -} - -.check { - line-height: 35px; - margin-left: 25%; -} - -.composer { - position: absolute; - top: calc(50% + 24px); - display: none; -} - -.message { - padding-left: 140px; -} - -@media (min-width: 1281px) { - .content { - padding: 2rem 0; - } - - .content { - max-height: 484px; - margin: 20px auto; - } -} - @media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) { .initial-display{ padding-top: 15px; } - .content { - padding: 1rem 0; - } - - .content { - max-height: 488px; - margin: 30px auto; - } - .initial-display p { margin-top: 4px; } -} \ No newline at end of file +} + +/* Select */ + +.select2-container--bootstrap4 .select2-selection--single { + height: calc(2.25rem + 2px) !important; } + .select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder { + color: #757575; + line-height: 2.25rem; } + .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow { + position: absolute; + top: 50%; + right: 3px; + width: 20px; } + .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b { + top: 60%; + border-color: #343a40 transparent transparent transparent; + border-style: solid; + border-width: 5px 4px 0 4px; + width: 0; + height: 0; + left: 50%; + margin-left: -4px; + margin-top: -2px; + position: absolute; } + .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { + line-height: 2.25rem; } + + .select2-search--dropdown .select2-search__field { + border: 1px solid #ced4da; + border-radius: 0.25rem; } + + .select2-results__message { + color: #6c757d; } + + .select2-container--bootstrap4 .select2-selection--multiple { + min-height: calc(2.25rem + 2px) !important; } + .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered { + -webkit-box-sizing: border-box; + box-sizing: border-box; + list-style: none; + margin: 0; + padding: 0 5px; + width: 100%; } + .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { + color: #343a40; + border: 1px solid #bdc6d0; + border-radius: 0.2rem; + padding: 0; + padding-right: 5px; + cursor: pointer; + float: left; + margin-top: 0.3em; + margin-right: 5px; } + .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove { + color: #bdc6d0; + font-weight: bold; + margin-left: 3px; + margin-right: 1px; + padding-right: 3px; + padding-left: 3px; + float: left; } + .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover { + color: #343a40; } + + .select2-container { + display: block; } + .select2-container *:focus { + outline: 0; } + + .input-group .select2-container--bootstrap4 { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; } + + .input-group-prepend ~ .select2-container--bootstrap4 .select2-selection { + border-top-left-radius: 0; + border-bottom-left-radius: 0; } + + .input-group > .select2-container--bootstrap4:not(:last-child) .select2-selection { + border-top-right-radius: 0; + border-bottom-right-radius: 0; } + + .select2-container--bootstrap4 .select2-selection { + background-color: #fff; + border: 1px solid #ced4da; + border-radius: 0.25rem; + -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + width: 100%; } + @media screen and (prefers-reduced-motion: reduce) { + .select2-container--bootstrap4 .select2-selection { + -webkit-transition: none; + transition: none; } } + + .select2-container--bootstrap4.select2-container--focus .select2-selection { + border-color: #0041FF; + -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } + + .select2-container--bootstrap4.select2-container--focus.select2-container--open .select2-selection { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } + + .select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-selection { + background-color: #e9ecef; + cursor: not-allowed; + border-color: #ced4da; + -webkit-box-shadow: none; + box-shadow: none; } + + .select2-container--bootstrap4.select2-container--disabled .select2-search__field, .select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-search__field { + background-color: transparent; } + + select.is-invalid ~ .select2-container--bootstrap4 .select2-selection, + form.was-validated select:invalid ~ .select2-container--bootstrap4 .select2-selection { + border-color: #dc3545; } + + select.is-valid ~ .select2-container--bootstrap4 .select2-selection, + form.was-validated select:valid ~ .select2-container--bootstrap4 .select2-selection { + border-color: #28a745; } + + .select2-container--bootstrap4 .select2-dropdown { + border-color: #ced4da; + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; } + .select2-container--bootstrap4 .select2-dropdown.select2-dropdown--above { + border-top: 1px solid #ced4da; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; } + .select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected=true] { + background-color: #e9ecef; } + + .select2-container--bootstrap4 .select2-results__option--highlighted, + .select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected=true] { + background-color: #0041FF; + color: #f8f9fa; } + + .select2-container--bootstrap4 .select2-results__option[role=group] { + padding: 0; } + + .select2-container--bootstrap4 .select2-results > .select2-results__options { + max-height: 15em; + overflow-y: auto; } + + .select2-container--bootstrap4 .select2-results__group { + padding: 6px; + display: list-item; + color: #6c757d; } + + .select2-container--bootstrap4 .select2-selection__clear { + width: 1.2em; + height: 1.2em; + line-height: 1.15em; + padding-left: 0.3em; + margin-top: 0.5em; + border-radius: 100%; + background-color: #6c757d; + color: #f8f9fa; + float: right; + margin-right: 0.3em; } + .select2-container--bootstrap4 .select2-selection__clear:hover { + background-color: #343a40; } + \ No newline at end of file diff --git a/public/installer/EnvConfig.php b/public/installer/EnvConfig.php index f68ca88ab..6d1223693 100755 --- a/public/installer/EnvConfig.php +++ b/public/installer/EnvConfig.php @@ -9,11 +9,20 @@ $data = array(); // validate the variables // if any of these variables don't exist, add an error to our $errors array + if (empty($_POST['app_name'])) + $errors['app_name'] = 'App Name is required.'; + if (empty($_POST['app_url'])) $errors['app_url'] = 'App Url is required.'; - if (empty($_POST['app_name'])) - $errors['app_name'] = 'App Name is required.'; + if (empty($_POST['app_currency'])) + $errors['app_currency'] = 'The application currency is required.'; + + if (empty($_POST['app_locale'])) + $errors['app_locale'] = 'Please select a locale for the application.'; + + if (empty($_POST['app_timezone'])) + $errors['app_timezone'] = 'The application timezone is required.'; if (empty($_POST['host_name'])) $errors['host_name'] = 'Host Name is required.'; @@ -51,7 +60,7 @@ $data = array(); //return a response // if there are any errors in our errors array, return a success boolean of false - if ( ! empty($errors)) { + if (! empty($errors)) { // if there are items in our errors array, return those errors $data['success'] = false; @@ -101,6 +110,9 @@ $data = array(); $keyValueData['DB_PASSWORD'] = $_POST["user_password"]; $keyValueData['APP_NAME'] = $_POST["app_name"]; $keyValueData['APP_URL'] = $_POST["app_url"]; + $keyValueData['APP_CURRENCY'] = $_POST["app_currency"]; + $keyValueData['APP_LOCALE'] = $_POST["app_locale"]; + $keyValueData['APP_TIMEZONE'] = $_POST["app_timezone"]; $keyValueData['DB_CONNECTION'] = $_POST["database_connection"]; $keyValueData['DB_PORT'] = $_POST["port_name"]; diff --git a/public/installer/Environment.php b/public/installer/Environment.php deleted file mode 100755 index 78fd3b970..000000000 --- a/public/installer/Environment.php +++ /dev/null @@ -1,201 +0,0 @@ - - - - -
-
-

Environment Configuration

- -
-
-
-
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
- back -
-
-
- -
-
- - - - - - - - - diff --git a/public/installer/Finish.php b/public/installer/Finish.php deleted file mode 100755 index e8e00aaaf..000000000 --- a/public/installer/Finish.php +++ /dev/null @@ -1,27 +0,0 @@ - - -
-
-

Installation completed

-
-
- - Bagisto is successfully installed on your system.
- Click the below button to launch the admin panel. -
-
-
- - -
-
- - - - diff --git a/public/installer/Images/left-side.svg b/public/installer/Images/left-side.svg deleted file mode 100755 index 891572fc3..000000000 --- a/public/installer/Images/left-side.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - feature-bg-2 copy - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/installer/Images/right-side.svg b/public/installer/Images/right-side.svg deleted file mode 100755 index a45fd2f75..000000000 --- a/public/installer/Images/right-side.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - feature-bg-2 - Created with Sketch. - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/installer/JS/script b/public/installer/JS/script deleted file mode 100755 index e5535082a..000000000 --- a/public/installer/JS/script +++ /dev/null @@ -1,90 +0,0 @@ - \ No newline at end of file diff --git a/public/installer/Views/requirements.blade.php b/public/installer/Views/requirements.blade.php index be58eaedc..ceb405a9f 100755 --- a/public/installer/Views/requirements.blade.php +++ b/public/installer/Views/requirements.blade.php @@ -1,18 +1,18 @@ - + - +
+

Server Requirements

+
- $greenCheck = $actual_link .'/'. 'Images/green-check.svg'; - $redCheck = $actual_link .'/'. 'Images/red-check.svg'; - ?> - - - -
-
-

Server Requirements

-
+
+
+
+
  • @@ -53,15 +53,14 @@
+ + +
+ +
+
- - -
- -
- -
- - +
+
\ No newline at end of file diff --git a/public/installer/css/old.css b/public/installer/css/old.css new file mode 100644 index 000000000..f6db2194e --- /dev/null +++ b/public/installer/css/old.css @@ -0,0 +1,258 @@ +body { + margin: 0; + font-size: 16px; + font-family: "Montserrat", sans-serif; + color: #000311; + text-align: center; + background: #fff; + position: relative; + height: 100%; +} + +a { color: rgb(0, 65, 255); text-decoration: none;} + +.initial-display{ + padding-top: 50px; +} + +.initial-display .logo { + width: 150px; +} + +.initial-display p { + font-size: 24px; + color: #333333; + text-align: center; + font-weight: 600; + margin-top: 25px; +} + +.prepare-btn { + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1); + border-radius: 3px; + border: none; + cursor: pointer; + font: inherit; + display: inline-block; + background: #0041FF; + color: #ffffff; + padding: 10px 20px; + margin-top: 20px; +} + +.warning { + margin-left: 15%; +} + +.footer { + bottom: 0; + position: absolute; + width: 100%; + padding-bottom: 20px; +} + +.left-patern { + position: absolute; + left: 0; + bottom: 0; +} + +.right-patern { + position: absolute; + right: 0; + bottom: 0; +} + +.content { + border-radius: 5px; + box-shadow: 1px 8px 18px rgba(62, 85, 120, 0.45); + min-height: 300px; + width: 600px; + margin-left: calc(50% - 300px); + text-align: left; + overflow-y: auto; +} + +.requirements_list { + width: 90%; + list-style: none; + margin-left: 5%; + padding:0; +} + +.requirements_list li { + padding: 0 8px 8px; + margin-bottom: 8px; + border-bottom: 1px dashed #dcdcdc; + line-height: normal; +} + +.requirements_list li:last-child { border-bottom: 0;} + +.requirements_list small { + font-size: 13px; + color:#9b9b9b; +} + +.content .cp-round { + position: auto !important; +} + +.content .cp-round:before { + border-radius: 50%; + content: " "; + width: 48px; + height: 48px; + display: inline-block; + box-sizing: border-box; + border-top: solid 6px #bababa; + border-right: solid 6px #bababa; + border-bottom: solid 6px #bababa; + border-left: solid 6px #bababa; + position: absolute; + top: calc(40% - 14px); + left: calc(50% - 24px); +} + +.content .cp-round:after { + border-radius: 50%; + content: " "; + width: 48px; + height: 48px; + display: inline-block; + box-sizing: border-box; + border-top: solid 6px #0041FF; + border-right: solid 6px #bababa; + border-bottom: solid 6px #bababa; + border-left: solid 6px #bababa; + position: absolute; + top: calc(40% - 14px); + left: calc(50% - 24px); + animation: spin 1s ease-in-out infinite; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.title { + font-size: 16px; + color: #151515; + line-height: 30px; + text-align: left; + margin-top: 30px; + margin-bottom: 10px; + text-align: center; +} + +span { + font-size: 16px; + color: #333333; + line-height: 30px; +} + +.welcome, .environment, .migration, .permission, .admin, .finish { + display : none; +} + +.control-group { + display: block; + margin-bottom: 15px; + font-size: 15px; + color: #333333; + width: 750px; + max-width: 100%; + position: relative; +} + +.control-group label { + display: block; + color: #3a3a3a; +} + +.control-group .control { + background: #fff; + border: 2px solid #C7C7C7; + border-radius: 3px; + width: 100%; + height: 36px; + display: inline-block; + vertical-align: middle; + -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); + padding: 0px 10px; + font-size: 15px; + margin-top: 10px; + margin-bottom: 5px; +} + +.control-group label.required::after { + content: "*"; + color: #FC6868; + font-weight: 700; + display: inline-block; +} + +.form-error { + color: #ff5656 !important; +} + +.control-group.has-error .control { + border-color: #FC6868 !important; +} + +pre.bash { + background-color: black; + color: white; + font-size: medium ; + font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; + width: 100%; + display: inline-block; + height: 100%; +} + +.check { + line-height: 35px; + margin-left: 25%; +} + +.composer { + position: absolute; + top: calc(50% + 24px); + display: none; +} + +.message { + padding-left: 140px; +} + +@media (min-width: 1281px) { + .content { + padding: 2rem 0; + } + + .content { + max-height: 484px; + margin: 20px auto; + } +} + +@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) { + .initial-display{ + padding-top: 15px; + } + + .content { + padding: 1rem 0; + } + + .content { + max-height: 488px; + margin: 30px auto; + } + + .initial-display p { + margin-top: 4px; + } +} \ No newline at end of file diff --git a/public/installer/index.php b/public/installer/index.php index bf0893868..f436816d1 100755 --- a/public/installer/index.php +++ b/public/installer/index.php @@ -1,13 +1,11 @@ + + - - @@ -16,11 +14,19 @@ - - - + + + + + + + + + + + @@ -109,14 +115,11 @@ include __DIR__ . '/Classes/Requirement.php'; // including php files - include __DIR__ . '/Environment.php'; - include __DIR__ . '/Migration.php'; - include __DIR__ . '/Admin.php'; - include __DIR__ . '/Email.php'; - include __DIR__ . '/Finish.php'; - - // including js - include __DIR__ . '/JS/script'; + include __DIR__ . '/views/environment.blade.php'; + include __DIR__ . '/views/migration.blade.php'; + include __DIR__ . '/views/admin.blade.php'; + include __DIR__ . '/views/email.blade.php'; + include __DIR__ . '/views/finish.blade.php'; // object creation $requirement = new Requirement(); @@ -136,9 +139,10 @@ } ?> -
- Powered by Bagisto, a community project by - Webkul +
+ Bagisto a community project by Webkul
+ + diff --git a/public/installer/js/script.js b/public/installer/js/script.js new file mode 100644 index 000000000..80d728e10 --- /dev/null +++ b/public/installer/js/script.js @@ -0,0 +1,86 @@ +window.onload = function() { + + var welcome = document.getElementById('welcome'); + var requirement = document.getElementById('requirement'); + var permission = document.getElementById('permission'); + var environment = document.getElementById('environment'); + var migration = document.getElementById('migration'); + var admin = document.getElementById('admin'); + + var welcomeCheck = document.getElementById('welcome-check'); + var requirementCheck = document.getElementById('requirement-check'); + var requirementsRefresh = document.getElementById('requirements-refresh'); + + var permisssionCheck = document.getElementById('permission-check'); + var environmentCheck = document.getElementById('environment-check'); + var continue_to_admin = document.getElementById('continue'); + + var permissionBack = document.getElementById('permission-back'); + var requirementBack = document.getElementById('requirement-back'); + var envBack = document.getElementById('envronment-back'); + var migrationBack = document.getElementById('migration-back'); + + if (requirementCheck) { + requirementCheck.addEventListener('click', myFunction); + } + + if (requirementsRefresh) { + requirementsRefresh.addEventListener('click', myFunction); + } + + if (welcomeCheck) { + welcomeCheck.addEventListener('click', myFunction); + } + + if (permisssionCheck) { + permisssionCheck.addEventListener('click', myFunction); + } + + if (environmentCheck) { + environmentCheck.addEventListener('click', myFunction); + } + + if (continue_to_admin) { + continue_to_admin.addEventListener('click', myFunction); + } + + if (envBack) { + envBack.addEventListener('click', myFunction); + } + + if (requirementBack) { + requirementBack.addEventListener('click', myFunction); + } + + if (permissionBack) { + permissionBack.addEventListener('click', myFunction); + } + + if (migrationBack) { + migrationBack.addEventListener('click', myFunction); + } + + function myFunction() { + if(this.id == 'welcome-check') { + requirement.style.display = "block"; + welcome.style.display = "none"; + } else if (this.id == 'requirement-check') { + environment.style.display = "block"; + requirement.style.display = "none"; + } else if (this.id == 'continue') { + migration.style.display = "none"; + admin.style.display ="block"; + } else if (this.id == 'requirement-back') { + welcome.style.display = "block"; + requirement.style.display = "none"; + } else if (this.id == 'envronment-back') { + environment.style.display ="none"; + requirement.style.display = "block"; + } else if (this.id == 'migration-back') { + migration.style.display = "none"; + environment.style.display ="block"; + } else if (this.id == 'requirements-refresh') { + location.reload(); + } + } +}; \ No newline at end of file diff --git a/public/installer/Admin.php b/public/installer/views/admin.blade.php old mode 100755 new mode 100644 similarity index 63% rename from public/installer/Admin.php rename to public/installer/views/admin.blade.php index 16b6a197c..736c28658 --- a/public/installer/Admin.php +++ b/public/installer/views/admin.blade.php @@ -1,60 +1,49 @@ - +
+
+

Create a Administrator

+
- - -
-
-

Admin Details

- -
-
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
+
+
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
-
-
- -
- +
+ +
+ +
- - - - - - +
+
\ No newline at end of file diff --git a/public/installer/views/finish.blade.php b/public/installer/views/finish.blade.php new file mode 100644 index 000000000..513dba465 --- /dev/null +++ b/public/installer/views/finish.blade.php @@ -0,0 +1,37 @@ +
+
+

Installation completed

+
+ +
+
+
+
+
+ Bagisto is successfully installed on your system.
+
+
+
+ +
 
+
+ + Bagisto Extensions + Bagisto Forums +
+
+
+
+ + \ No newline at end of file diff --git a/public/installer/Migration.php b/public/installer/views/migration.blade.php old mode 100755 new mode 100644 similarity index 62% rename from public/installer/Migration.php rename to public/installer/views/migration.blade.php index 313b4bd8a..a58d13078 --- a/public/installer/Migration.php +++ b/public/installer/views/migration.blade.php @@ -1,40 +1,40 @@ - + - +
+
+

Database Configuration

+
- - -
-
-

Migration & Seed

- -
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+ + +
+
- Click the below button to run following : +

Click the button below to run following :

+
- Database Migration + Create the database tables
+
- Database Seeder + Populate the database tables
+
Publishing Vendor
-
- Generating Application Key +
+ + +
+
+

Checking Composer Dependency

+

Migrating Database

+

Seeding Data

- Checking Composer Dependency - Migrating Database - Seeding Data +
 
+ +
+
+ + +
+ +
+ back +
+
- -
-
- - -
-
- back -
-
-
+
+
- - - \ No newline at end of file From 840aae93a8298dbffb0ed9cb8a28a0d5c7d75301 Mon Sep 17 00:00:00 2001 From: ghermans Date: Mon, 23 Mar 2020 14:15:36 +0100 Subject: [PATCH 012/256] Removed timezone from example env --- .env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.example b/.env.example index ff411d7d6..073998d31 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,6 @@ APP_VERSION=1.1.0 APP_KEY= APP_DEBUG=true APP_URL=http://localhost -APP_TIMEZONE= APP_LOCALE= LOG_CHANNEL=stack APP_CURRENCY= From 911c66715140e3c37bafc55029d07cf97b7ddd2f Mon Sep 17 00:00:00 2001 From: ghermans Date: Mon, 23 Mar 2020 15:04:24 +0100 Subject: [PATCH 013/256] Added cdn for jquery --- public/installer/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/installer/index.php b/public/installer/index.php index f436816d1..17d7649ca 100755 --- a/public/installer/index.php +++ b/public/installer/index.php @@ -19,7 +19,7 @@ - + From 1b6fee90ef11b0a20574955eb04b17582b7775e0 Mon Sep 17 00:00:00 2001 From: hexu Date: Fri, 27 Mar 2020 12:03:18 +0800 Subject: [PATCH 014/256] Add repository cacheable trait self::findByField does not work for repository cache, so I change it to $this->findByField --- packages/Webkul/Core/src/Eloquent/Repository.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Core/src/Eloquent/Repository.php b/packages/Webkul/Core/src/Eloquent/Repository.php index a843ec976..0249dd76f 100755 --- a/packages/Webkul/Core/src/Eloquent/Repository.php +++ b/packages/Webkul/Core/src/Eloquent/Repository.php @@ -2,11 +2,16 @@ namespace Webkul\Core\Eloquent; +use Prettus\Repository\Contracts\CacheableInterface; use Prettus\Repository\Eloquent\BaseRepository; use Illuminate\Database\Eloquent\Model; use Illuminate\Container\Container as App; +use Prettus\Repository\Traits\CacheableRepository; -abstract class Repository extends BaseRepository { + +abstract class Repository extends BaseRepository implements CacheableInterface { + + use CacheableRepository; /** * Find data by field and value @@ -18,7 +23,7 @@ abstract class Repository extends BaseRepository { */ public function findOneByField($field, $value = null, $columns = ['*']) { - $model = parent::findByField($field, $value, $columns = ['*']); + $model = $this->findByField($field, $value, $columns = ['*']); return $model->first(); } @@ -33,7 +38,7 @@ abstract class Repository extends BaseRepository { */ public function findOneWhere(array $where, $columns = ['*']) { - $model = parent::findWhere($where, $columns); + $model = $this->findWhere($where, $columns); return $model->first(); } @@ -132,4 +137,4 @@ abstract class Repository extends BaseRepository { { return $this->model; } -} \ No newline at end of file +} From 271c0e38ac0990c70818b6ba689dc9a36c06dfac Mon Sep 17 00:00:00 2001 From: Florian Bosdorff Date: Fri, 27 Mar 2020 16:07:53 +0100 Subject: [PATCH 015/256] add option to set current channel --- packages/Webkul/Core/src/Core.php | 37 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index e8120d01d..a67cf503b 100755 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -64,6 +64,9 @@ class Core */ protected $coreConfigRepository; + /** @var Channel */ + private static $channel; + /** * Create a new instance. * @@ -125,23 +128,31 @@ class Core */ public function getCurrentChannel() { - static $channel; - - if ($channel) { - return $channel; + if (self::$channel) { + return self::$channel; } - $channel = $this->channelRepository->findWhereIn('hostname', [ + self::$channel = $this->channelRepository->findWhereIn('hostname', [ request()->getHttpHost(), 'http://' . request()->getHttpHost(), 'https://' . request()->getHttpHost(), ])->first(); - if (! $channel) { - $channel = $this->channelRepository->first(); + if (! self::$channel) { + self::$channel = $this->channelRepository->first(); } - return $channel; + return self::$channel; + } + + /** + * Set the current channel + * + * @param Channel $channel + */ + public function setCurrentChannel(Channel $channel): void + { + self::$channel = $channel; } /** @@ -704,7 +715,7 @@ class Core $fields = explode(".", $field); array_shift($fields); - + $field = implode(".", $fields); return Config::get($field); @@ -852,9 +863,9 @@ class Core } /** - * + * * @param string $date - * @param int $day + * @param int $day * @return string */ public function xWeekRange($date, $day) @@ -993,7 +1004,7 @@ class Core protected function arrayMerge(array &$array1, array &$array2) { $merged = $array1; - + foreach ($array2 as $key => &$value) { if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) { $merged[$key] = $this->arrayMerge($merged[$key], $value); @@ -1039,7 +1050,7 @@ class Core /** * Returns a string as selector part for identifying elements in views - * + * * @param float $taxRate * @return string */ From 505014266e67f4e6a098ad85b0d0abb5ae592f4b Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Mon, 30 Mar 2020 11:05:45 +0200 Subject: [PATCH 016/256] fix still flickering locale factory --- .../Core/src/Database/Factories/LocaleFactory.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php index f81ec2d7b..69628675e 100644 --- a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php @@ -6,12 +6,9 @@ use Webkul\Core\Models\Locale; /** @var \Illuminate\Database\Eloquent\Factory $factory */ $factory->define(Locale::class, function (Faker $faker, array $attributes) { - $languageCode = $faker->languageCode; - - $locale = Locale::query()->firstWhere('code', $languageCode); - if ($locale !== null) { - return $locale->id; - } + do { + $languageCode = $faker->languageCode; + } while (Locale::query()->where('code', $languageCode)->exists()); return [ 'code' => $languageCode, @@ -22,4 +19,4 @@ $factory->define(Locale::class, function (Faker $faker, array $attributes) { $factory->state(Category::class, 'rtl', [ 'direction' => 'rtl', -]); +]); \ No newline at end of file From f7a69d4a30d7ea0c0fe84ddb64b585699de1afac Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Mon, 30 Mar 2020 15:03:27 +0200 Subject: [PATCH 017/256] optimize fetching of possible attributes in Laravel5Helper.php haveProduct() method --- .../Core/src/Helpers/Laravel5Helper.php | 104 +++++------------- 1 file changed, 29 insertions(+), 75 deletions(-) diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index dbc75e122..6f7557d85 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -6,22 +6,26 @@ namespace Webkul\Core\Helpers; // all public methods declared in helper class will be available in $I use Faker\Factory; -use Illuminate\Support\Str; use Codeception\Module\Laravel5; use Webkul\Checkout\Models\Cart; use Webkul\Checkout\Models\CartItem; -use Illuminate\Support\Facades\Event; use Webkul\Product\Models\Product; use Webkul\Attribute\Models\Attribute; use Webkul\Checkout\Models\CartAddress; use Webkul\Product\Models\ProductInventory; -use Webkul\Core\Contracts\Validations\Slug; use Webkul\Customer\Models\CustomerAddress; use Webkul\Attribute\Models\AttributeOption; use Webkul\Product\Models\ProductAttributeValue; use Webkul\Product\Models\ProductDownloadableLink; use Webkul\Product\Models\ProductDownloadableLinkTranslation; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Event; +/** + * Class Laravel5Helper + * + * @package Webkul\Core\Helpers + */ class Laravel5Helper extends Laravel5 { public const SIMPLE_PRODUCT = 1; @@ -37,7 +41,7 @@ class Laravel5Helper extends Laravel5 * @return string|null * @part ORM */ - public static function getAttributeFieldName(string $attribute): ?string + public static function getAttributeFieldName(string $type): ?string { $attributes = []; @@ -52,15 +56,7 @@ class Laravel5Helper extends Laravel5 'date' => 'date_value', ]; - foreach (Attribute::all() as $item) { - $attributes[$item->code] = $possibleTypes[$item->type]; - } - - if (! array_key_exists($attribute, $attributes)) { - return null; - } - - return $attributes[$attribute]; + return $possibleTypes[$type]; } public function prepareCart(array $options = []): array @@ -78,8 +74,8 @@ class Laravel5Helper extends Laravel5 } $I->have(CustomerAddress::class, [ - 'customer_id' => $customer->id, 'default_address' => 1, + 'customer_id' => $customer->id, 'first_name' => $customer->first_name, 'last_name' => $customer->last_name, 'company_name' => $faker->company, @@ -99,18 +95,17 @@ class Laravel5Helper extends Laravel5 'customer_first_name' => $customer->first_name, 'customer_last_name' => $customer->last_name, 'customer_email' => $customer->email, - 'is_active' => 1, - 'channel_id' => 1, + 'is_active' => $options['is_active'] ?? 1, + 'channel_id' => $options['channel_id'] ?? 1, 'grand_total' => $grand_total, 'base_grand_total' => $base_grand_total, ]); $cartAddress = $I->have(CartAddress::class, ['cart_id' => $cart->id]); + $type = 'simple'; if (isset($options['product_type'])) { $type = $options['product_type']; - } else { - $type = 'simple'; } $totalQtyOrdered = 0; @@ -154,7 +149,7 @@ class Laravel5Helper extends Laravel5 * * @param array $keyValue */ - public function setSession(array $keyValue) + public function setSession(array $keyValue): void { session($keyValue); } @@ -162,9 +157,8 @@ class Laravel5Helper extends Laravel5 /** * Flush the session data and regenerate the ID * A logged in user will be logged off. - * */ - public function invalidateSession() + public function invalidateSession(): void { session()->invalidate(); } @@ -208,12 +202,6 @@ class Laravel5Helper extends Laravel5 return $product; } - /** - * @param array $configs - * @param array $productStates - * - * @return \Webkul\Product\Models\Product - */ private function haveSimpleProduct(array $configs = [], array $productStates = []): Product { $I = $this; @@ -231,12 +219,6 @@ class Laravel5Helper extends Laravel5 return $product->refresh(); } - /** - * @param array $configs - * @param array $productStates - * - * @return \Webkul\Product\Models\Product - */ private function haveVirtualProduct(array $configs = [], array $productStates = []): Product { $I = $this; @@ -254,12 +236,6 @@ class Laravel5Helper extends Laravel5 return $product->refresh(); } - /** - * @param array $configs - * @param array $productStates - * - * @return \Webkul\Product\Models\Product - */ private function haveDownloadableProduct(array $configs = [], array $productStates = []): Product { $I = $this; @@ -277,21 +253,11 @@ class Laravel5Helper extends Laravel5 return $product->refresh(); } - /** - * @param array $attributes - * @param array $states - * - * @return \Webkul\Product\Models\Product - */ private function createProduct(array $attributes = [], array $states = []): Product { return factory(Product::class)->states($states)->create($attributes); } - /** - * @param int $productId - * @param array $inventoryConfig - */ private function createInventory(int $productId, array $inventoryConfig = []): void { $I = $this; @@ -301,9 +267,6 @@ class Laravel5Helper extends Laravel5 ])); } - /** - * @param int $productId - */ private function createDownloadableLink(int $productId): void { $I = $this; @@ -316,19 +279,19 @@ class Laravel5Helper extends Laravel5 ]); } - /** - * @param Product $product - * @param array $attributeValues - */ private function createAttributeValues(Product $product, array $attributeValues = []): void { $I = $this; $faker = Factory::create(); - $brand = Attribute::where(['code' => 'brand'])->first(); // usually 25 + $brand = Attribute::query() + ->where(['code' => 'brand']) + ->first(); // usually 25 - if (! AttributeOption::where(['attribute_id' => $brand->id])->exists()) { + if (! AttributeOption::query() + ->where(['attribute_id' => $brand->id]) + ->exists()) { AttributeOption::create([ 'admin_name' => 'Webkul Demo Brand (c) 2020', 'attribute_id' => $brand->id, @@ -360,29 +323,20 @@ class Laravel5Helper extends Laravel5 $attributeValues = array_merge($defaultAttributeValues, $attributeValues); /** @var array $possibleAttributeValues list of the possible attributes a product can have */ - $possibleAttributeValues = Attribute::all()->pluck('code')->toArray(); - - // set a value for _every_ possible attribute, even if empty: - foreach ($attributeValues as $attribute => $value) { - if (! in_array($attribute, $possibleAttributeValues)) { - throw new \Exception( - "The given attribute '{$attribute}' does not exist in the 'attributes' table (column: code)"); - } - - $attributeId = Attribute::query() - ->where('code', $attribute) - ->select('id') - ->firstOrFail() - ->id; + $possibleAttributeValues = DB::table('attributes') + ->select('id', 'code', 'type') + ->get() + ->toArray(); + foreach ($possibleAttributeValues as $set) { $data = [ 'product_id' => $product->id, - 'attribute_id' => $attributeId, + 'attribute_id' => $set->id, ]; - $fieldName = self::getAttributeFieldName($attribute); + $fieldName = self::getAttributeFieldName($set->type); - $data[$fieldName] = $value; + $data[$fieldName] = $attributeValues[$set->code] ?? null; $I->have(ProductAttributeValue::class, $data); } From 0005241794ddd0b1246c319631b5069199909b8d Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Mon, 30 Mar 2020 21:09:40 +0530 Subject: [PATCH 018/256] misc. updates --- .../views/settings/sliders/create.blade.php | 7 +++++- .../publishable/assets/css/velocity.css | 2 +- .../publishable/assets/mix-manifest.json | 2 +- .../Resources/assets/sass/components/app.scss | 5 ++++- .../views/admin/meta-info/meta-data.blade.php | 22 +++++++++++-------- .../shop/customers/account/index.blade.php | 10 ++++++++- .../layouts/top-nav/locale-currency.blade.php | 3 +-- 7 files changed, 35 insertions(+), 16 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php index 222d6176c..f67421151 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php @@ -6,7 +6,12 @@ @section('content')
-
+ + @@ -234,9 +235,9 @@
- -

Languages

- cancel + +

{{ __('velocity::app.responsive.header.languages') }}

+ cancel
    @@ -267,9 +268,9 @@
    - +

    Currencies

    - cancel + cancel
      @@ -452,6 +453,7 @@ toggleSubcategories: function (index, event) { if (index == "root") { this.rootCategories = true; + this.subCategory = false; } else { event.preventDefault(); @@ -462,7 +464,8 @@ }, toggleMetaInfo: function (metaKey) { - this.rootCategories = false; + this.rootCategories = ! this.rootCategories; + this[metaKey] = !this[metaKey]; }, From 72f11fb04980692a8c418049ae078adf1c197fca Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Thu, 9 Apr 2020 20:19:36 +0530 Subject: [PATCH 067/256] #2790 --- packages/Webkul/Velocity/src/Helpers/Helper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Velocity/src/Helpers/Helper.php b/packages/Webkul/Velocity/src/Helpers/Helper.php index a25fc48dc..728e0b5ee 100644 --- a/packages/Webkul/Velocity/src/Helpers/Helper.php +++ b/packages/Webkul/Velocity/src/Helpers/Helper.php @@ -252,9 +252,13 @@ class Helper extends Review if (is_string($path) && is_readable($path)) { return include $path; - } + } else { + $currentLocale = "en"; - return []; + $path = __DIR__ . "/../Resources/lang/$currentLocale/app.php"; + + return include $path; + } } /** From f887f070c7c4fcb1a4e140fcb49d1823263aec50 Mon Sep 17 00:00:00 2001 From: rahulshukla-home Date: Thu, 9 Apr 2020 22:07:04 +0530 Subject: [PATCH 068/256] Issue #2793 --- .../Webkul/Product/src/Type/Configurable.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/packages/Webkul/Product/src/Type/Configurable.php b/packages/Webkul/Product/src/Type/Configurable.php index 02867480d..921b43f0a 100644 --- a/packages/Webkul/Product/src/Type/Configurable.php +++ b/packages/Webkul/Product/src/Type/Configurable.php @@ -560,4 +560,46 @@ class Configurable extends AbstractType return $options; } + + /** + * @param int $qty + * @return bool + */ + public function haveSufficientQuantity($qty) + { + $backorders = core()->getConfigData('catalog.inventory.stock_options.backorders'); + + return $qty <= $this->totalQuantity() ? true : $backorders; + } + + /** + * @return int + */ + public function totalQuantity() + { + $total = 0; + + $channelInventorySourceIds = core()->getCurrentChannel() + ->inventory_sources() + ->where('status', 1) + ->pluck('id'); + + foreach ($this->product->variants as $variant) { + foreach ($variant->inventories as $inventory) { + if (is_numeric($index = $channelInventorySourceIds->search($inventory->inventory_source_id))) { + $total += $inventory->qty; + } + } + + $orderedInventory = $variant->ordered_inventories() + ->where('channel_id', core()->getCurrentChannel()->id) + ->first(); + + if ($orderedInventory) { + $total -= $orderedInventory->qty; + } + } + + return $total; + } } \ No newline at end of file From 70828092d6e911c2d7a42083df90afd819793e25 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 10 Apr 2020 11:28:41 +0530 Subject: [PATCH 069/256] Issue #2846 fixed --- CHANGELOG for v1.x.x.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 1dddb4461..4f76fbd9b 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -84,6 +84,9 @@ * #2845 [fixed] - Implement custom RegistrationController +* #2846 [fixed] - does not show next step + + ## **v1.1.0 (24th of March 2020)** - *Release* From 45c2d670b95362033ce97b0f78538fcbd272402a Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 10 Apr 2020 14:43:55 +0530 Subject: [PATCH 070/256] Changelog updated --- CHANGELOG for v1.x.x.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 4f76fbd9b..22893ab88 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -16,16 +16,26 @@ * #2684 [fixed] - API checkout/cart returns null for guest user +* #2691 [fixed] - Shipping and Payment methods automatically selected on Checkout oage + * #2706 [fixed] - Getting exception on editing category for pt_BR locale in php 7.4 * #2708 [fixed] - Able to create booking product from back date. +* #2713 [fixed] - fix the invoice header in pdf + * #2726 [fixed] - is shop.js the vue framework ?? * #2752 [fixed] - Error when you create or update a new catalog under root +* #2763 [fixed] - error to add rental booking into cart + +* #2764 [fixed] - fix UI when select back_date of booking product,the calendar icon is set on another place + * #2765 [fixed] - Email settings configuration values are not write in .env file +* #2768 [fixed] - Getting exception in cart when remove one ticket from event booking from backend + * #2769 [fixed] - Can't delete Exchange Rates data * #2774 [fixed] - How to add new icon in bagisto admin panel? @@ -48,8 +58,18 @@ * #2788 [fixed] - guest_checkout is missing from edit product +* #2790 [fixed] - Minicart disable when use new languages only velocity theme + +* #2792 [fixed] - Weight Validation Inconsistencies + +* #2793 [fixed] - Stock Check Incorrect for Configurable Items + +* #2794 [fixed] - When allow backorder is enabled, display a message available for order rather than in stock. + * #2796 [fixed] - Try to create category in windows 10 getting exception +* #2801 [fixed] - Address with more than 2 lines is not added correctly to the cart_address table + * #2807 [fixed] - Illegal mix of collations * #2808 [fixed] - Correct the spelling on registration page. @@ -78,6 +98,8 @@ * #2832 [fixed] - Illegal mix of collations +* #2834 [fixed] - Layout issue in compare page in pt_BR locale + * #2837 [fixed] - subscription bar content source code is not visible in text editor * #2840 [fixed] - Velocity theme is not available on fresh install @@ -86,6 +108,14 @@ * #2846 [fixed] - does not show next step +* #2847 [fixed] - Class 'Faker\Factory' not found + +* #2849 [fixed] - Can not add my stylesheet to Velocity theme + +* #2851 [fixed] - Fix date picker icon layout at dashboard + +* #2856 [fixed] - Issue with Sort by functionality, when open any category it by defaults show Newest First but after changing sort by when again select newest first it shows different product. + ## **v1.1.0 (24th of March 2020)** - *Release* From 5310f9e17cfb77563bcef37a327c8a7ea3ec5a39 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 10 Apr 2020 15:33:48 +0530 Subject: [PATCH 071/256] Fixed date icon issue --- .../admin/catalog/products/accordians/booking.blade.php | 9 +++++++++ .../products/accordians/booking/default.blade.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index a76ad3401..cf075f47f 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -1,3 +1,12 @@ +@section('css') + +@stop + {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.before', ['product' => $product]) !!} diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/default.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/default.blade.php index fc0bebaf6..b778d1cbc 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/default.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/default.blade.php @@ -157,7 +157,7 @@ From 8e93a3ffb8bef3787735e6739ce79af33e9d5062 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Mon, 13 Apr 2020 11:20:48 +0530 Subject: [PATCH 078/256] calculate height on change value of dropdown --- .../src/Resources/views/shop/customers/account/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php index 421005468..c52e20a5c 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php @@ -30,7 +30,7 @@ window.updateHeight(); - $('input').change(() => { + $('input, select').change(() => { setTimeout(() => { window.updateHeight() }, 0) From 21a62ff05a3fe4132891de80ca47a9ba8c9bab88 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Mon, 13 Apr 2020 13:36:16 +0530 Subject: [PATCH 079/256] #2876 --- .../Velocity/src/Resources/views/shop/checkout/onepage.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php index e966b22db..32678f0e2 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php @@ -351,6 +351,7 @@ this.$http.post("{{ route('shop.checkout.save-address') }}", this.address) .then(response => { this.disable_button = false; + this.isPlaceOrderEnabled = true; if (this.step_numbers[response.data.jump_to_section] == 2) { this.showShippingSection = true; From 3d7d1ab57427645cdb79f2460417aa2d7d38a87b Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Mon, 13 Apr 2020 16:50:05 +0530 Subject: [PATCH 080/256] Issue #2784 fixed --- .../BookingProduct/src/Helpers/DefaultSlot.php | 4 +++- .../catalog/products/accordians/booking.blade.php | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/BookingProduct/src/Helpers/DefaultSlot.php b/packages/Webkul/BookingProduct/src/Helpers/DefaultSlot.php index b49e52c99..30d7786c7 100644 --- a/packages/Webkul/BookingProduct/src/Helpers/DefaultSlot.php +++ b/packages/Webkul/BookingProduct/src/Helpers/DefaultSlot.php @@ -62,8 +62,10 @@ class DefaultSlot extends Booking { $slots = []; + $dayOfWeek = $requestedDate->dayOfWeek; + foreach ($bookingProductSlot->slots as $timeDuration) { - if ($requestedDate->dayOfWeek != $timeDuration['from_day']) { + if ($dayOfWeek != $timeDuration['from_day']) { continue; } diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index cf075f47f..3bca1b92f 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -4,6 +4,19 @@ margin-top: -13px; left: 100%; } + + .has-control-group .control-group { + width: 50%; + float: left; + } + + .has-control-group .control-group:first-child { + padding-right: 10px; + } + + .has-control-group .control-group:last-child { + padding-left: 10px; + } @stop From 57d2def00f2d621fdd95cea0a9f50c1d45619e3e Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Mon, 13 Apr 2020 16:54:32 +0530 Subject: [PATCH 081/256] Updated changelog --- CHANGELOG for v1.x.x.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 22893ab88..f2323409f 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -52,6 +52,8 @@ * #2781 [fixed] - Mobile menu is not showing correct sub-menu +* #2784 [fixed] - One booking for many days slot time issue + * #2785 [fixed] - missing address details in checkout page * #2786 [fixed] - Getting error message on adding product to compare product from search page. From dd46e23628718add6fbcac8e94761b9bb0488ea4 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Mon, 13 Apr 2020 20:58:34 +0530 Subject: [PATCH 082/256] Issue #2871 fixed --- CHANGELOG for v1.x.x.md | 2 ++ .../Admin/src/Http/Controllers/Sales/RefundController.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index f2323409f..5639fdaf5 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -118,6 +118,8 @@ * #2856 [fixed] - Issue with Sort by functionality, when open any category it by defaults show Newest First but after changing sort by when again select newest first it shows different product. +* #2871 [fixed] - Refund throws "Undefined index: shipping" error + ## **v1.1.0 (24th of March 2020)** - *Release* diff --git a/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php b/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php index 48a23125b..a41566f35 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php @@ -107,6 +107,10 @@ class RefundController extends Controller $data = request()->all(); + if (! $data['refund']['shipping']) { + $data['refund']['shipping'] = 0; + } + $totals = $this->refundRepository->getOrderItemsRefundSummary($data['refund']['items'], $orderId); $maxRefundAmount = $totals['grand_total']['price'] - $order->refunds()->sum('base_adjustment_refund'); From b88e239ad2775e83d70ed905b3cb214cde4c1830 Mon Sep 17 00:00:00 2001 From: rahulshukla-home Date: Mon, 13 Apr 2020 23:03:45 +0530 Subject: [PATCH 083/256] Issue #2543 fixed --- .../Admin/src/DataGrids/SliderDataGrid.php | 33 ++++++++++- .../views/settings/sliders/create.blade.php | 14 +++++ .../views/settings/sliders/edit.blade.php | 7 +++ .../views/settings/sliders/index.blade.php | 56 ++++++++++++++++++- ..._13_224524_add_locale_in_sliders_table.php | 32 +++++++++++ .../src/Http/Controllers/SliderController.php | 4 +- packages/Webkul/Core/src/Models/Slider.php | 1 + .../src/Http/Controllers/HomeController.php | 10 +++- 8 files changed, 150 insertions(+), 7 deletions(-) create mode 100644 packages/Webkul/Core/src/Database/Migrations/2020_04_13_224524_add_locale_in_sliders_table.php diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index f0fa7fd78..6d5b6009a 100755 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -11,11 +11,31 @@ class SliderDataGrid extends DataGrid protected $sortOrder = 'desc'; + protected $locale = 'all'; + + protected $channel = 'all'; + + public function __construct() + { + parent::__construct(); + + $this->locale = request()->get('locale') ?? 'all'; + $this->channel = request()->get('channel') ?? 'all'; + } + public function prepareQueryBuilder() { $queryBuilder = DB::table('sliders as sl') - ->addSelect('sl.id as slider_id', 'sl.title', 'ch.name') - ->leftJoin('channels as ch', 'sl.channel_id', '=', 'ch.id'); + ->addSelect('sl.id as slider_id', 'sl.title', 'sl.locale', 'ch.name', 'ch.code') + ->leftJoin('channels as ch', 'sl.channel_id', '=', 'ch.id'); + + if ($this->locale !== 'all') { + $queryBuilder->where('locale', $this->locale); + } + + if ($this->channel !== 'all') { + $queryBuilder->where('ch.code', $this->channel); + } $this->addFilter('slider_id', 'sl.id'); $this->addFilter('channel_name', 'ch.name'); @@ -51,6 +71,15 @@ class SliderDataGrid extends DataGrid 'sortable' => true, 'filterable' => true, ]); + + $this->addColumn([ + 'index' => 'locale', + 'label' => trans('admin::app.datagrid.locale'), + 'type' => 'string', + 'searchable' => true, + 'sortable' => true, + 'filterable' => true + ]); } public function prepareActions() diff --git a/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php index f67421151..51aa1266c 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/sliders/create.blade.php @@ -34,6 +34,20 @@ {!! view_render_event('bagisto.admin.settings.slider.create.before') !!} +
      + + + +
      +
      diff --git a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php index af5e28126..ae15896e9 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php @@ -6,6 +6,8 @@ @section('content')
      + get('locale') ?: app()->getLocale(); ?> + + + {!! view_render_event('sales.invoice.shipping-method.after', ['order' => $order]) !!}
      @endif @@ -236,7 +260,7 @@ @if (isset($item->additional['attributes']))
      - + @foreach ($item->additional['attributes'] as $attribute) {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
      @endforeach diff --git a/packages/Webkul/Admin/src/Resources/views/sales/orders/view.blade.php b/packages/Webkul/Admin/src/Resources/views/sales/orders/view.blade.php index 24eee8937..295821471 100755 --- a/packages/Webkul/Admin/src/Resources/views/sales/orders/view.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/sales/orders/view.blade.php @@ -12,13 +12,19 @@

      + {!! view_render_event('sales.order.title.before', ['order' => $order]) !!} + {{ __('admin::app.sales.orders.view-title', ['order_id' => $order->increment_id]) }} + + {!! view_render_event('sales.order.title.after', ['order' => $order]) !!}

      + {!! view_render_event('sales.order.page_action.before', ['order' => $order]) !!} + @if ($order->canCancel()) {{ __('admin::app.sales.orders.cancel-btn-title') }} @@ -42,6 +48,8 @@ {{ __('admin::app.sales.orders.shipment-btn-title') }} @endif + + {!! view_render_event('sales.order.page_action.after', ['order' => $order]) !!}
      @@ -72,6 +80,8 @@
    + {!! view_render_event('sales.order.created_at.after', ['order' => $order]) !!} +
    {{ __('admin::app.sales.orders.order-status') }} @@ -82,6 +92,8 @@
    + {!! view_render_event('sales.order.status_label.after', ['order' => $order]) !!} +
    {{ __('admin::app.sales.orders.channel') }} @@ -91,6 +103,8 @@ {{ $order->channel_name }}
    + + {!! view_render_event('sales.order.channel_name.after', ['order' => $order]) !!}
@@ -110,6 +124,8 @@
+ {!! view_render_event('sales.order.customer_full_name.after', ['order' => $order]) !!} +
{{ __('admin::app.sales.orders.email') }} @@ -120,6 +136,8 @@
+ {!! view_render_event('sales.order.customer_email.after', ['order' => $order]) !!} + @if (! is_null($order->customer))
@@ -131,6 +149,8 @@
@endif + + {!! view_render_event('sales.order.customer_group.after', ['order' => $order]) !!}
@@ -146,9 +166,9 @@
- @include ('admin::sales.address', ['address' => $order->billing_address]) + {!! view_render_event('sales.order.billing_address.after', ['order' => $order]) !!}
@@ -159,9 +179,9 @@
- @include ('admin::sales.address', ['address' => $order->shipping_address]) + {!! view_render_event('sales.order.shipping_address.after', ['order' => $order]) !!}
@endif @@ -197,6 +217,8 @@ {{ $order->order_currency_code }}
+ + {!! view_render_event('sales.order.payment-method.after', ['order' => $order]) !!}
@@ -226,6 +248,8 @@ {{ core()->formatBasePrice($order->base_shipping_amount) }} + + {!! view_render_event('sales.order.shipping-method.after', ['order' => $order]) !!} @endif @@ -315,66 +339,107 @@ - - - - - - +
+
+
+ @csrf() - @if ($order->haveStockableItems()) +
+ + + @{{ errors.first('comment') }} +
+ +
+ + + + {{ __('admin::app.sales.orders.notify-customer') }} + +
+ + + + +
    + @foreach ($order->comments()->orderBy('id', 'desc')->get() as $comment) +
  • + + @if ($comment->customer_notified) + {!! __('admin::app.sales.orders.customer-notified', ['date' => $comment->created_at]) !!} + @else + {!! __('admin::app.sales.orders.customer-not-notified', ['date' => $comment->created_at]) !!} + @endif + + +

    {{ $comment->comment }}

    +
  • + @endforeach +
+
+ +
{{ __('admin::app.sales.orders.subtotal') }}-{{ core()->formatBasePrice($order->base_sub_total) }}
- + - + - @endif - @if ($order->base_discount_amount > 0) - - + + + + + @endif - @if ($order->coupon_code) - ({{ $order->coupon_code }}) - @endif - + @if ($order->base_discount_amount > 0) + + + + + + @endif + + + - + - @endif - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - -
{{ __('admin::app.sales.orders.shipping-handling') }}{{ __('admin::app.sales.orders.subtotal') }} -{{ core()->formatBasePrice($order->base_shipping_amount) }}{{ core()->formatBasePrice($order->base_sub_total) }}
- {{ __('admin::app.sales.orders.discount') }} + @if ($order->haveStockableItems()) +
{{ __('admin::app.sales.orders.shipping-handling') }}-{{ core()->formatBasePrice($order->base_shipping_amount) }}
+ {{ __('admin::app.sales.orders.discount') }} + + @if ($order->coupon_code) + ({{ $order->coupon_code }}) + @endif + -{{ core()->formatBasePrice($order->base_discount_amount) }}
{{ __('admin::app.sales.orders.tax') }} -{{ core()->formatBasePrice($order->base_discount_amount) }}{{ core()->formatBasePrice($order->base_tax_amount) }}
{{ __('admin::app.sales.orders.tax') }}-{{ core()->formatBasePrice($order->base_tax_amount) }}
{{ __('admin::app.sales.orders.grand-total') }}-{{ core()->formatBasePrice($order->base_grand_total) }}
{{ __('admin::app.sales.orders.grand-total') }}-{{ core()->formatBasePrice($order->base_grand_total) }}
{{ __('admin::app.sales.orders.total-paid') }}-{{ core()->formatBasePrice($order->base_grand_total_invoiced) }}
{{ __('admin::app.sales.orders.total-paid') }}-{{ core()->formatBasePrice($order->base_grand_total_invoiced) }}
{{ __('admin::app.sales.orders.total-refunded') }}-{{ core()->formatBasePrice($order->base_grand_total_refunded) }}
{{ __('admin::app.sales.orders.total-due') }}-{{ core()->formatBasePrice($order->base_total_due) }}
+ + {{ __('admin::app.sales.orders.total-refunded') }} + - + {{ core()->formatBasePrice($order->base_grand_total_refunded) }} + + + {{ __('admin::app.sales.orders.total-due') }} + - + {{ core()->formatBasePrice($order->base_total_due) }} + + + diff --git a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php index 9380ad3f6..157a9e33e 100755 --- a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php @@ -263,6 +263,7 @@ {{ __('admin::app.sales.orders.SKU') }} {{ __('admin::app.sales.orders.product-name') }} {{ __('admin::app.sales.shipments.qty-ordered') }} + {{ __('admin::app.sales.shipments.qty-invoiced') }} {{ __('admin::app.sales.shipments.qty-to-ship') }} {{ __('admin::app.sales.shipments.available-sources') }} @@ -288,6 +289,7 @@ @endif {{ $item->qty_ordered }} + {{ $item->qty_invoiced }} {{ $item->qty_to_ship }} @@ -324,8 +326,8 @@
- - + + @verbatim {{ errors.first('') }} diff --git a/packages/Webkul/Admin/src/Resources/views/settings/exchange_rates/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/exchange_rates/create.blade.php index ed1a75c1c..047f2e316 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/exchange_rates/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/exchange_rates/create.blade.php @@ -56,7 +56,7 @@
+ @foreach (core()->getAllLocales() as $localeModel) + + + + @endforeach + +
+
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php index af5e28126..ae15896e9 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php @@ -6,6 +6,8 @@ @section('content')
+ get('locale') ?: app()->getLocale(); ?> +
+ {!! view_render_event('bagisto.shop.customers.signup_form_controls.firstname.after') !!} +
+ {!! view_render_event('bagisto.shop.customers.signup_form_controls.lastname.after') !!} +
+ {!! view_render_event('bagisto.shop.customers.signup_form_controls.email.after') !!} +
+ {!! view_render_event('bagisto.shop.customers.signup_form_controls.password.after') !!} +
+
+ {{ $order->shipping_address->company_name ?? '' }} +
+
{{ $order->shipping_address->name }}
@@ -71,6 +75,10 @@ {{ __('shop::app.mail.order.billing-address') }}
+
+ {{ $order->billing_address->company_name ?? '' }} +
+
{{ $order->billing_address->name }}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php index a1b58f641..eb148b2b3 100755 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php @@ -35,6 +35,10 @@ {{ __('shop::app.mail.order.shipping-address') }}
+
+ {{ $order->shipping_address->company_name ?? '' }} +
+
{{ $order->shipping_address->name }}
@@ -68,6 +72,10 @@ {{ __('shop::app.mail.order.billing-address') }}
+
+ {{ $order->billing_address->company_name ?? '' }} +
+
{{ $order->billing_address->name }}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-refund.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-refund.blade.php index 8bd270795..993108341 100644 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-refund.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-refund.blade.php @@ -37,6 +37,10 @@ {{ __('shop::app.mail.order.shipping-address') }} +
+ {{ $order->shipping_address->company_name ?? '' }} +
+
{{ $order->shipping_address->name }}
@@ -70,6 +74,10 @@ {{ __('shop::app.mail.order.billing-address') }} +
+ {{ $order->billing_address->company_name ?? '' }} +
+
{{ $order->billing_address->name }}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php index d5fabb734..a4d99b383 100755 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php @@ -36,6 +36,10 @@ {{ __('shop::app.mail.order.shipping-address') }} +
+ {{ $order->shipping_address->company_name ?? '' }} +
+
{{ $order->shipping_address->name }}
@@ -78,6 +82,10 @@ {{ __('shop::app.mail.order.billing-address') }} +
+ {{ $order->billing_address->company_name ?? '' }} +
+
{{ $order->billing_address->name }}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel.blade.php index 2b0139e1c..494c2747c 100644 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/order-cancel.blade.php @@ -34,6 +34,10 @@ {{ __('shop::app.mail.order.cancel.shipping-address') }} +
+ {{ $order->shipping_address->company_name ?? '' }} +
+
{{ $order->shipping_address->name }}
@@ -66,6 +70,10 @@ {{ __('shop::app.mail.order.cancel.billing-address') }} +
+ {{ $order->billing_address->company_name ?? '' }} +
+
{{ $order->billing_address->name }}
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/review.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/review.blade.php index 1fde1befb..38858b6ae 100755 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/review.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/review.blade.php @@ -19,6 +19,9 @@
    +
  • + {{ $billingAddress->company_name ?? '' }} +

  • {{ $billingAddress->name }}

  • @@ -45,6 +48,9 @@
      +
    • + {{ $shippingAddress->company_name ?? '' }} +

    • {{ $shippingAddress->name }}

    • From d664c92d30da1a5eece106203e1ca49b6499446d Mon Sep 17 00:00:00 2001 From: Steffen Mahler Date: Fri, 22 May 2020 08:52:03 +0200 Subject: [PATCH 240/256] trigger pipeline --- .../Shop/src/Resources/views/emails/sales/new-order.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php index eb148b2b3..443d73f22 100755 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php @@ -75,7 +75,7 @@
      {{ $order->billing_address->company_name ?? '' }}
      - +
      {{ $order->billing_address->name }}
      From 70dd3d905438a1f8667b637d4b11a77f2c75acd7 Mon Sep 17 00:00:00 2001 From: Hans Schouten Date: Fri, 22 May 2020 08:53:17 +0200 Subject: [PATCH 241/256] Add dutch auth.php --- resources/lang/nl/auth.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 resources/lang/nl/auth.php diff --git a/resources/lang/nl/auth.php b/resources/lang/nl/auth.php new file mode 100644 index 000000000..e87d22c44 --- /dev/null +++ b/resources/lang/nl/auth.php @@ -0,0 +1,18 @@ + 'Deze combinatie van e-mailadres en wachtwoord is niet geldig.', + 'throttle' => 'Te veel mislukte loginpogingen. Probeer het over :seconds seconden nogmaals.', +]; From b24b169d4debbebc97ccd31d6c6e5d66ae9f7e6c Mon Sep 17 00:00:00 2001 From: Hans Schouten Date: Fri, 22 May 2020 08:59:49 +0200 Subject: [PATCH 242/256] Add dutch pagination, password and validation translations --- resources/lang/nl/pagination.php | 18 ++++ resources/lang/nl/passwords.php | 21 ++++ resources/lang/nl/validation.php | 179 +++++++++++++++++++++++++++++++ 3 files changed, 218 insertions(+) create mode 100644 resources/lang/nl/pagination.php create mode 100644 resources/lang/nl/passwords.php create mode 100644 resources/lang/nl/validation.php diff --git a/resources/lang/nl/pagination.php b/resources/lang/nl/pagination.php new file mode 100644 index 000000000..5be678d50 --- /dev/null +++ b/resources/lang/nl/pagination.php @@ -0,0 +1,18 @@ + '« Vorige', + 'next' => 'Volgende »', +]; diff --git a/resources/lang/nl/passwords.php b/resources/lang/nl/passwords.php new file mode 100644 index 000000000..e4a695308 --- /dev/null +++ b/resources/lang/nl/passwords.php @@ -0,0 +1,21 @@ + 'Wachtwoord moet minimaal zes tekens lang zijn en de wachtwoorden moeten overeenkomen.', + 'reset' => 'Het wachtwoord van uw account is gewijzigd.', + 'sent' => 'We hebben een e-mail verstuurd met instructies om een nieuw wachtwoord in te stellen.', + 'token' => 'Dit wachtwoordhersteltoken is ongeldig of verlopen.', + 'user' => 'Geen gebruiker bekend met het e-mailadres.', +]; diff --git a/resources/lang/nl/validation.php b/resources/lang/nl/validation.php new file mode 100644 index 000000000..e80577d33 --- /dev/null +++ b/resources/lang/nl/validation.php @@ -0,0 +1,179 @@ + ':attribute moet geaccepteerd zijn.', + 'active_url' => ':attribute is geen geldige URL.', + 'after' => ':attribute moet een datum na :date zijn.', + 'after_or_equal' => ':attribute moet een datum na of gelijk aan :date zijn.', + 'alpha' => ':attribute mag alleen letters bevatten.', + 'alpha_dash' => ':attribute mag alleen letters, nummers, underscores (_) en streepjes (-) bevatten.', + 'alpha_num' => ':attribute mag alleen letters en nummers bevatten.', + 'array' => ':attribute moet geselecteerde elementen bevatten.', + 'before' => ':attribute moet een datum voor :date zijn.', + 'before_or_equal' => ':attribute moet een datum voor of gelijk aan :date zijn.', + 'between' => [ + 'numeric' => ':attribute moet tussen :min en :max zijn.', + 'file' => ':attribute moet tussen :min en :max kilobytes zijn.', + 'string' => ':attribute moet tussen :min en :max karakters zijn.', + 'array' => ':attribute moet tussen :min en :max items bevatten.', + ], + 'boolean' => ':attribute moet ja of nee zijn.', + 'confirmed' => ':attribute bevestiging komt niet overeen.', + 'date' => ':attribute moet een datum bevatten.', + 'date_format' => ':attribute moet een geldig datum formaat bevatten.', + 'different' => ':attribute en :other moeten verschillend zijn.', + 'digits' => ':attribute moet bestaan uit :digits cijfers.', + 'digits_between' => ':attribute moet bestaan uit minimaal :min en maximaal :max cijfers.', + 'dimensions' => ':attribute heeft geen geldige afmetingen voor afbeeldingen.', + 'distinct' => ':attribute heeft een dubbele waarde.', + 'email' => ':attribute is geen geldig e-mailadres.', + 'exists' => ':attribute bestaat niet.', + 'file' => ':attribute moet een bestand zijn.', + 'filled' => ':attribute is verplicht.', + 'gt' => [ + 'numeric' => 'De :attribute moet groter zijn dan :value.', + 'file' => 'De :attribute moet groter zijn dan :value kilobytes.', + 'string' => 'De :attribute moet meer dan :value tekens bevatten.', + 'array' => 'De :attribute moet meer dan :value waardes bevatten.', + ], + 'gte' => [ + 'numeric' => 'De :attribute moet groter of gelijk zijn aan :value.', + 'file' => 'De :attribute moet groter of gelijk zijn aan :value kilobytes.', + 'string' => 'De :attribute moet minimaal :value tekens bevatten.', + 'array' => 'De :attribute moet :value waardes of meer bevatten.', + ], + 'image' => ':attribute moet een afbeelding zijn.', + 'in' => ':attribute is ongeldig.', + 'in_array' => ':attribute bestaat niet in :other.', + 'integer' => ':attribute moet een getal zijn.', + 'ip' => ':attribute moet een geldig IP-adres zijn.', + 'ipv4' => ':attribute moet een geldig IPv4-adres zijn.', + 'ipv6' => ':attribute moet een geldig IPv6-adres zijn.', + 'json' => ':attribute moet een geldige JSON-string zijn.', + 'lt' => [ + 'numeric' => 'De :attribute moet kleiner zijn dan :value.', + 'file' => 'De :attribute moet kleiner zijn dan :value kilobytes.', + 'string' => 'De :attribute moet minder dan :value tekens bevatten.', + 'array' => 'De :attribute moet minder dan :value waardes bevatten.', + ], + 'lte' => [ + 'numeric' => 'De :attribute moet kleiner of gelijk zijn aan :value.', + 'file' => 'De :attribute moet kleiner of gelijk zijn aan :value kilobytes.', + 'string' => 'De :attribute moet maximaal :value tekens bevatten.', + 'array' => 'De :attribute moet :value waardes of minder bevatten.', + ], + 'max' => [ + 'numeric' => ':attribute mag niet hoger dan :max zijn.', + 'file' => ':attribute mag niet meer dan :max kilobytes zijn.', + 'string' => ':attribute mag niet uit meer dan :max tekens bestaan.', + 'array' => ':attribute mag niet meer dan :max items bevatten.', + ], + 'mimes' => ':attribute moet een bestand zijn van het bestandstype :values.', + 'mimetypes' => ':attribute moet een bestand zijn van het bestandstype :values.', + 'min' => [ + 'numeric' => ':attribute moet minimaal :min zijn.', + 'file' => ':attribute moet minimaal :min kilobytes zijn.', + 'string' => ':attribute moet minimaal :min tekens zijn.', + 'array' => ':attribute moet minimaal :min items bevatten.', + ], + 'not_in' => 'Het formaat van :attribute is ongeldig.', + 'not_regex' => 'De :attribute formaat is ongeldig.', + 'numeric' => ':attribute moet een nummer zijn.', + 'present' => ':attribute moet bestaan.', + 'regex' => ':attribute formaat is ongeldig.', + 'required' => ':attribute is verplicht.', + 'required_if' => ':attribute is verplicht indien :other gelijk is aan :value.', + 'required_unless' => ':attribute is verplicht tenzij :other gelijk is aan :values.', + 'required_with' => ':attribute is verplicht i.c.m. :values', + 'required_with_all' => ':attribute is verplicht i.c.m. :values', + 'required_without' => ':attribute is verplicht als :values niet ingevuld is.', + 'required_without_all' => ':attribute is verplicht als :values niet ingevuld zijn.', + 'same' => ':attribute en :other moeten overeenkomen.', + 'size' => [ + 'numeric' => ':attribute moet :size zijn.', + 'file' => ':attribute moet :size kilobyte zijn.', + 'string' => ':attribute moet :size tekens zijn.', + 'array' => ':attribute moet :size items bevatten.', + ], + 'starts_with' => ':attribute moet starten met een van de volgende: :values', + 'string' => ':attribute moet een tekst zijn.', + 'timezone' => ':attribute moet een geldige tijdzone zijn.', + 'unique' => ':attribute is al in gebruik.', + 'uploaded' => 'Het uploaden van :attribute is mislukt.', + 'url' => ':attribute moet een geldig URL zijn.', + 'uuid' => ':attribute moet een geldig UUID zijn.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [ + 'address' => 'adres', + 'age' => 'leeftijd', + 'available' => 'beschikbaar', + 'city' => 'stad', + 'content' => 'inhoud', + 'country' => 'land', + 'date' => 'datum', + 'day' => 'dag', + 'description' => 'omschrijving', + 'email' => 'e-mailadres', + 'excerpt' => 'uittreksel', + 'first_name' => 'voornaam', + 'gender' => 'geslacht', + 'hour' => 'uur', + 'last_name' => 'achternaam', + 'message' => 'boodschap', + 'minute' => 'minuut', + 'mobile' => 'mobiel', + 'month' => 'maand', + 'name' => 'naam', + 'password' => 'wachtwoord', + 'password_confirmation' => 'wachtwoordbevestiging', + 'phone' => 'telefoonnummer', + 'second' => 'seconde', + 'sex' => 'geslacht', + 'size' => 'grootte', + 'subject' => 'onderwerp', + 'time' => 'tijd', + 'title' => 'titel', + 'username' => 'gebruikersnaam', + 'year' => 'jaar', + ], +]; From 01884e09c0fe469bb051af3de4ffaa5ab7205ecf Mon Sep 17 00:00:00 2001 From: rahulshukla-home Date: Fri, 22 May 2020 13:12:36 +0530 Subject: [PATCH 243/256] Issue #3089 fixed --- .../views/shop/products/view/gallery.blade.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/view/gallery.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/view/gallery.blade.php index 51a5d3605..7441b576c 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/view/gallery.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/view/gallery.blade.php @@ -86,10 +86,12 @@ watch: { 'images': function(newVal, oldVal) { - this.changeImage({ - largeImageUrl: this.images[0]['large_image_url'], - originalImageUrl: this.images[0]['original_image_url'], - }) + if (this.images[0]) { + this.changeImage({ + largeImageUrl: this.images[0]['large_image_url'], + originalImageUrl: this.images[0]['original_image_url'], + }) + } this.prepareThumbs() } From 764df6150957388f917ff6d33025b5241e57e63f Mon Sep 17 00:00:00 2001 From: Steffen Mahler Date: Fri, 22 May 2020 09:57:34 +0200 Subject: [PATCH 244/256] trigger pipeline again --- .../Shop/src/Resources/views/emails/sales/new-order.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php index 443d73f22..eb148b2b3 100755 --- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php @@ -75,7 +75,7 @@
      {{ $order->billing_address->company_name ?? '' }}
      - +
      {{ $order->billing_address->name }}
      From f42974f9e8ef51a8e66108f8c8b536ae202d6d7a Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Fri, 22 May 2020 11:50:17 +0200 Subject: [PATCH 245/256] revert changes, add flag to config --- package.json | 2 +- .../products/accordians/booking.blade.php | 4 +- .../assets/js/components/datetime.vue | 67 +------------------ 3 files changed, 5 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index dc5c0e6c3..908049f86 100755 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^0.18", "bootstrap": "^4.0.0", "cross-env": "^5.1", - "jquery": "^3.2", + "jquery": "^3.5.1", "laravel-mix": "^5.0.1", "lodash": "^4.17.4", "popper.js": "^1.12", diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 4aa80faf9..14818eaa5 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -61,7 +61,7 @@ - + @{{ errors.first('booking[available_from]') }} @@ -71,7 +71,7 @@ - + @{{ errors.first('booking[available_to]') }} diff --git a/packages/Webkul/Ui/src/Resources/assets/js/components/datetime.vue b/packages/Webkul/Ui/src/Resources/assets/js/components/datetime.vue index d5691abe9..db2bda678 100755 --- a/packages/Webkul/Ui/src/Resources/assets/js/components/datetime.vue +++ b/packages/Webkul/Ui/src/Resources/assets/js/components/datetime.vue @@ -22,68 +22,7 @@ }, created() { - function splitDateTime(value) { - let dateTimeParts = value.split(' ') - let dateParts = dateTimeParts[0].split('-') - let timeParts = dateTimeParts[1].split(':') - return { - "year": dateParts[0], - "month": dateParts[1], - "day": dateParts[2], - "hour": timeParts[0], - "minute": timeParts[1], - } - } - - function validateDate(value) { - let valueDate = new Date(value) - if (valueDate.getTime() !== valueDate.getTime()) { - return false - } - - let inputValue = splitDateTime(value) - - if (inputValue.year.length !== 4 - || inputValue.month.length !== 2 - || inputValue.day.length !== 2 - || inputValue.hour.length !== 2 - || inputValue.minute.length !== 2 - ) { - return false - } - - if (inputValue.month.parseInt < 1 || inputValue.month.parseInt > 12) { - return false - } - - let daysPerMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] - if ((!(inputValue.year.parseInt % 4) && inputValue.year.parseInt % 100) || !(inputValue.year.parseInt % 400)) { - daysPerMonth[1] = 29 // it is a leap year - } - - if (inputValue.day > daysPerMonth[inputValue.month - 1]) { - return false - } - - if (inputValue.hour.parseInt < 0 || inputValue.hour.parseInt > 23) { - return false - } - - if (inputValue.minute.parseInt < 0 || inputValue.hour.parseInt > 59) { - return false - } - return true - } - - this.$validator.extend('date_format_rule', { - getMessage(field, val) { - return 'The date must be in the format yyyy-MM-dd HH:ii:ss.' - }, - validate(value, field) { - return validateDate(value) - } - }) }, mounted() { @@ -95,13 +34,11 @@ altFormat: "Y-m-d H:i:S", dateFormat: "Y-m-d H:i:S", enableTime: true, - enableSeconds: true, + time_24hr: true, onChange: function (selectedDates, dateStr, instance) { this_this.$emit('onChange', dateStr) }, }); - }, - - methods: {} + } }; \ No newline at end of file From 5a7ec123c743b150cb16e4d9804a2034a705b8af Mon Sep 17 00:00:00 2001 From: Steffen Mahler Date: Fri, 22 May 2020 12:02:33 +0200 Subject: [PATCH 246/256] fix typo --- .../Resources/views/checkout/onepage/customer-info.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php index c5611fcd6..40fbcba67 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php @@ -17,7 +17,7 @@
        -
      • +
      • @{{ addresses.company_name }}
      • @@ -273,7 +273,7 @@
          -
        • +
        • @{{ addresses.company_name }}
        • From 5363b5645f5d3c294f878a2daf741274d306a39b Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Fri, 22 May 2020 12:09:19 +0200 Subject: [PATCH 247/256] revert changes --- package.json | 2 +- .../products/accordians/booking.blade.php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 908049f86..dc5c0e6c3 100755 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^0.18", "bootstrap": "^4.0.0", "cross-env": "^5.1", - "jquery": "^3.5.1", + "jquery": "^3.2", "laravel-mix": "^5.0.1", "lodash": "^4.17.4", "popper.js": "^1.12", diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 14818eaa5..6965cde5e 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -1,3 +1,25 @@ +@section('css') + +@stop + {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.before', ['product' => $product]) !!} From 8a51417425012f173587d24b6d171da02a300825 Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Fri, 22 May 2020 12:12:40 +0200 Subject: [PATCH 248/256] revert changes --- .../products/accordians/booking.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 6965cde5e..3bca1b92f 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -4,7 +4,7 @@ margin-top: -13px; left: 100%; } - + .has-control-group .control-group { width: 50%; float: left; @@ -50,20 +50,20 @@ - + @{{ errors.first('booking[type]') }}
    - +
    - +
    - + @{{ errors.first('booking[qty]') }}
    @@ -74,7 +74,7 @@ - + @{{ errors.first('booking[available_every_week]') }}
@@ -85,7 +85,7 @@ - + @{{ errors.first('booking[available_from]') }} @@ -95,7 +95,7 @@ - + @{{ errors.first('booking[available_to]') }} From 11fb120b5179f312430ecbd0ed748f89c315a4be Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Mon, 25 May 2020 08:31:12 +0200 Subject: [PATCH 249/256] adjust cart rule filter position a few pixels to align it as it is in products/index.blade.php --- .../views/promotions/cart-rules/index.blade.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php index 556a605bf..e11bed522 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php @@ -11,11 +11,10 @@