From 029b77df233f63e9987975518e80b541fdc4c62a Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Mon, 4 Oct 2021 11:30:32 +0300 Subject: [PATCH 01/18] - Refactoring to Laravel 8 Class Model Factories. --- composer.json | 1 - composer.lock | 60 +----- database/factories/UserFactory.php | 12 +- .../Database/Factories/AttributeFactory.php | 190 +++++++++++------ .../Factories/AttributeFamilyFactory.php | 39 +++- .../Factories/AttributeOptionFactory.php | 95 ++------- .../Webkul/Attribute/src/Models/Attribute.php | 29 ++- .../Providers/AttributeServiceProvider.php | 9 +- .../BookingProductEventTicketFactory.php | 38 +++- .../Factories/BookingProductFactory.php | 44 ++-- .../src/Models/BookingProduct.php | 34 ++- .../src/Models/BookingProductEventTicket.php | 21 +- .../BookingProductServiceProvider.php | 19 +- .../Webkul/CartRule/src/Models/CartRule.php | 24 ++- .../CartRule/src/Models/CartRuleCoupon.php | 18 +- .../Database/Factories/CategoryFactory.php | 68 +++++- .../Webkul/Category/src/Models/Category.php | 59 ++++-- .../src/Providers/CategoryServiceProvider.php | 18 +- .../Database/Factories/CartAddressFactory.php | 38 +++- .../src/Database/Factories/CartFactory.php | 80 ++++--- .../Database/Factories/CartItemFactory.php | 73 ++++--- .../Database/Factories/CartPaymentFactory.php | 36 +++- packages/Webkul/Checkout/src/Models/Cart.php | 77 ++++--- .../Checkout/src/Models/CartAddress.php | 30 ++- .../Webkul/Checkout/src/Models/CartItem.php | 43 ++-- .../Checkout/src/Models/CartPayment.php | 16 ++ .../src/Providers/CheckoutServiceProvider.php | 27 +-- .../Factories/CartRuleCouponFactory.php | 45 ++-- .../Database/Factories/CartRuleFactory.php | 69 +++--- .../src/Database/Factories/ChannelFactory.php | 63 +++--- .../ChannelInventorySourceFactory.php | 34 ++- .../Database/Factories/CurrencyFactory.php | 32 ++- .../src/Database/Factories/LocaleFactory.php | 60 ++++-- .../Factories/SubscriberListFactory.php | 37 +++- packages/Webkul/Core/src/Models/Address.php | 49 +++-- packages/Webkul/Core/src/Models/Channel.php | 34 ++- packages/Webkul/Core/src/Models/Currency.php | 24 ++- packages/Webkul/Core/src/Models/Locale.php | 16 ++ .../Core/src/Models/SubscribersList.php | 19 +- .../src/Providers/CoreServiceProvider.php | 43 ++-- .../Factories/CustomerAddressFactory.php | 66 ++++-- .../Database/Factories/CustomerFactory.php | 91 +++++--- .../Factories/CustomerGroupFactory.php | 41 +++- .../Webkul/Customer/src/Models/Customer.php | 87 +++++--- .../Customer/src/Models/CustomerAddress.php | 18 +- .../Customer/src/Models/CustomerGroup.php | 27 ++- .../src/Providers/CustomerServiceProvider.php | 34 +-- .../Factories/InventorySourceFactory.php | 68 +++--- .../Inventory/src/Models/InventorySource.php | 16 ++ .../Providers/InventoryServiceProvider.php | 11 +- .../ProductAttributeValueFactory.php | 38 +++- .../ProductDownloadableLinkFactory.php | 64 +++--- .../ProductDownloadableLinkTranslation.php | 17 -- ...ductDownloadableLinkTranslationFactory.php | 33 +++ .../src/Database/Factories/ProductFactory.php | 86 ++++++-- .../Factories/ProductInventoryFactory.php | 40 ++-- .../Factories/ProductReviewFactory.php | 41 ++-- .../Webkul/Product/src/Models/Product.php | 200 +++++++++++------- .../src/Models/ProductAttributeValue.php | 21 +- .../src/Models/ProductDownloadableLink.php | 30 ++- .../ProductDownloadableLinkTranslation.php | 16 ++ .../Product/src/Models/ProductInventory.php | 21 +- .../Product/src/Models/ProductReview.php | 24 ++- .../src/Providers/ProductServiceProvider.php | 38 ++-- .../Factories/InventorySourceFactory.php | 26 --- .../src/Database/Factories/InvoiceFactory.php | 129 +++++++---- .../Database/Factories/InvoiceItemFactory.php | 73 ++++--- .../Factories/OrderAddressFactory.php | 76 +++++-- .../src/Database/Factories/OrderFactory.php | 148 ++++++++----- .../Database/Factories/OrderItemFactory.php | 85 +++++--- .../Factories/OrderPaymentFactory.php | 32 ++- .../src/Database/Factories/RefundFactory.php | 34 ++- .../Database/Factories/ShipmentFactory.php | 43 ++-- packages/Webkul/Sales/src/Models/Invoice.php | 41 +++- .../Webkul/Sales/src/Models/InvoiceItem.php | 41 +++- packages/Webkul/Sales/src/Models/Order.php | 85 +++++--- .../Webkul/Sales/src/Models/OrderAddress.php | 27 ++- .../Webkul/Sales/src/Models/OrderItem.php | 67 +++--- .../Webkul/Sales/src/Models/OrderPayment.php | 18 +- packages/Webkul/Sales/src/Models/Refund.php | 38 +++- packages/Webkul/Sales/src/Models/Shipment.php | 31 ++- .../src/Providers/SalesServiceProvider.php | 27 +-- .../Database/Factories/TaxCategoryFactory.php | 36 +++- .../src/Database/Factories/TaxMapFactory.php | 39 ++-- .../src/Database/Factories/TaxRateFactory.php | 46 ++-- .../Webkul/Tax/src/Models/TaxCategory.php | 28 ++- packages/Webkul/Tax/src/Models/TaxMap.php | 14 ++ packages/Webkul/Tax/src/Models/TaxRate.php | 17 +- 88 files changed, 2677 insertions(+), 1375 deletions(-) delete mode 100644 packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslation.php create mode 100644 packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php delete mode 100644 packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php diff --git a/composer.json b/composer.json index 9fec01322..e78a54f53 100755 --- a/composer.json +++ b/composer.json @@ -29,7 +29,6 @@ "khaled.alshamaa/ar-php": "^6.0.0", "konekt/concord": "^1.2", "laravel/framework": "^8.0", - "laravel/legacy-factories": "^1.1", "laravel/scout": "^8.0", "laravel/socialite": "^5.0", "laravel/tinker": "^2.0", diff --git a/composer.lock b/composer.lock index cbe5fd3c3..3189b4011 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": "ad18338e686e8f7ba9eaf04d9bfa2374", + "content-hash": "487d5fda315fc77479141cb31da7a32c", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -3061,62 +3061,6 @@ }, "time": "2021-05-11T14:00:02+00:00" }, - { - "name": "laravel/legacy-factories", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/legacy-factories.git", - "reference": "5e3fe2fd5fda64e20ea5c74c831a7346294e902a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/legacy-factories/zipball/5e3fe2fd5fda64e20ea5c74c831a7346294e902a", - "reference": "5e3fe2fd5fda64e20ea5c74c831a7346294e902a", - "shasum": "" - }, - "require": { - "illuminate/macroable": "^8.0", - "php": "^7.3|^8.0", - "symfony/finder": "^3.4|^4.0|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Database\\Eloquent\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The legacy version of the Laravel Eloquent factories.", - "homepage": "http://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2020-10-27T14:25:32+00:00" - }, { "name": "laravel/scout", "version": "v8.6.1", @@ -11594,5 +11538,5 @@ "php": "^7.3|^8.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 467777c5f..72f13b707 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,6 +1,5 @@ define(App\User::class, function (Faker $faker) { - return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, - 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret - 'remember_token' => str_random(10), - ]; -}); \ No newline at end of file +*/ \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php index 507f8bcdf..9682f5761 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php @@ -1,84 +1,144 @@ define(Attribute::class, function (Faker $faker, array $attributes) { - $types = [ - 'text', - 'textarea', - 'price', - 'boolean', - 'select', - 'multiselect', - 'datetime', - 'date', - 'image', - 'file', - 'checkbox', +class AttributeFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Attribute::class; + + /** + * @var array + */ + protected $states = [ + 'validation_numeric', + 'validation_email', + 'validation_decimal', + 'validation_url', + 'required', + 'unique', + 'filterable', + 'configurable', ]; - $locales = Locale::pluck('code')->all(); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $types = [ + 'text', + 'textarea', + 'price', + 'boolean', + 'select', + 'multiselect', + 'datetime', + 'date', + 'image', + 'file', + 'checkbox', + ]; - // array $attributes does not contain any locale code - if (count(array_diff_key(array_flip($locales), $attributes) ) === count($locales)) { - $localeCode = $locales[0]; - - $attributes[$localeCode] = [ - 'name' => $faker->word, + return [ + 'admin_name' => $this->faker->word, + 'code' => $this->faker->word, + 'type' => array_rand($types), + 'validation' => '', + 'position' => $this->faker->randomDigit, + 'is_required' => false, + 'is_unique' => false, + 'value_per_locale' => false, + 'value_per_channel' => false, + 'is_filterable' => false, + 'is_configurable' => false, + 'is_user_defined' => true, + 'is_visible_on_front' => true, + 'swatch_type' => null, + 'use_in_flat' => true, ]; } - return [ - 'admin_name' => $faker->word, - 'code' => $faker->word, - 'type' => array_rand($types), - 'validation' => '', - 'position' => $faker->randomDigit, - 'is_required' => false, - 'is_unique' => false, - 'value_per_locale' => false, - 'value_per_channel' => false, - 'is_filterable' => false, - 'is_configurable' => false, - 'is_user_defined' => true, - 'is_visible_on_front' => true, - 'swatch_type' => null, - 'use_in_flat' => true, - ]; -}); + public function validation_numeric(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'validation' => 'numeric', + ]; + }); + } -$factory->state(Attribute::class, 'validation_numeric', [ - 'validation' => 'numeric', -]); + public function validation_email(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'validation' => 'email', + ]; + }); + } -$factory->state(Attribute::class, 'validation_email', [ - 'validation' => 'email', -]); + public function validation_decimal(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'validation' => 'decimal', + ]; + }); + } -$factory->state(Attribute::class, 'validation_decimal', [ - 'validation' => 'decimal', -]); + public function validation_url(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'validation' => 'url', + ]; + }); + } -$factory->state(Attribute::class, 'validation_url', [ - 'validation' => 'url', -]); + public function required(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'is_required' => true, + ]; + }); + } -$factory->state(Attribute::class, 'required', [ - 'is_required' => true, -]); + public function unique(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'is_unique' => true, + ]; + }); + } -$factory->state(Attribute::class, 'unique', [ - 'is_unique' => true, -]); + public function filterable(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'is_filterable' => true, + ]; + }); + } -$factory->state(Attribute::class, 'filterable', [ - 'is_filterable' => true, -]); + public function configurable(): AttributeFactory + { + return $this->state(function (array $attributes) { + return [ + 'is_configurable' => true, + ]; + }); + } -$factory->state(Attribute::class, 'configurable', [ - 'is_configurable' => true, -]); \ No newline at end of file +} diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php index bf4eb0fc5..caaa05ecb 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php @@ -1,15 +1,34 @@ define(AttributeFamily::class, function (Faker $faker) { - return [ - 'name' => $faker->word(), - 'code' => $faker->word(), - 'is_user_defined' => rand(0, 1), - 'status' => 0, - ]; -}); +class AttributeFamilyFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = AttributeFamily::class; + + /** + * Define the model's default state. + * + * @return array + * @throws \Exception + */ + public function definition(): array + { + return [ + 'name' => $this->faker->word(), + 'code' => $this->faker->word(), + 'is_user_defined' => random_int(0, 1), + 'status' => 0, + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php index 963717b79..94b848922 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php @@ -1,83 +1,34 @@ define(AttributeOption::class, function (Faker $faker, array $attributes) { +class AttributeOptionFactory extends Factory +{ - $locales = Locale::pluck('code')->all(); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = AttributeOption::class; - // array $attributes does not contain any locale code - if (count(array_diff_key(array_flip($locales), $attributes) ) === count($locales)) { - $localeCode = $locales[0]; - - $attributes[$localeCode] = [ - 'label' => $faker->word, + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'admin_name' => $this->faker->word, + 'sort_order' => $this->faker->randomDigit, + 'attribute_id' => Attribute::factory(['swatch_type' => 'text']), + 'swatch_value' => null, ]; } - return [ - 'admin_name' => $faker->word, - 'sort_order' => $faker->randomDigit, - 'attribute_id' => function () { - return factory(Attribute::class)->create()->id; - }, - 'swatch_value' => null, - ]; -}); - -$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { - return [ - 'admin_name' => $faker->word, - 'sort_order' => $faker->randomDigit, - 'attribute_id' => function () { - return factory(Attribute::class) - ->create(['swatch_type' => 'color']) - ->id; - }, - 'swatch_value' => $faker->hexColor, - ]; -}); - -$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { - return [ - 'admin_name' => $faker->word, - 'sort_order' => $faker->randomDigit, - 'attribute_id' => function () { - return factory(Attribute::class) - ->create(['swatch_type' => 'image']) - ->id; - }, - 'swatch_value' => '/tests/_data/ProductImageExampleForUpload.jpg', - ]; -}); - -$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { - return [ - 'admin_name' => $faker->word, - 'sort_order' => $faker->randomDigit, - 'attribute_id' => function () { - return factory(Attribute::class) - ->create(['swatch_type' => 'dropdown']) - ->id; - }, - 'swatch_value' => null, - ]; -}); - -$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { - return [ - 'admin_name' => $faker->word, - 'sort_order' => $faker->randomDigit, - 'attribute_id' => function () { - return factory(Attribute::class) - ->create(['swatch_type' => 'text']) - ->id; - }, - 'swatch_value' => null, - ]; -}); \ No newline at end of file +} \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/Attribute.php b/packages/Webkul/Attribute/src/Models/Attribute.php index 73cdfb403..43ea1be24 100755 --- a/packages/Webkul/Attribute/src/Models/Attribute.php +++ b/packages/Webkul/Attribute/src/Models/Attribute.php @@ -2,11 +2,18 @@ namespace Webkul\Attribute\Models; +use Illuminate\Database\Eloquent\Builder; use Webkul\Core\Eloquent\TranslatableModel; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Attribute\Database\Factories\AttributeFactory; use Webkul\Attribute\Contracts\Attribute as AttributeContract; class Attribute extends TranslatableModel implements AttributeContract { + + use HasFactory; + public $translatedAttributes = ['name']; protected $fillable = [ @@ -33,7 +40,7 @@ class Attribute extends TranslatableModel implements AttributeContract /** * Get the options. */ - public function options() + public function options(): HasMany { return $this->hasMany(AttributeOptionProxy::modelClass()); } @@ -41,11 +48,25 @@ class Attribute extends TranslatableModel implements AttributeContract /** * Scope a query to only include popular users. * - * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $query + * * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeFilterableAttributes($query) + public function scopeFilterableAttributes(Builder $query): Builder { - return $query->where('is_filterable', 1)->where('swatch_type', '<>', 'image')->orderBy('position'); + return $query->where('is_filterable', 1) + ->where('swatch_type', '<>', 'image') + ->orderBy('position'); } + + /** + * Create a new factory instance for the model + * + * @return AttributeFactory + */ + protected static function newFactory(): AttributeFactory + { + return AttributeFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php index 6fa64e726..17a639e61 100755 --- a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php +++ b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php @@ -2,20 +2,19 @@ namespace Webkul\Attribute\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; class AttributeServiceProvider extends ServiceProvider { + /** * Bootstrap services. * * @return void */ - public function boot() + public function boot(): void { - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - - $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); } + } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php index 608dd477d..584be0ac1 100644 --- a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php @@ -1,17 +1,33 @@ define(BookingProductEventTicket::class, static function (Faker $faker, array $attributes) { - return [ - 'price' => $faker->randomFloat(4, 3, 900), - 'qty' => $faker->numberBetween(100, 1000), - 'booking_product_id' => static function () { - return factory(BookingProduct::class)->create(['type' => 'event'])->id; - } - ]; -}); \ No newline at end of file +class BookingProductEventTicketFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = BookingProductEventTicket::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'price' => $this->faker->randomFloat(4, 3, 900), + 'qty' => $this->faker->numberBetween(100, 1000), + 'booking_product_id' => BookingProduct::factory(), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php index 738d0e8a3..13edec3b5 100644 --- a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php @@ -1,22 +1,38 @@ define(BookingProduct::class, function (Faker $faker, array $attributes) { - $bookingTypes = ['event']; +class BookingProductFactory extends Factory +{ - return [ - 'type' => $bookingTypes[array_rand(['event'])], - 'qty' => $faker->randomNumber(2), - 'available_from' => Carbon::yesterday(), - 'available_to' => Carbon::tomorrow(), - 'product_id' => function () { - return factory(Product::class)->create(['type' => 'booking'])->id; - } - ]; -}); \ No newline at end of file + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = BookingProduct::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $bookingTypes = ['event']; + + return [ + 'type' => $bookingTypes[array_rand(['event'])], + 'qty' => $this->faker->randomNumber(2), + 'available_from' => Carbon::yesterday(), + 'available_to' => Carbon::tomorrow(), + 'product_id' => Product::factory(['type' => 'booking']), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProduct.php b/packages/Webkul/BookingProduct/src/Models/BookingProduct.php index 287247fcf..a1cc69704 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProduct.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProduct.php @@ -4,10 +4,15 @@ namespace Webkul\BookingProduct\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Product\Models\ProductProxy; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\BookingProduct\Database\Factories\BookingProductFactory; use Webkul\BookingProduct\Contracts\BookingProduct as BookingProductContract; class BookingProduct extends Model implements BookingProductContract { + + use HasFactory; + protected $fillable = [ 'location', 'show_location', @@ -19,7 +24,13 @@ class BookingProduct extends Model implements BookingProductContract 'product_id', ]; - protected $with = ['default_slot', 'appointment_slot', 'event_tickets', 'rental_slot', 'table_slot']; + protected $with = [ + 'default_slot', + 'appointment_slot', + 'event_tickets', + 'rental_slot', + 'table_slot', + ]; protected $casts = [ 'available_from' => 'datetime', @@ -29,7 +40,7 @@ class BookingProduct extends Model implements BookingProductContract /** * The Product Default Booking that belong to the product booking. */ - public function default_slot() + public function default_slot(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(BookingProductDefaultSlotProxy::modelClass()); } @@ -37,7 +48,7 @@ class BookingProduct extends Model implements BookingProductContract /** * The Product Appointment Booking that belong to the product booking. */ - public function appointment_slot() + public function appointment_slot(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(BookingProductAppointmentSlotProxy::modelClass()); } @@ -45,7 +56,7 @@ class BookingProduct extends Model implements BookingProductContract /** * The Product Event Booking that belong to the product booking. */ - public function event_tickets() + public function event_tickets(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(BookingProductEventTicketProxy::modelClass()); } @@ -53,7 +64,7 @@ class BookingProduct extends Model implements BookingProductContract /** * The Product Rental Booking that belong to the product booking. */ - public function rental_slot() + public function rental_slot(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(BookingProductRentalSlotProxy::modelClass()); } @@ -61,8 +72,19 @@ class BookingProduct extends Model implements BookingProductContract /** * The Product Table Booking that belong to the product booking. */ - public function table_slot() + public function table_slot(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(BookingProductTableSlotProxy::modelClass()); } + + /** + * Create a new factory instance for the model. + * + * @return BookingProductFactory + */ + protected static function newFactory(): BookingProductFactory + { + return BookingProductFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php index ec35a5788..ad364ce4d 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php @@ -3,13 +3,21 @@ namespace Webkul\BookingProduct\Models; use Webkul\Core\Eloquent\TranslatableModel; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\BookingProduct\Database\Factories\BookingProductEventTicketFactory; use Webkul\BookingProduct\Contracts\BookingProductEventTicket as BookingProductEventTicketContract; class BookingProductEventTicket extends TranslatableModel implements BookingProductEventTicketContract { + + use HasFactory; + public $timestamps = false; - public $translatedAttributes = ['name', 'description']; + public $translatedAttributes = [ + 'name', + 'description', + ]; protected $fillable = [ 'price', @@ -19,4 +27,15 @@ class BookingProductEventTicket extends TranslatableModel implements BookingProd 'special_price_to', 'booking_product_id', ]; + + /** + * Create a new factory instance for the model. + * + * @return BookingProductEventTicketFactory + */ + protected static function newFactory(): BookingProductEventTicketFactory + { + return BookingProductEventTicketFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php index b31d28d7f..c816bdf3e 100644 --- a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php +++ b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php @@ -2,11 +2,11 @@ namespace Webkul\BookingProduct\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; class BookingProductServiceProvider extends ServiceProvider { + /** * Bootstrap services. * @@ -15,21 +15,19 @@ class BookingProductServiceProvider extends ServiceProvider */ public function boot(): void { - $this->loadRoutesFrom(__DIR__ . '/../Http/front-routes.php'); + $this->loadRoutesFrom(__DIR__.'/../Http/front-routes.php'); - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'bookingproduct'); + $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'bookingproduct'); - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'bookingproduct'); + $this->loadViewsFrom(__DIR__.'/../Resources/views', 'bookingproduct'); $this->publishes([ - __DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'), + __DIR__.'/../../publishable/assets' => public_path('themes/default/assets'), ], 'public'); $this->app->register(EventServiceProvider::class); - - $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); } /** @@ -39,8 +37,7 @@ class BookingProductServiceProvider extends ServiceProvider */ public function register(): void { - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/product_types.php', 'product_types' - ); + $this->mergeConfigFrom(dirname(__DIR__).'/Config/product_types.php', 'product_types'); } + } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRule.php b/packages/Webkul/CartRule/src/Models/CartRule.php index 23a6af933..ac2c9f9ba 100644 --- a/packages/Webkul/CartRule/src/Models/CartRule.php +++ b/packages/Webkul/CartRule/src/Models/CartRule.php @@ -3,12 +3,17 @@ namespace Webkul\CartRule\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\CartRule\Database\Factories\CartRuleFactory; use Webkul\CartRule\Contracts\CartRule as CartRuleContract; use Webkul\Core\Models\ChannelProxy; use Webkul\Customer\Models\CustomerGroupProxy; class CartRule extends Model implements CartRuleContract { + + use HasFactory; + protected $fillable = [ 'name', 'description', @@ -105,7 +110,8 @@ class CartRule extends Model implements CartRuleContract */ public function coupon_code(): \Illuminate\Database\Eloquent\Relations\HasOne { - return $this->cart_rule_coupon()->where('is_primary', 1); + return $this->cart_rule_coupon() + ->where('is_primary', 1); } /** @@ -115,12 +121,24 @@ class CartRule extends Model implements CartRuleContract */ public function getCouponCodeAttribute() { - $coupon = $this->coupon_code()->first(); + $coupon = $this->coupon_code() + ->first(); - if (! $coupon) { + if (!$coupon) { return; } return $coupon->code; } + + /** + * Create a new factory instance for the model. + * + * @return CartRuleFactory + */ + protected static function newFactory(): CartRuleFactory + { + return CartRuleFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php index d072f1ee4..01a5f02f7 100644 --- a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php +++ b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php @@ -3,10 +3,15 @@ namespace Webkul\CartRule\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\CartRule\Database\Factories\CartRuleCouponFactory; use Webkul\CartRule\Contracts\CartRuleCoupon as CartRuleCouponContract; class CartRuleCoupon extends Model implements CartRuleCouponContract { + use HasFactory; + protected $fillable = [ 'code', 'usage_limit', @@ -21,8 +26,19 @@ class CartRuleCoupon extends Model implements CartRuleCouponContract /** * Get the cart rule that owns the cart rule coupon. */ - public function cart_rule() + public function cart_rule(): BelongsTo { return $this->belongsTo(CartRuleProxy::modelClass()); } + + /** + * Create a new factory instance for the model + * + * @return CartRuleCouponFactory + */ + protected static function newFactory(): CartRuleCouponFactory + { + return CartRuleCouponFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php index 359cae23c..79ecddbb9 100644 --- a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php +++ b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php @@ -1,18 +1,64 @@ define(Category::class, function (Faker $faker, array $attributes) { +class CategoryFactory extends Factory +{ - return [ - 'status' => 1, - 'position' => $faker->randomDigit, - 'parent_id' => 1, + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Category::class; + + /** + * @var string[] + */ + protected $states = [ + 'inactive', + 'rtl', ]; -}); -$factory->state(Category::class, 'inactive', [ - 'status' => 0, -]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'status' => 1, + 'position' => $this->faker->randomDigit, + 'parent_id' => 1, + ]; + } + + /** + * + */ + public function inactive(): CategoryFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 0, + ]; + }); + } + + /** + * Handle rtl state + */ + public function rtl(): CategoryFactory + { + return $this->state(function (array $attributes) { + return [ + 'direction' => 'rtl', + ]; + }); + } + +} diff --git a/packages/Webkul/Category/src/Models/Category.php b/packages/Webkul/Category/src/Models/Category.php index 7091e0eac..107aa473c 100755 --- a/packages/Webkul/Category/src/Models/Category.php +++ b/packages/Webkul/Category/src/Models/Category.php @@ -5,6 +5,8 @@ namespace Webkul\Category\Models; use Webkul\Core\Eloquent\TranslatableModel; use Kalnoy\Nestedset\NodeTrait; use Illuminate\Support\Facades\Storage; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Category\Database\Factories\CategoryFactory; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Webkul\Category\Contracts\Category as CategoryContract; use Webkul\Attribute\Models\AttributeProxy; @@ -20,7 +22,9 @@ use Webkul\Product\Models\ProductProxy; */ class Category extends TranslatableModel implements CategoryContract { + use NodeTrait; + use HasFactory; public $translatedAttributes = [ 'name', @@ -47,8 +51,9 @@ class Category extends TranslatableModel implements CategoryContract */ public function image_url() { - if (! $this->image) + if (!$this->image) { return; + } return Storage::url($this->image); } @@ -61,14 +66,17 @@ class Category extends TranslatableModel implements CategoryContract return $this->image_url(); } - /** + /** * The filterable attributes that belong to the category. */ public function filterableAttributes() { - return $this->belongsToMany(AttributeProxy::modelClass(), 'category_filterable_attributes')->with(['options' => function($query) { - $query->orderBy('sort_order'); - }]); + return $this->belongsToMany(AttributeProxy::modelClass(), 'category_filterable_attributes') + ->with([ + 'options' => function ($query) { + $query->orderBy('sort_order'); + }, + ]); } /** @@ -79,10 +87,23 @@ class Category extends TranslatableModel implements CategoryContract public function getRootCategory(): Category { return Category::where([ - ['parent_id', '=', null], - ['_lft', '<=', $this->_lft], - ['_rgt', '>=', $this->_rgt], - ])->first(); + [ + 'parent_id', + '=', + null, + ], + [ + '_lft', + '<=', + $this->_lft, + ], + [ + '_rgt', + '>=', + $this->_rgt, + ], + ]) + ->first(); } /** @@ -97,7 +118,7 @@ class Category extends TranslatableModel implements CategoryContract $categories = [$category]; while (isset($category->parent)) { - $category = $category->parent; + $category = $category->parent; $categories[] = $category; } @@ -109,18 +130,19 @@ class Category extends TranslatableModel implements CategoryContract * will search in root category by default * is used to minimize the numbers of sql queries for it only uses the already cached tree * - * @param Category[] $categoryTree + * @param Category[] $categoryTree + * * @return Category */ public function findInTree($categoryTree = null): Category { - if (! $categoryTree) { + if (!$categoryTree) { $categoryTree = app(CategoryRepository::class)->getVisibleCategoryTree($this->getRootCategory()->id); } $category = $categoryTree->first(); - if (! $category) { + if (!$category) { throw new NotFoundHttpException('category not found in tree'); } @@ -138,4 +160,15 @@ class Category extends TranslatableModel implements CategoryContract { return $this->belongsToMany(ProductProxy::modelClass(), 'product_categories'); } + + /** + * Create a new factory instance for the model. + * + * @return CategoryFactory + */ + protected static function newFactory(): CategoryFactory + { + return CategoryFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php index 0af0c484b..c4905e07c 100755 --- a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php +++ b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php @@ -2,35 +2,23 @@ namespace Webkul\Category\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; use Webkul\Category\Models\CategoryProxy; use Webkul\Category\Observers\CategoryObserver; class CategoryServiceProvider extends ServiceProvider { + /** * Bootstrap services. * * @return void */ - public function boot() + public function boot(): void { - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); CategoryProxy::observe(CategoryObserver::class); - - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); } - /** - * Register factories. - * - * @param string $path - * @return void - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php index c78b813e7..d83dcdf9a 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php @@ -1,15 +1,33 @@ define(CartAddress::class, function (Faker $faker) { - return [ - 'first_name' => $faker->firstName(), - 'last_name' => $faker->lastName, - 'email' => $faker->email, - 'address_type' => CartAddress::ADDRESS_TYPE_BILLING, - ]; -}); +class CartAddressFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CartAddress::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName, + 'email' => $this->faker->email, + 'address_type' => CartAddress::ADDRESS_TYPE_BILLING, + ]; + } + +} diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php index 394c543c9..ee99e724f 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php @@ -1,41 +1,61 @@ define(Cart::class, function (Faker $faker) { - $now = date("Y-m-d H:i:s"); +class CartFactory extends Factory +{ - $lastOrder = DB::table('orders') - ->orderBy('id', 'desc') - ->select('id') - ->first(); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Cart::class; - $customer = factory(Customer::class)->create(); - $cartAddress = factory(CartAddress::class)->create(); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + + $lastOrder = DB::table('orders') + ->orderBy('id', 'desc') + ->select('id') + ->first(); + + $customer = Customer::factory() + ->create(); + $cartAddress = CartAddress::factory() + ->create(); + + return [ + 'is_guest' => 0, + 'is_active' => 1, + 'customer_id' => $customer->id, + 'customer_email' => $customer->email, + 'customer_first_name' => $customer->first_name, + 'customer_last_name' => $customer->last_name, + 'is_gift' => 0, + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'grand_total' => 0.0000, + 'base_grand_total' => 0.0000, + 'sub_total' => 0.0000, + 'base_sub_total' => 0.0000, + 'channel_id' => 1, + 'created_at' => $now, + 'updated_at' => $now, + ]; + } + +} - return [ - 'is_guest' => 0, - 'is_active' => 1, - 'customer_id' => $customer->id, - 'customer_email' => $customer->email, - 'customer_first_name' => $customer->first_name, - 'customer_last_name' => $customer->last_name, - 'is_gift' => 0, - 'base_currency_code' => 'EUR', - 'channel_currency_code' => 'EUR', - 'grand_total' => 0.0000, - 'base_grand_total' => 0.0000, - 'sub_total' => 0.0000, - 'base_sub_total' => 0.0000, - 'channel_id' => 1, - 'created_at' => $now, - 'updated_at' => $now, - ]; -}); diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php index c43f66dbd..c20838dd2 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php @@ -1,38 +1,57 @@ define(CartItem::class, function (Faker $faker, array $attributes) { - $now = date("Y-m-d H:i:s"); +class CartItemFactory extends Factory +{ - if (isset($attributes['product_id'])) { - $product = Product::where('id', $attributes['product_id'])->first(); - } else { - $product = factory(Product::class)->create(); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CartItem::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + + if (isset($attributes['product_id'])) { + $product = Product::query() + ->where('id', $attributes['product_id']) + ->first(); + } else { + $product = Product::factory() + ->create(); + } + + $fallbackPrice = $this->faker->randomFloat(4, 0, 1000); + + return [ + 'quantity' => 1, + 'sku' => $product->sku, + 'type' => $product->type, + 'name' => $product->name, + 'price' => $product->price ?? $fallbackPrice, + 'base_price' => $product->price ?? $fallbackPrice, + 'total' => $product->price ?? $fallbackPrice, + 'base_total' => $product->price ?? $fallbackPrice, + 'product_id' => $product->id, + 'cart_id' => Cart::factory(), + 'created_at' => $now, + 'updated_at' => $now, + ]; } - $fallbackPrice = $faker->randomFloat(4, 0, 1000); - - return [ - 'quantity' => 1, - 'sku' => $product->sku, - 'type' => $product->type, - 'name' => $product->name, - 'price' => $product->price ?? $fallbackPrice, - 'base_price' => $product->price ?? $fallbackPrice, - 'total' => $product->price ?? $fallbackPrice, - 'base_total' => $product->price ?? $fallbackPrice, - 'product_id' => $product->id, - 'cart_id' => function () { - return factory(Cart::class)->create()->id; - }, - 'created_at' => $now, - 'updated_at' => $now, - ]; -}); - +} diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php index 3d45f70b0..692c3202f 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php @@ -1,16 +1,36 @@ define(CartPayment::class, function (Faker $faker) { - $now = date("Y-m-d H:i:s"); +class CartPaymentFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CartPayment::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + + return [ + 'created_at' => $now, + 'updated_at' => $now, + ]; + } + +} - return [ - 'created_at' => $now, - 'updated_at' => $now, - ]; -}); diff --git a/packages/Webkul/Checkout/src/Models/Cart.php b/packages/Webkul/Checkout/src/Models/Cart.php index 40bcc42ac..f5960f31f 100755 --- a/packages/Webkul/Checkout/src/Models/Cart.php +++ b/packages/Webkul/Checkout/src/Models/Cart.php @@ -4,9 +4,14 @@ namespace Webkul\Checkout\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Checkout\Contracts\Cart as CartContract; +use Webkul\Checkout\Database\Factories\CartFactory; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Cart extends Model implements CartContract { + + use HasFactory; + protected $table = 'cart'; protected $guarded = [ @@ -23,31 +28,35 @@ class Cart extends Model implements CartContract /** * To get relevant associated items with the cart instance */ - public function items() { - return $this->hasMany(CartItemProxy::modelClass())->whereNull('parent_id'); + public function items(): \Illuminate\Database\Eloquent\Relations\HasMany + { + return $this->hasMany(CartItemProxy::modelClass()) + ->whereNull('parent_id'); } /** * To get all the associated items with the cart instance even the parent and child items of configurable products */ - public function all_items() { + public function all_items(): \Illuminate\Database\Eloquent\Relations\HasMany + { return $this->hasMany(CartItemProxy::modelClass()); } /** * Get the addresses for the cart. */ - public function addresses() + public function addresses(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(CartAddressProxy::modelClass()); } /** - * Get the biling address for the cart. + * Get the billing address for the cart. */ - public function billing_address() + public function billing_address(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->addresses()->where('address_type', CartAddress::ADDRESS_TYPE_BILLING); + return $this->addresses() + ->where('address_type', CartAddress::ADDRESS_TYPE_BILLING); } /** @@ -55,15 +64,17 @@ class Cart extends Model implements CartContract */ public function getBillingAddressAttribute() { - return $this->billing_address()->first(); + return $this->billing_address() + ->first(); } /** * Get the shipping address for the cart. */ - public function shipping_address() + public function shipping_address(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->addresses()->where('address_type', CartAddress::ADDRESS_TYPE_SHIPPING); + return $this->addresses() + ->where('address_type', CartAddress::ADDRESS_TYPE_SHIPPING); } /** @@ -71,37 +82,41 @@ class Cart extends Model implements CartContract */ public function getShippingAddressAttribute() { - return $this->shipping_address()->first(); + return $this->shipping_address() + ->first(); } /** * Get the shipping rates for the cart. */ - public function shipping_rates() + public function shipping_rates(): \Illuminate\Database\Eloquent\Relations\HasManyThrough { return $this->hasManyThrough(CartShippingRateProxy::modelClass(), CartAddressProxy::modelClass(), 'cart_id', 'cart_address_id'); } /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ - public function selected_shipping_rate() + public function selected_shipping_rate(): \Illuminate\Database\Eloquent\Relations\HasManyThrough { - return $this->shipping_rates()->where('method', $this->shipping_method); + return $this->shipping_rates() + ->where('method', $this->shipping_method); } /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function getSelectedShippingRateAttribute() { - return $this->selected_shipping_rate()->where('method', $this->shipping_method)->first(); + return $this->selected_shipping_rate() + ->where('method', $this->shipping_method) + ->first(); } /** * Get the payment associated with the cart. */ - public function payment() + public function payment(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(CartPaymentProxy::modelClass()); } @@ -111,7 +126,7 @@ class Cart extends Model implements CartContract * * @return boolean */ - public function haveStockableItems() + public function haveStockableItems(): bool { foreach ($this->items as $item) { if ($item->product->isStockable()) { @@ -127,10 +142,10 @@ class Cart extends Model implements CartContract * * @return boolean */ - public function hasDownloadableItems() + public function hasDownloadableItems(): bool { foreach ($this->items as $item) { - if (stristr($item->type,'downloadable') !== false) { + if (stristr($item->type, 'downloadable') !== false) { return true; } } @@ -141,12 +156,14 @@ class Cart extends Model implements CartContract /** * Returns true if cart contains one or many products with quantity box. * (for example: simple, configurable, virtual) + * * @return bool */ public function hasProductsWithQuantityBox(): bool { foreach ($this->items as $item) { - if ($item->product->getTypeInstance()->showQuantityBox() === true) { + if ($item->product->getTypeInstance() + ->showQuantityBox() === true) { return true; } } @@ -158,7 +175,7 @@ class Cart extends Model implements CartContract * * @return boolean */ - public function hasGuestCheckoutItems() + public function hasGuestCheckoutItems(): bool { foreach ($this->items as $item) { if ($item->product->getAttribute('guest_checkout') === 0) { @@ -176,10 +193,22 @@ class Cart extends Model implements CartContract */ public function checkMinimumOrder(): bool { - $minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0; + $minimumOrderAmount = (float) (core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0); $cartBaseSubTotal = (float) $this->base_sub_total; return $cartBaseSubTotal >= $minimumOrderAmount; } + + + /** + * Create a new factory instance for the model + * + * @return CartFactory + */ + protected static function newFactory(): CartFactory + { + return CartFactory::new(); + } + } diff --git a/packages/Webkul/Checkout/src/Models/CartAddress.php b/packages/Webkul/Checkout/src/Models/CartAddress.php index 88cb4ec29..e6f8aac00 100755 --- a/packages/Webkul/Checkout/src/Models/CartAddress.php +++ b/packages/Webkul/Checkout/src/Models/CartAddress.php @@ -3,20 +3,29 @@ namespace Webkul\Checkout\Models; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Checkout\Database\Factories\CartAddressFactory; use Webkul\Checkout\Contracts\CartAddress as CartAddressContract; use Webkul\Core\Models\Address; /** * Class CartAddress + * * @package Webkul\Checkout\Models * * @property integer $cart_id - * @property Cart $cart + * @property Cart $cart * */ class CartAddress extends Address implements CartAddressContract { + + use HasFactory; + public const ADDRESS_TYPE_SHIPPING = 'cart_shipping'; + public const ADDRESS_TYPE_BILLING = 'cart_billing'; /** @@ -31,12 +40,12 @@ class CartAddress extends Address implements CartAddressContract * * @return void */ - protected static function boot() + protected static function boot(): void { static::addGlobalScope('address_type', static function (Builder $builder) { $builder->whereIn('address_type', [ self::ADDRESS_TYPE_BILLING, - self::ADDRESS_TYPE_SHIPPING + self::ADDRESS_TYPE_SHIPPING, ]); }); @@ -46,7 +55,7 @@ class CartAddress extends Address implements CartAddressContract /** * Get the shipping rates for the cart address. */ - public function shipping_rates() + public function shipping_rates(): HasMany { return $this->hasMany(CartShippingRateProxy::modelClass()); } @@ -54,8 +63,19 @@ class CartAddress extends Address implements CartAddressContract /** * Get the cart record associated with the address. */ - public function cart() + public function cart(): BelongsTo { return $this->belongsTo(Cart::class); } + + /** + * Create a new factory instance for the model + * + * @return CartAddressFactory + */ + protected static function newFactory(): CartAddressFactory + { + return CartAddressFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Models/CartItem.php b/packages/Webkul/Checkout/src/Models/CartItem.php index 561b85c64..6a092e6c3 100755 --- a/packages/Webkul/Checkout/src/Models/CartItem.php +++ b/packages/Webkul/Checkout/src/Models/CartItem.php @@ -5,11 +5,19 @@ namespace Webkul\Checkout\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Product\Models\ProductProxy; use Webkul\Product\Models\ProductFlatProxy; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Checkout\Database\Factories\CartItemFactory; use Webkul\Checkout\Contracts\CartItem as CartItemContract; class CartItem extends Model implements CartItemContract { + + use HasFactory; + protected $table = 'cart_items'; protected $casts = [ @@ -22,7 +30,7 @@ class CartItem extends Model implements CartItemContract 'updated_at', ]; - public function product() + public function product(): HasOne { return $this->hasOne(ProductProxy::modelClass(), 'id', 'product_id'); } @@ -32,22 +40,22 @@ class CartItem extends Model implements CartItemContract */ public function product_flat() { - return (ProductFlatProxy::modelClass()) - ::where('product_flat.product_id', $this->product_id) - ->where('product_flat.locale', app()->getLocale()) - ->where('product_flat.channel', core()->getCurrentChannelCode()) - ->select('product_flat.*'); + return (ProductFlatProxy::modelClass())::where('product_flat.product_id', $this->product_id) + ->where('product_flat.locale', app()->getLocale()) + ->where('product_flat.channel', core()->getCurrentChannelCode()) + ->select('product_flat.*'); } /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function getProductFlatAttribute() { - return $this->product_flat()->first(); + return $this->product_flat() + ->first(); } - public function cart() + public function cart(): HasOne { return $this->hasOne(CartProxy::modelClass(), 'id', 'cart_id'); } @@ -55,7 +63,7 @@ class CartItem extends Model implements CartItemContract /** * Get the child item. */ - public function child() + public function child(): BelongsTo { return $this->belongsTo(static::class, 'id', 'parent_id'); } @@ -63,7 +71,7 @@ class CartItem extends Model implements CartItemContract /** * Get the parent item record associated with the cart item. */ - public function parent() + public function parent(): BelongsTo { return $this->belongsTo(self::class, 'parent_id'); } @@ -71,8 +79,19 @@ class CartItem extends Model implements CartItemContract /** * Get the children items. */ - public function children() + public function children(): HasMany { return $this->hasMany(self::class, 'parent_id'); } + + /** + * Create a new factory instance for the model + * + * @return CartItemFactory + */ + protected static function newFactory(): CartItemFactory + { + return CartItemFactory::new(); + } + } diff --git a/packages/Webkul/Checkout/src/Models/CartPayment.php b/packages/Webkul/Checkout/src/Models/CartPayment.php index 76eec136f..68d2a10b7 100755 --- a/packages/Webkul/Checkout/src/Models/CartPayment.php +++ b/packages/Webkul/Checkout/src/Models/CartPayment.php @@ -3,9 +3,25 @@ namespace Webkul\Checkout\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Checkout\Database\Factories\CartPaymentFactory; use Webkul\Checkout\Contracts\CartPayment as CartPaymentContract; class CartPayment extends Model implements CartPaymentContract { + + use HasFactory; + protected $table = 'cart_payment'; + + /** + * Create a new factory instance for the model + * + * @return CartPaymentFactory + */ + protected static function newFactory(): CartPaymentFactory + { + return CartPaymentFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php b/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php index b0714c511..dd4326c0b 100755 --- a/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php +++ b/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php @@ -5,21 +5,19 @@ namespace Webkul\Checkout\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Foundation\AliasLoader; use Webkul\Checkout\Facades\Cart; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; class CheckoutServiceProvider extends ServiceProvider { - public function boot() - { - include __DIR__ . '/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + public function boot(): void + { + include __DIR__.'/../Http/helpers.php'; + + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->app->register(ModuleServiceProvider::class); $this->app->register(EventServiceProvider::class); - - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); } /** @@ -27,7 +25,7 @@ class CheckoutServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $this->registerFacades(); } @@ -37,7 +35,7 @@ class CheckoutServiceProvider extends ServiceProvider * * @return void */ - protected function registerFacades() + protected function registerFacades(): void { //to make the cart facade and bind the //alias to the class needed to be called. @@ -52,15 +50,4 @@ class CheckoutServiceProvider extends ServiceProvider $this->app->bind('cart', 'Webkul\Checkout\Cart'); } - /** - * Register factories. - * - * @param string $path - * - * @return void - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php index f51b437cc..8d0fdbfe1 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php @@ -1,20 +1,37 @@ define(CartRuleCoupon::class, function (Faker $faker) { - return [ - 'code' => $faker->uuid(), - 'usage_limit' => 100, - 'usage_per_customer' => 100, - 'type' => 0, - 'is_primary' => 1, - 'cart_rule_id' => static function () { - return factory(CartRule::class)->create()->id; - }, - ]; -}); +class CartRuleCouponFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CartRuleCoupon::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'code' => Str::uuid(), + 'usage_limit' => 100, + 'usage_per_customer' => 100, + 'type' => 0, + 'is_primary' => 1, + 'cart_rule_id' => CartRule::factory(), + ]; + } + +} diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php index 330c3caa6..60e53339b 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php @@ -1,30 +1,49 @@ define(CartRule::class, function (Faker $faker) { - return [ - 'name' => $faker->uuid, - 'description' => $faker->sentence(), - 'starts_from' => null, - 'ends_till' => null, - 'coupon_type' => '1', - 'use_auto_generation' => '0', - 'usage_per_customer' => '100', - 'uses_per_coupon' => '100', - 'times_used' => '0', - 'condition_type' => '2', - 'end_other_rules' => '0', - 'uses_attribute_conditions' => '0', - 'discount_quantity' => '0', - 'discount_step' => '0', - 'apply_to_shipping' => '0', - 'free_shipping' => '0', - 'sort_order' => '0', - 'status' => '1', - 'conditions' => null, - ]; -}); \ No newline at end of file +class CartRuleFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CartRule::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'name' => Str::uuid(), + 'description' => $this->faker->sentence(), + 'starts_from' => null, + 'ends_till' => null, + 'coupon_type' => '1', + 'use_auto_generation' => '0', + 'usage_per_customer' => '100', + 'uses_per_coupon' => '100', + 'times_used' => '0', + 'condition_type' => '2', + 'end_other_rules' => '0', + 'uses_attribute_conditions' => '0', + 'discount_quantity' => '0', + 'discount_step' => '0', + 'apply_to_shipping' => '0', + 'free_shipping' => '0', + 'sort_order' => '0', + 'status' => '1', + 'conditions' => null, + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php index 80f04d976..e71bd75e2 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php @@ -1,39 +1,50 @@ define(Channel::class, function (Faker $faker, array $attributes) { +class ChannelFactory extends Factory +{ - $seoTitle = $attributes['seo_title'] ?? $faker->word; - $seoDescription = $attributes['seo_description'] ?? $faker->words(10, true); - $seoKeywords = $attributes['seo_keywords'] ?? $faker->words(3, true); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Channel::class; - $seoData = [ - 'meta_title' => $seoTitle, - 'meta_description' => $seoDescription, - 'meta_keywords' => $seoKeywords, - ]; + /** + * Define the model's default state. + * + * @return array + * @throws \JsonException + */ + public function definition(): array + { + $seoTitle = $this->faker->word; + $seoDescription = $this->faker->words(10, true); + $seoKeywords = $this->faker->words(3, true); - unset($attributes['seo_title'], $attributes['seo_description'], $attributes['seo_keywords']); + $seoData = [ + 'meta_title' => $seoTitle, + 'meta_description' => $seoDescription, + 'meta_keywords' => $seoKeywords, + ]; + return [ + 'code' => $this->faker->unique()->word, + 'name' => $this->faker->word, + 'default_locale_id' => Locale::factory(), + 'base_currency_id' => Currency::factory(), + 'root_category_id' => Category::factory(), + 'home_seo' => json_encode($seoData, JSON_THROW_ON_ERROR), + ]; + } - return [ - 'code' => $faker->unique()->word, - 'name' => $faker->word, - 'default_locale_id' => function () { - return factory(Locale::class)->create()->id; - }, - 'base_currency_id' => function () { - return factory(Currency::class)->create()->id; - }, - 'root_category_id' => function () { - return factory(Category::class)->create()->id; - }, - 'home_seo' => json_encode($seoData), - ]; -}); +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php index 4b8c272c5..193a5b6f3 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php @@ -1,10 +1,30 @@ define('channel_inventory_sources', function () { - return [ - 'channel_id' => core()->getCurrentChannel()->id, - 'inventory_source_id' => 1, - ]; -}); \ No newline at end of file +use Illuminate\Database\Eloquent\Factories\Factory; + +class ChannelInventorySourceFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = 'channel_inventory_sources'; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'channel_id' => core()->getCurrentChannel()->id, + 'inventory_source_id' => 1, + ]; + } + +} diff --git a/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php b/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php index 2b551eae9..c5faa1b83 100644 --- a/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php @@ -1,14 +1,32 @@ define(Currency::class, function (Faker $faker, array $attributes) { +class CurrencyFactory extends Factory +{ - return [ - 'code' => $faker->unique()->currencyCode, - 'name' => $faker->word, - ]; + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Currency::class; -}); \ No newline at end of file + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'code' => $this->faker->unique()->currencyCode, + 'name' => $this->faker->word, + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php index 69628675e..7f740198f 100644 --- a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php @@ -1,22 +1,54 @@ define(Locale::class, function (Faker $faker, array $attributes) { +class LocaleFactory extends Factory +{ - do { - $languageCode = $faker->languageCode; - } while (Locale::query()->where('code', $languageCode)->exists()); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Locale::class; - return [ - 'code' => $languageCode, - 'name' => $faker->country, - 'direction' => 'ltr', + /** + * @var string[] + */ + protected $states = [ + 'rtl', ]; -}); -$factory->state(Category::class, 'rtl', [ - 'direction' => 'rtl', -]); \ No newline at end of file + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + do { + $languageCode = $this->faker->languageCode; + } while (Locale::query() + ->where('code', $languageCode) + ->exists()); + + return [ + 'code' => $languageCode, + 'name' => $this->faker->country, + 'direction' => 'ltr', + ]; + } + + public function rtl(): LocaleFactory + { + return $this->state(function (array $attributes) { + return [ + 'direction' => 'rtl', + ]; + }); + } + +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php index 947e8cf2e..80f779824 100644 --- a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php @@ -1,14 +1,33 @@ $this->faker->safeEmail, + 'is_subscribed' => $this->faker->boolean, + 'channel_id' => 1, + ]; + } + +} -$factory->define(SubscribersList::class, function (Faker $faker) { - return [ - 'email' => $faker->safeEmail, - 'is_subscribed' => $faker->boolean, - 'channel_id' => 1, - ]; -}); diff --git a/packages/Webkul/Core/src/Models/Address.php b/packages/Webkul/Core/src/Models/Address.php index f66279332..d47a5ce85 100644 --- a/packages/Webkul/Core/src/Models/Address.php +++ b/packages/Webkul/Core/src/Models/Address.php @@ -12,34 +12,36 @@ use Webkul\Core\Contracts\Address as AddressContract; /** * Class Address + * * @package Webkul\Core\Models * - * @property string $address_type - * @property integer $customer_id - * @property Customer $customer - * @property string $first_name - * @property string $last_name - * @property string $gender - * @property string $company_name - * @property string $address1 - * @property string $address2 - * @property string $postcode - * @property string $city - * @property string $state - * @property string $country - * @property string $email - * @property string $phone - * @property boolean $default_address - * @property array $additional + * @property string $address_type + * @property integer $customer_id + * @property Customer $customer + * @property string $first_name + * @property string $last_name + * @property string $gender + * @property string $company_name + * @property string $address1 + * @property string $address2 + * @property string $postcode + * @property string $city + * @property string $state + * @property string $country + * @property string $email + * @property string $phone + * @property boolean $default_address + * @property array $additional * * @property-read integer $id - * @property-read string $name - * @property-read Carbon $created_at - * @property-read Carbon $updated_at + * @property-read string $name + * @property-read Carbon $created_at + * @property-read Carbon $updated_at * */ abstract class Address extends Model implements AddressContract { + protected $table = 'addresses'; protected $guarded = [ @@ -71,16 +73,16 @@ abstract class Address extends Model implements AddressContract ]; protected $casts = [ - 'additional' => 'array', + 'additional' => 'array', 'default_address' => 'boolean', ]; /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function getNameAttribute(): string { - return $this->first_name . ' ' . $this->last_name; + return $this->first_name.' '.$this->last_name; } /** @@ -90,4 +92,5 @@ abstract class Address extends Model implements AddressContract { return $this->belongsTo(Customer::class); } + } diff --git a/packages/Webkul/Core/src/Models/Channel.php b/packages/Webkul/Core/src/Models/Channel.php index 45741f123..7e7c08564 100755 --- a/packages/Webkul/Core/src/Models/Channel.php +++ b/packages/Webkul/Core/src/Models/Channel.php @@ -6,10 +6,15 @@ use Illuminate\Support\Facades\Storage; use Webkul\Category\Models\CategoryProxy; use Webkul\Core\Eloquent\TranslatableModel; use Webkul\Inventory\Models\InventorySourceProxy; +use Webkul\Core\Database\Factories\ChannelFactory; use Webkul\Core\Contracts\Channel as ChannelContract; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Channel extends TranslatableModel implements ChannelContract { + + use HasFactory; + protected $fillable = [ 'code', 'name', @@ -24,7 +29,7 @@ class Channel extends TranslatableModel implements ChannelContract 'home_seo', 'is_maintenance_on', 'maintenance_mode_text', - 'allowed_ips' + 'allowed_ips', ]; public $translatedAttributes = [ @@ -39,7 +44,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel locales. */ - public function locales() + public function locales(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(LocaleProxy::modelClass(), 'channel_locales'); } @@ -47,7 +52,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the default locale */ - public function default_locale() + public function default_locale(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(LocaleProxy::modelClass()); } @@ -55,7 +60,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel locales. */ - public function currencies() + public function currencies(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(CurrencyProxy::modelClass(), 'channel_currencies'); } @@ -63,7 +68,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel inventory sources. */ - public function inventory_sources() + public function inventory_sources(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(InventorySourceProxy::modelClass(), 'channel_inventory_sources'); } @@ -71,7 +76,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the base currency */ - public function base_currency() + public function base_currency(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(CurrencyProxy::modelClass()); } @@ -79,7 +84,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the base currency */ - public function root_category() + public function root_category(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(CategoryProxy::modelClass(), 'root_category_id'); } @@ -89,7 +94,7 @@ class Channel extends TranslatableModel implements ChannelContract */ public function logo_url() { - if (! $this->logo) { + if (!$this->logo) { return; } @@ -109,7 +114,7 @@ class Channel extends TranslatableModel implements ChannelContract */ public function favicon_url() { - if (! $this->favicon) { + if (!$this->favicon) { return; } @@ -123,4 +128,15 @@ class Channel extends TranslatableModel implements ChannelContract { return $this->favicon_url(); } + + /** + * Create a new factory instance for the model + * + * @return ChannelFactory + */ + protected static function newFactory(): ChannelFactory + { + return ChannelFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/Currency.php b/packages/Webkul/Core/src/Models/Currency.php index 7fc11b6d7..16f9fe929 100755 --- a/packages/Webkul/Core/src/Models/Currency.php +++ b/packages/Webkul/Core/src/Models/Currency.php @@ -3,10 +3,16 @@ namespace Webkul\Core\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Webkul\Core\Database\Factories\CurrencyFactory; use Webkul\Core\Contracts\Currency as CurrencyContract; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Currency extends Model implements CurrencyContract { + + use HasFactory; + /** * The attributes that are mass assignable. * @@ -21,10 +27,11 @@ class Currency extends Model implements CurrencyContract /** * Set currency code in capital * - * @param string $value + * @param $code + * * @return void */ - public function setCodeAttribute($code) + public function setCodeAttribute($code): void { $this->attributes['code'] = strtoupper($code); } @@ -32,8 +39,19 @@ class Currency extends Model implements CurrencyContract /** * Get the exchange rate associated with the currency. */ - public function exchange_rate() + public function exchange_rate(): HasOne { return $this->hasOne(CurrencyExchangeRateProxy::modelClass(), 'target_currency'); } + + /** + * Create a new factory instance for the model. + * + * @return CurrencyFactory + */ + protected static function newFactory(): CurrencyFactory + { + return CurrencyFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/Locale.php b/packages/Webkul/Core/src/Models/Locale.php index 79e6a879d..391e4cced 100755 --- a/packages/Webkul/Core/src/Models/Locale.php +++ b/packages/Webkul/Core/src/Models/Locale.php @@ -3,10 +3,15 @@ namespace Webkul\Core\Models; use Illuminate\Database\Eloquent\Model; +use Webkul\Core\Database\Factories\LocaleFactory; use Webkul\Core\Contracts\Locale as LocaleContract; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Locale extends Model implements LocaleContract { + + use HasFactory; + /** * The attributes that are mass assignable. * @@ -17,4 +22,15 @@ class Locale extends Model implements LocaleContract 'name', 'direction', ]; + + /** + * Create a new factory instance for the model. + * + * @return LocaleFactory + */ + protected static function newFactory(): LocaleFactory + { + return LocaleFactory::new(); + } + } diff --git a/packages/Webkul/Core/src/Models/SubscribersList.php b/packages/Webkul/Core/src/Models/SubscribersList.php index d016047f0..21c8c3006 100755 --- a/packages/Webkul/Core/src/Models/SubscribersList.php +++ b/packages/Webkul/Core/src/Models/SubscribersList.php @@ -4,10 +4,16 @@ namespace Webkul\Core\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Customer\Models\CustomerProxy; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Core\Database\Factories\SubscriberListFactory; use Webkul\Core\Contracts\SubscribersList as SubscribersListContract; class SubscribersList extends Model implements SubscribersListContract { + + use HasFactory; + /** * The attributes that are mass assignable. * @@ -29,8 +35,19 @@ class SubscribersList extends Model implements SubscribersListContract /** * Get the customer associated with the subscription. */ - public function customer() + public function customer(): BelongsTo { return $this->belongsTo(CustomerProxy::modelClass()); } + + /** + * Create a new factory instance for the model. + * + * @return SubscriberListFactory + */ + protected static function newFactory(): SubscriberListFactory + { + return SubscriberListFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index d47c9bf53..53307552f 100755 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -3,7 +3,6 @@ namespace Webkul\Core\Providers; use Illuminate\Contracts\Debug\ExceptionHandler; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Validator; @@ -18,21 +17,19 @@ use Webkul\Theme\ViewRenderEventManager; class CoreServiceProvider extends ServiceProvider { + /** * Bootstrap services. * * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException */ - public function boot() + public function boot(): void { - include __DIR__ . '/../Http/helpers.php'; + include __DIR__.'/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core'); + $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'core'); Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes'); @@ -41,18 +38,15 @@ class CoreServiceProvider extends ServiceProvider Validator::extend('decimal', 'Webkul\Core\Contracts\Validations\Decimal@passes'); $this->publishes([ - dirname(__DIR__) . '/Config/concord.php' => config_path('concord.php'), - dirname(__DIR__) . '/Config/scout.php' => config_path('scout.php'), + dirname(__DIR__).'/Config/concord.php' => config_path('concord.php'), + dirname(__DIR__).'/Config/scout.php' => config_path('scout.php'), ]); - $this->app->bind( - ExceptionHandler::class, - Handler::class - ); + $this->app->bind(ExceptionHandler::class, Handler::class); SliderProxy::observe(SliderObserver::class); - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'core'); + $this->loadViewsFrom(__DIR__.'/../Resources/views', 'core'); Event::listen('bagisto.shop.layout.body.after', static function (ViewRenderEventManager $viewRenderEventManager) { $viewRenderEventManager->addTemplate('core::blade.tracer.style'); @@ -76,7 +70,7 @@ class CoreServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $this->registerFacades(); @@ -90,7 +84,7 @@ class CoreServiceProvider extends ServiceProvider * * @return void */ - protected function registerFacades() + protected function registerFacades(): void { $loader = AliasLoader::getInstance(); $loader->alias('core', CoreFacade::class); @@ -122,27 +116,16 @@ class CoreServiceProvider extends ServiceProvider ]); } - /** - * Register factories. - * - * @param string $path - * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } - /** * Register the Blade compiler implementation. * * @return void */ - public function registerBladeCompiler() + public function registerBladeCompiler(): void { $this->app->singleton('blade.compiler', function ($app) { return new BladeCompiler($app['files'], $app['config']['view.compiled']); }); } + } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index 1aae97cd8..d148c5cd2 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -1,34 +1,54 @@ define(CustomerAddress::class, function (Faker $faker) { - // use an locale from a country in europe so the vat id can be generated - $fakerIt = \Faker\Factory::create('it_IT'); +class CustomerAddressFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CustomerAddress::class; + + /** + * Define the model's default state. + * + * @return array + * @throws \Exception + */ + public function definition(): array + { + $fakerIt = \Faker\Factory::create('it_IT'); + + return [ + 'customer_id' => Customer::factory(), + 'company_name' => $this->faker->company, + 'vat_id' => $fakerIt->vatId(), + 'first_name' => $this->faker->firstName, + 'last_name' => $this->faker->lastName, + 'address1' => $this->faker->streetAddress, + 'country' => $this->faker->countryCode, + 'state' => $this->faker->state, + 'city' => $this->faker->city, + 'postcode' => $this->faker->postcode, + 'phone' => $this->faker->e164PhoneNumber, + 'default_address' => Arr::random([ + 0, + 1, + ]), + 'address_type' => CustomerAddress::ADDRESS_TYPE, + ]; + } + +} - return [ - 'customer_id' => function () { - return factory(Customer::class)->create()->id; - }, - 'company_name' => $faker->company, - 'vat_id' => $fakerIt->vatId(), - 'first_name' => $faker->firstName, - 'last_name' => $faker->lastName, - 'address1' => $faker->streetAddress, - 'country' => $faker->countryCode, - 'state' => $faker->state, - 'city' => $faker->city, - 'postcode' => $faker->postcode, - 'phone' => $faker->e164PhoneNumber, - 'default_address' => Arr::random([0, 1]), - 'address_type' => CustomerAddress::ADDRESS_TYPE, - ]; -}); diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php index 28789f7ef..4e9689e90 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php @@ -1,35 +1,76 @@ define(Customer::class, function (Faker $faker) { - $now = date("Y-m-d H:i:s"); - $password = $faker->password; - - return [ - 'first_name' => $faker->firstName(), - 'last_name' => $faker->lastName, - 'gender' => Arr::random(['male', 'female', 'other']), - 'email' => $faker->email, - 'status' => 1, - 'password' => Hash::make($password), - 'customer_group_id' => 2, - 'is_verified' => 1, - 'created_at' => $now, - 'updated_at' => $now, - 'notes' => json_encode(['plain_password' => $password]), +class CustomerFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Customer::class; + + /** + * @var array + */ + protected $states = [ + 'male', + 'female', ]; -}); -$factory->state(Customer::class, 'male', [ - 'gender' => 'Male', -]); + /** + * Define the model's default state. + * + * @return array + * @throws \Exception + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + $password = $this->faker->password; -$factory->state(Customer::class, 'female', [ - 'gender' => 'Female', -]); + return [ + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName, + 'gender' => Arr::random([ + 'male', + 'female', + 'other', + ]), + 'email' => $this->faker->email, + 'status' => 1, + 'password' => Hash::make($password), + 'customer_group_id' => 2, + 'is_verified' => 1, + 'created_at' => $now, + 'updated_at' => $now, + 'notes' => json_encode(['plain_password' => $password], JSON_THROW_ON_ERROR), + ]; + } + + public function male(): CustomerFactory + { + return $this->state(function (array $attributes) { + return [ + 'gender' => 'Male', + ]; + }); + } + + public function female(): CustomerFactory + { + return $this->state(function (array $attributes) { + return [ + 'gender' => 'Female', + ]; + }); + } + +} diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php index ccc77cb33..012ae252b 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php @@ -1,16 +1,35 @@ define(CustomerGroup::class, function (Faker $faker) { - $name = ucfirst($faker->word); - - return [ - 'name' => $name, - 'is_user_defined' => $faker->boolean, - 'code' => lcfirst($name), - ]; -}); +class CustomerGroupFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = CustomerGroup::class; + + /** + * Define the model's default state. + * + * @return array + * @throws \Exception + */ + public function definition(): array + { + $name = ucfirst($this->faker->word); + + return [ + 'name' => $name, + 'is_user_defined' => $this->faker->boolean, + 'code' => lcfirst($name), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Models/Customer.php b/packages/Webkul/Customer/src/Models/Customer.php index 12a3a3283..efde4d197 100755 --- a/packages/Webkul/Customer/src/Models/Customer.php +++ b/packages/Webkul/Customer/src/Models/Customer.php @@ -3,18 +3,26 @@ namespace Webkul\Customer\Models; use Illuminate\Notifications\Notifiable; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Foundation\Auth\User as Authenticatable; use Tymon\JWTAuth\Contracts\JWTSubject; use Webkul\Checkout\Models\CartProxy; use Webkul\Sales\Models\OrderProxy; use Webkul\Core\Models\SubscribersListProxy; use Webkul\Product\Models\ProductReviewProxy; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Customer\Database\Factories\CustomerFactory; use Webkul\Customer\Notifications\CustomerResetPassword; use Webkul\Customer\Contracts\Customer as CustomerContract; +use Webkul\Customer\Database\Factories\CustomerAddressFactory; class Customer extends Authenticatable implements CustomerContract, JWTSubject { + use Notifiable; + use HasFactory; protected $table = 'customers'; @@ -35,45 +43,50 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject 'status', ]; - protected $hidden = ['password', 'api_token', 'remember_token']; + protected $hidden = [ + 'password', + 'api_token', + 'remember_token', + ]; /** * Get the customer full name. */ - public function getNameAttribute() + public function getNameAttribute(): string { - return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name); + return ucfirst($this->first_name).' '.ucfirst($this->last_name); } /** * Email exists or not */ - public function emailExists($email) + public function emailExists($email): bool { - $results = $this->where('email', $email); + $results = $this->where('email', $email); - if ($results->count() == 0) { + if ($results->count() === 0) { return false; - } else { - return true; } + + return true; } /** * Get the customer group that owns the customer. */ - public function group() + public function group(): BelongsTo { return $this->belongsTo(CustomerGroupProxy::modelClass(), 'customer_group_id'); } /** - * Send the password reset notification. - * - * @param string $token - * @return void - */ - public function sendPasswordResetNotification($token) + * Send the password reset notification. + * + * @param string $token + * + * @return void + */ + public function sendPasswordResetNotification($token): void { $this->notify(new CustomerResetPassword($token)); } @@ -81,7 +94,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject /** * Get the customer address that owns the customer. */ - public function addresses() + public function addresses(): HasMany { return $this->hasMany(CustomerAddressProxy::modelClass(), 'customer_id'); } @@ -89,15 +102,16 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject /** * Get default customer address that owns the customer. */ - public function default_address() + public function default_address(): HasOne { - return $this->hasOne(CustomerAddressProxy::modelClass(), 'customer_id')->where('default_address', 1); + return $this->hasOne(CustomerAddressProxy::modelClass(), 'customer_id') + ->where('default_address', 1); } /** * Customer's relation with wishlist items */ - public function wishlist_items() + public function wishlist_items(): HasMany { return $this->hasMany(WishlistProxy::modelClass(), 'customer_id'); } @@ -105,31 +119,33 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject /** * get all cart inactive cart instance of a customer */ - public function all_carts() + public function all_carts(): HasMany { return $this->hasMany(CartProxy::modelClass(), 'customer_id'); } /** - * get inactive cart inactive cart instance of a customer + * get inactive cart instance of a customer */ - public function inactive_carts() + public function inactive_carts(): HasMany { - return $this->hasMany(CartProxy::modelClass(), 'customer_id')->where('is_active', 0); + return $this->hasMany(CartProxy::modelClass(), 'customer_id') + ->where('is_active', 0); } /** * get active cart inactive cart instance of a customer */ - public function active_carts() + public function active_carts(): HasMany { - return $this->hasMany(CartProxy::modelClass(), 'customer_id')->where('is_active', 1); + return $this->hasMany(CartProxy::modelClass(), 'customer_id') + ->where('is_active', 1); } /** * get all reviews of a customer - */ - public function all_reviews() + */ + public function all_reviews(): HasMany { return $this->hasMany(ProductReviewProxy::modelClass(), 'customer_id'); } @@ -137,7 +153,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject /** * get all orders of a customer */ - public function all_orders() + public function all_orders(): HasMany { return $this->hasMany(OrderProxy::modelClass(), 'customer_id'); } @@ -157,7 +173,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject * * @return array */ - public function getJWTCustomClaims() + public function getJWTCustomClaims(): array { return []; } @@ -165,8 +181,19 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject /** * Get the customer's subscription. */ - public function subscription() + public function subscription(): HasOne { return $this->hasOne(SubscribersListProxy::modelClass(), 'customer_id'); } + + /** + * Create a new factory instance for the model + * + * @return CustomerFactory + */ + protected static function newFactory(): CustomerFactory + { + return CustomerFactory::new(); + } + } diff --git a/packages/Webkul/Customer/src/Models/CustomerAddress.php b/packages/Webkul/Customer/src/Models/CustomerAddress.php index 89cecb4cb..19857cd6b 100755 --- a/packages/Webkul/Customer/src/Models/CustomerAddress.php +++ b/packages/Webkul/Customer/src/Models/CustomerAddress.php @@ -4,10 +4,15 @@ namespace Webkul\Customer\Models; use Illuminate\Database\Eloquent\Builder; use Webkul\Core\Models\Address; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Customer\Database\Factories\CustomerAddressFactory; use Webkul\Customer\Contracts\CustomerAddress as CustomerAddressContract; class CustomerAddress extends Address implements CustomerAddressContract { + + use HasFactory; + public const ADDRESS_TYPE = 'customer'; /** @@ -22,7 +27,7 @@ class CustomerAddress extends Address implements CustomerAddressContract * * @return void */ - protected static function boot() + protected static function boot(): void { static::addGlobalScope('address_type', static function (Builder $builder) { $builder->where('address_type', self::ADDRESS_TYPE); @@ -30,4 +35,15 @@ class CustomerAddress extends Address implements CustomerAddressContract parent::boot(); } + + /** + * Create a new factory instance for the model + * + * @return CustomerAddressFactory + */ + protected static function newFactory(): CustomerAddressFactory + { + return CustomerAddressFactory::new(); + } + } diff --git a/packages/Webkul/Customer/src/Models/CustomerGroup.php b/packages/Webkul/Customer/src/Models/CustomerGroup.php index e8a546d53..8ce906b11 100755 --- a/packages/Webkul/Customer/src/Models/CustomerGroup.php +++ b/packages/Webkul/Customer/src/Models/CustomerGroup.php @@ -1,20 +1,41 @@ hasMany(CustomerProxy::modelClass()); } + + /** + * Create a new factory instance for the model + * + * @return CustomerGroupFactory + */ + protected static function newFactory(): CustomerGroupFactory + { + return CustomerGroupFactory::new(); + } + } diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index a482df188..b95331374 100755 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -2,14 +2,15 @@ namespace Webkul\Customer\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; use Webkul\Customer\Captcha; +use Illuminate\Database\Eloquent\Factories\Factory; use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer; class CustomerServiceProvider extends ServiceProvider { + /** * Bootstrap application services. * @@ -19,11 +20,11 @@ class CustomerServiceProvider extends ServiceProvider { $router->aliasMiddleware('customer', RedirectIfNotCustomer::class); - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customer'); + $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'customer'); - $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer'); + $this->loadViewsFrom(__DIR__.'/../Resources/views', 'customer'); $this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) { return $this->app['captcha']->validateResponse($value); @@ -34,41 +35,24 @@ class CustomerServiceProvider extends ServiceProvider * Register services. * * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException */ - public function register() + public function register(): void { $this->registerConfig(); - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); - $this->app->singleton('captcha', function ($app) { return new Captcha(); }); } - /** - * Register factories. - * - * @param string $path - * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } - /** * Register package config. * * @return void */ - protected function registerConfig() + protected function registerConfig(): void { - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', - 'core' - ); + $this->mergeConfigFrom(dirname(__DIR__).'/Config/system.php', 'core'); } + } diff --git a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php index feac8d1e9..58d36d07c 100644 --- a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php +++ b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php @@ -1,28 +1,46 @@ define(InventorySource::class, function (Faker $faker) { - $now = date("Y-m-d H:i:s"); - $code = $faker->unique()->word; - - return [ - 'code' => $faker->unique()->word, - 'name' => $code, - 'description' => $faker->sentence, - 'contact_name' => $faker->name, - 'contact_email' => $faker->safeEmail, - 'contact_number' => $faker->phoneNumber, - 'country' => $faker->countryCode, - 'state' => $faker->state, - 'city' => $faker->city, - 'street' => $faker->streetAddress, - 'postcode' => $faker->postcode, - 'priority' => 0, - 'status' => 1, - 'created_at' => $now, - 'updated_at' => $now, - ]; -}); \ No newline at end of file +use Webkul\Inventory\Models\InventorySource; +use Illuminate\Database\Eloquent\Factories\Factory; + +class InventorySourceFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = InventorySource::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + $code = $this->faker->unique()->word; + return [ + 'code' => $this->faker->unique()->word, + 'name' => $code, + 'description' => $this->faker->sentence, + 'contact_name' => $this->faker->name, + 'contact_email' => $this->faker->safeEmail, + 'contact_number' => $this->faker->phoneNumber, + 'country' => $this->faker->countryCode, + 'state' => $this->faker->state, + 'city' => $this->faker->city, + 'street' => $this->faker->streetAddress, + 'postcode' => $this->faker->postcode, + 'priority' => 0, + 'status' => 1, + 'created_at' => $now, + 'updated_at' => $now, + ]; + } + +} diff --git a/packages/Webkul/Inventory/src/Models/InventorySource.php b/packages/Webkul/Inventory/src/Models/InventorySource.php index 6ab8922ed..222b3bb1a 100755 --- a/packages/Webkul/Inventory/src/Models/InventorySource.php +++ b/packages/Webkul/Inventory/src/Models/InventorySource.php @@ -3,9 +3,25 @@ namespace Webkul\Inventory\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Inventory\Database\Factories\InventorySourceFactory; use Webkul\Inventory\Contracts\InventorySource as InventorySourceContract; class InventorySource extends Model implements InventorySourceContract { + + use HasFactory; + protected $guarded = ['_token']; + + /** + * Create a new factory instance for the model. + * + * @return InventorySourceFactory + */ + protected static function newFactory(): InventorySourceFactory + { + return InventorySourceFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php b/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php index 9a9520998..2e10fed18 100755 --- a/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php +++ b/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php @@ -3,20 +3,18 @@ namespace Webkul\Inventory\Providers; use Illuminate\Support\ServiceProvider; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; class InventoryServiceProvider extends ServiceProvider { + /** * Bootstrap services. * * @return void */ - public function boot() + public function boot(): void { - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - - $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); } /** @@ -24,7 +22,8 @@ class InventoryServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { } + } \ 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 432963515..90f8d5060 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php @@ -1,17 +1,33 @@ define(ProductAttributeValue::class, function (Faker $faker) { - return [ - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'locale' => 'en', - 'channel' => 'default', - ]; -}); +class ProductAttributeValueFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = ProductAttributeValue::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'product_id' => Product::factory(), + 'locale' => 'en', + 'channel' => 'default', + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php index e2cb8668e..4ddcf862e 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php @@ -1,35 +1,43 @@ define(ProductDownloadableLink::class, function (Faker $faker) { - $now = date("Y-m-d H:i:s"); - $filename = 'ProductImageExampleForUpload.jpg'; - $filepath = '/tests/_data/'; - - return [ - 'url' => '', - 'file' => $filepath . $filename, - 'file_name' => $filename, - 'type' => 'file', - 'price' => 0.0000, - 'downloads' => $faker->randomNumber(1), - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'created_at' => $now, - 'updated_at' => $now, - ]; -}); +class ProductDownloadableLinkFactory extends Factory +{ -$factory->define(ProductDownloadableLinkTranslation::class, function (Faker $faker) { - return [ - 'locale' => 'en', - 'title' => $faker->word, - ]; -}); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = ProductDownloadableLink::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + $filename = 'ProductImageExampleForUpload.jpg'; + $filepath = '/tests/_data/'; + + return [ + 'url' => '', + 'file' => $filepath.$filename, + 'file_name' => $filename, + 'type' => 'file', + 'price' => 0.0000, + 'downloads' => $this->faker->randomNumber(1), + 'product_id' => Product::factory(), + 'created_at' => $now, + 'updated_at' => $now, + ]; + } + +} diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslation.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslation.php deleted file mode 100644 index 1a9ecdcfc..000000000 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslation.php +++ /dev/null @@ -1,17 +0,0 @@ -define(ProductDownloadableLinkTranslation::class, function (Faker $faker) { - return [ - 'locale' => 'en', - 'title' => $faker->word, - 'product_downloadable_link_id' => function () { - return factory(ProductDownloadableLink::class)->create()->id; - }, - ]; -}); diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php new file mode 100644 index 000000000..bb1b71c83 --- /dev/null +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php @@ -0,0 +1,33 @@ + 'en', + 'title' => $this->faker->word, + 'product_downloadable_link_id' => ProductDownloadableLink::factory(), + ]; + } + +} diff --git a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php index d0f4240b8..51a355564 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php @@ -1,29 +1,77 @@ define(Product::class, function (Faker $faker) { - return [ - 'sku' => $faker->uuid, - 'attribute_family_id' => 1, +class ProductFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Product::class; + + /** + * @var string[] + */ + protected $states = [ + 'simple', + 'virtual', + 'downloadable', + 'booking', ]; -}); -$factory->state(Product::class, 'simple', [ - 'type' => 'simple', -]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'sku' => $this->faker->uuid, + 'attribute_family_id' => 1, + ]; + } -$factory->state(Product::class, 'virtual', [ - 'type' => 'virtual', -]); + public function simple(): ProductFactory + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'simple', + ]; + }); + } -$factory->state(Product::class, 'downloadable', [ - 'type' => 'downloadable', -]); + public function virtual(): ProductFactory + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'virtual', + ]; + }); + } -$factory->state(Product::class, 'booking', [ - 'type' => 'booking', -]); \ No newline at end of file + public function downloadable(): ProductFactory + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'downloadable', + ]; + }); + } + + public function booking(): ProductFactory + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'booking', + ]; + }); + } + +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php index 53e81effe..d6dfd4a88 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php @@ -1,20 +1,34 @@ define(ProductInventory::class, function (Faker $faker) { - return [ - 'qty' => $faker->numberBetween(100, 200), - 'product_id' => function () { - return factory(Product::class)->create()->id; - }, - 'inventory_source_id' => function () { - return factory(InventorySource::class)->create()->id; - }, - ]; -}); \ No newline at end of file +class ProductInventoryFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = ProductInventory::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'qty' => $this->faker->numberBetween(100, 200), + 'product_id' => Product::factory(), + 'inventory_source_id' => InventorySource::factory(), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php index 34926b1c0..7be9cd047 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php @@ -1,20 +1,35 @@ define(ProductReview::class, function (Faker $faker, array $attributes) { - if (! array_key_exists('product_id', $attributes)) { - throw new InvalidArgumentException('product_id must be provided. You may use $I->haveProduct() to generate a product'); +class ProductReviewFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = ProductReview::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'title' => $this->faker->words(5, true), + 'rating' => $this->faker->numberBetween(0, 10), + 'status' => 1, + 'comment' => $this->faker->sentence(20), + 'product_id' => Product::factory(), + ]; } - return [ - 'title' => $faker->words(5, true), - 'rating' => $faker->numberBetween(0, 10), - 'status' => 1, - 'comment' => $faker->sentence(20), - 'product_id' => $attributes['product_id'], - ]; -}); +} diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index 220a5a15c..ecfaf48eb 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -3,18 +3,27 @@ namespace Webkul\Product\Models; use Exception; +use Illuminate\Support\Collection; use Illuminate\Database\Eloquent\Model; use Webkul\Attribute\Models\AttributeFamilyProxy; use Webkul\Attribute\Models\AttributeProxy; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Webkul\Product\Database\Factories\ProductFactory; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Webkul\Attribute\Repositories\AttributeRepository; use Webkul\Category\Models\CategoryProxy; use Webkul\Inventory\Models\InventorySourceProxy; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Product\Contracts\Product as ProductContract; use Webkul\Product\Database\Eloquent\Builder; use Webkul\Product\Type\AbstractType; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Product extends Model implements ProductContract { + + use HasFactory; + /** * The attributes that are mass assignable. * @@ -33,7 +42,7 @@ class Product extends Model implements ProductContract * @var $casts */ protected $casts = [ - 'additional' => 'array' + 'additional' => 'array', ]; /** @@ -55,7 +64,7 @@ class Product extends Model implements ProductContract * * @return void */ - protected static function booted() + protected static function booted(): void { parent::boot(); @@ -77,7 +86,7 @@ class Product extends Model implements ProductContract * * @return void */ - public function refreshloadedAttributeValues() + public function refreshloadedAttributeValues(): void { self::$loadedAttributeValues = []; } @@ -85,7 +94,7 @@ class Product extends Model implements ProductContract /** * Get the product attribute family that owns the product. */ - public function attribute_family() + public function attribute_family(): BelongsTo { return $this->belongsTo(AttributeFamilyProxy::modelClass()); } @@ -93,7 +102,7 @@ class Product extends Model implements ProductContract /** * Get the product attribute values that owns the product. */ - public function attribute_values() + public function attribute_values(): HasMany { return $this->hasMany(ProductAttributeValueProxy::modelClass()); } @@ -102,7 +111,7 @@ class Product extends Model implements ProductContract * Get the product flat entries that are associated with product. * May be one for each locale and each channel. */ - public function product_flats() + public function product_flats(): HasMany { return $this->hasMany(ProductFlatProxy::modelClass(), 'product_id'); } @@ -110,7 +119,7 @@ class Product extends Model implements ProductContract /** * Get the product variants that owns the product. */ - public function variants() + public function variants(): HasMany { return $this->hasMany(static::class, 'parent_id'); } @@ -118,7 +127,7 @@ class Product extends Model implements ProductContract /** * Get the product reviews that owns the product. */ - public function reviews() + public function reviews(): HasMany { return $this->hasMany(ProductReviewProxy::modelClass()); } @@ -126,7 +135,7 @@ class Product extends Model implements ProductContract /** * Get the product that owns the product. */ - public function parent() + public function parent(): BelongsTo { return $this->belongsTo(static::class, 'parent_id'); } @@ -134,7 +143,7 @@ class Product extends Model implements ProductContract /** * The categories that belong to the product. */ - public function categories() + public function categories(): BelongsToMany { return $this->belongsToMany(CategoryProxy::modelClass(), 'product_categories'); } @@ -142,7 +151,7 @@ class Product extends Model implements ProductContract /** * The inventories that belong to the product. */ - public function inventories() + public function inventories(): HasMany { return $this->hasMany(ProductInventoryProxy::modelClass(), 'product_id'); } @@ -150,7 +159,7 @@ class Product extends Model implements ProductContract /** * The ordered inventories that belong to the product. */ - public function ordered_inventories() + public function ordered_inventories(): HasMany { return $this->hasMany(ProductOrderedInventoryProxy::modelClass(), 'product_id'); } @@ -158,15 +167,16 @@ class Product extends Model implements ProductContract /** * The inventory sources that belong to the product. */ - public function inventory_sources() + public function inventory_sources(): BelongsToMany { - return $this->belongsToMany(InventorySourceProxy::modelClass(), 'product_inventories')->withPivot('id', 'qty'); + return $this->belongsToMany(InventorySourceProxy::modelClass(), 'product_inventories') + ->withPivot('id', 'qty'); } /** * The super attributes that belong to the product. */ - public function super_attributes() + public function super_attributes(): BelongsToMany { return $this->belongsToMany(AttributeProxy::modelClass(), 'product_super_attributes'); } @@ -174,7 +184,7 @@ class Product extends Model implements ProductContract /** * The images that belong to the product. */ - public function images() + public function images(): HasMany { return $this->hasMany(ProductImageProxy::modelClass(), 'product_id'); } @@ -182,7 +192,7 @@ class Product extends Model implements ProductContract /** * The videos that belong to the product. */ - public function videos() + public function videos(): HasMany { return $this->hasMany(ProductVideoProxy::modelClass(), 'product_id'); } @@ -192,39 +202,43 @@ class Product extends Model implements ProductContract */ public function getBaseImageUrlAttribute() { - $image = $this->images()->first(); + $image = $this->images() + ->first(); - return $image ? $image->url : null; + return $image->url ?? null; } /** * The related products that belong to the product. */ - public function related_products() + public function related_products(): BelongsToMany { - return $this->belongsToMany(static::class, 'product_relations', 'parent_id', 'child_id')->limit(4); + return $this->belongsToMany(static::class, 'product_relations', 'parent_id', 'child_id') + ->limit(4); } /** * The up sells that belong to the product. */ - public function up_sells() + public function up_sells(): BelongsToMany { - return $this->belongsToMany(static::class, 'product_up_sells', 'parent_id', 'child_id')->limit(4); + return $this->belongsToMany(static::class, 'product_up_sells', 'parent_id', 'child_id') + ->limit(4); } /** * The cross sells that belong to the product. */ - public function cross_sells() + public function cross_sells(): BelongsToMany { - return $this->belongsToMany(static::class, 'product_cross_sells', 'parent_id', 'child_id')->limit(4); + return $this->belongsToMany(static::class, 'product_cross_sells', 'parent_id', 'child_id') + ->limit(4); } /** * The images that belong to the product. */ - public function downloadable_samples() + public function downloadable_samples(): HasMany { return $this->hasMany(ProductDownloadableSampleProxy::modelClass()); } @@ -232,7 +246,7 @@ class Product extends Model implements ProductContract /** * The images that belong to the product. */ - public function downloadable_links() + public function downloadable_links(): HasMany { return $this->hasMany(ProductDownloadableLinkProxy::modelClass()); } @@ -240,7 +254,7 @@ class Product extends Model implements ProductContract /** * Get the grouped products that owns the product. */ - public function grouped_products() + public function grouped_products(): HasMany { return $this->hasMany(ProductGroupedProductProxy::modelClass()); } @@ -248,7 +262,7 @@ class Product extends Model implements ProductContract /** * Get the bundle options that owns the product. */ - public function bundle_options() + public function bundle_options(): HasMany { return $this->hasMany(ProductBundleOptionProxy::modelClass()); } @@ -256,7 +270,7 @@ class Product extends Model implements ProductContract /** * Get the product customer group prices that owns the product. */ - public function customer_group_prices() + public function customer_group_prices(): HasMany { return $this->hasMany(ProductCustomerGroupPriceProxy::modelClass()); } @@ -264,33 +278,33 @@ class Product extends Model implements ProductContract /** * Get inventory source quantity. * - * @param integer $qty + * @param $inventorySourceId + * * @return bool */ - public function inventory_source_qty($inventorySourceId) + public function inventory_source_qty($inventorySourceId): bool { return $this->inventories() - ->where('inventory_source_id', $inventorySourceId) - ->sum('qty'); + ->where('inventory_source_id', $inventorySourceId) + ->sum('qty'); } /** * Get type instance. * * @return AbstractType + * @throws \Exception */ - public function getTypeInstance() + public function getTypeInstance(): AbstractType { if ($this->typeInstance) { return $this->typeInstance; } - $this->typeInstance = app(config('product_types.' . $this->type . '.class')); + $this->typeInstance = app(config('product_types.'.$this->type.'.class')); - if (! $this->typeInstance instanceof AbstractType) { - throw new Exception( - "Please ensure the product type '{$this->type}' is configured in your application." - ); + if (!$this->typeInstance instanceof AbstractType) { + throw new Exception("Please ensure the product type '{$this->type}' is configured in your application."); } $this->typeInstance->setProduct($this); @@ -301,61 +315,76 @@ class Product extends Model implements ProductContract /** * Is saleable. * - * @param string $key + * @param string $key + * * @return bool + * @throws \Exception */ - public function isSaleable() + public function isSaleable(): bool { - return $this->getTypeInstance()->isSaleable(); + return $this->getTypeInstance() + ->isSaleable(); } /** * Total quantity. * * @return integer + * @throws \Exception */ - public function totalQuantity() + public function totalQuantity(): int { - return $this->getTypeInstance()->totalQuantity(); + return $this->getTypeInstance() + ->totalQuantity(); } /** * Have sufficient quantity. * - * @param int $qty + * @param int $qty + * * @return bool + * @throws \Exception */ public function haveSufficientQuantity(int $qty): bool { - return $this->getTypeInstance()->haveSufficientQuantity($qty); + return $this->getTypeInstance() + ->haveSufficientQuantity($qty); } /** * Is stockable. * * @return bool + * @throws \Exception */ - public function isStockable() + public function isStockable(): bool { - return $this->getTypeInstance()->isStockable(); + return $this->getTypeInstance() + ->isStockable(); } /** * Get an attribute from the model. * - * @param string $key + * @param string $key + * * @return mixed */ public function getAttribute($key) { - if (! method_exists(static::class, $key) - && ! in_array($key, ['pivot', 'parent_id', 'attribute_family_id']) - && ! isset($this->attributes[$key]) - ) { + if (!method_exists(static::class, $key) + && !in_array($key, [ + 'pivot', + 'parent_id', + 'attribute_family_id', + ]) + && !isset($this->attributes[$key])) { if (isset($this->id)) { $this->attributes[$key] = ''; - $attribute = core()->getSingletonInstance(AttributeRepository::class) + $attribute = core() + ->getSingletonInstance(AttributeRepository::class) ->getAttributeByCode($key); $this->attributes[$key] = $this->getCustomAttributeValue($attribute); @@ -370,14 +399,16 @@ class Product extends Model implements ProductContract /** * Retrieve product attributes. * - * @param Group $group - * @param bool $skipSuperAttribute + * @param Group $group + * @param bool $skipSuperAttribute * - * @return Collection + * @return \Illuminate\Support\Collection + * @throws \Exception */ - public function getEditableAttributes($group = null, $skipSuperAttribute = true) + public function getEditableAttributes($group = null, $skipSuperAttribute = true): Collection { - return $this->getTypeInstance()->getEditableAttributes($group, $skipSuperAttribute); + return $this->getTypeInstance() + ->getEditableAttributes($group, $skipSuperAttribute); } /** @@ -387,31 +418,41 @@ class Product extends Model implements ProductContract */ public function getCustomAttributeValue($attribute) { - if (! $attribute) { + if (!$attribute) { return; } - $locale = core()->checkRequestedLocaleCodeInRequestedChannel(); + $locale = core()->checkRequestedLocaleCodeInRequestedChannel(); $channel = core()->getRequestedChannelCode(); - if ( - array_key_exists($this->id, self::$loadedAttributeValues) - && array_key_exists($attribute->id, self::$loadedAttributeValues[$this->id]) - ) { + if (array_key_exists($this->id, self::$loadedAttributeValues) + && array_key_exists($attribute->id, self::$loadedAttributeValues[$this->id])) { return self::$loadedAttributeValues[$this->id][$attribute->id]; } if ($attribute->value_per_channel) { if ($attribute->value_per_locale) { - $attributeValue = $this->attribute_values()->where('channel', $channel)->where('locale', $locale)->where('attribute_id', $attribute->id)->first(); + $attributeValue = $this->attribute_values() + ->where('channel', $channel) + ->where('locale', $locale) + ->where('attribute_id', $attribute->id) + ->first(); } else { - $attributeValue = $this->attribute_values()->where('channel', $channel)->where('attribute_id', $attribute->id)->first(); + $attributeValue = $this->attribute_values() + ->where('channel', $channel) + ->where('attribute_id', $attribute->id) + ->first(); } } else { if ($attribute->value_per_locale) { - $attributeValue = $this->attribute_values()->where('locale', $locale)->where('attribute_id', $attribute->id)->first(); + $attributeValue = $this->attribute_values() + ->where('locale', $locale) + ->where('attribute_id', $attribute->id) + ->first(); } else { - $attributeValue = $this->attribute_values()->where('attribute_id', $attribute->id)->first(); + $attributeValue = $this->attribute_values() + ->where('attribute_id', $attribute->id) + ->first(); } } @@ -423,7 +464,7 @@ class Product extends Model implements ProductContract * * @return array */ - public function attributesToArray() + public function attributesToArray(): array { $attributes = parent::attributesToArray(); @@ -448,6 +489,7 @@ class Product extends Model implements ProductContract * Overrides the default Eloquent query builder. * * @param \Illuminate\Database\Query\Builder $query + * * @return \Webkul\Product\Database\Eloquent\Builder */ public function newEloquentBuilder($query) @@ -476,7 +518,7 @@ class Product extends Model implements ProductContract * * @return object */ - public function checkInLoadedFamilyAttributes() + public function checkInLoadedFamilyAttributes(): object { static $loadedFamilyAttributes = []; @@ -484,7 +526,19 @@ class Product extends Model implements ProductContract return $loadedFamilyAttributes[$this->attribute_family_id]; } - return $loadedFamilyAttributes[$this->attribute_family_id] = core()->getSingletonInstance(AttributeRepository::class) + return $loadedFamilyAttributes[$this->attribute_family_id] = core() + ->getSingletonInstance(AttributeRepository::class) ->getFamilyAttributes($this->attribute_family); } + + /** + * Create a new factory instance for the model. + * + * @return ProductFactory + */ + protected static function newFactory(): ProductFactory + { + return ProductFactory::new(); + } + } diff --git a/packages/Webkul/Product/src/Models/ProductAttributeValue.php b/packages/Webkul/Product/src/Models/ProductAttributeValue.php index 615baf5e5..67ec1cb2b 100755 --- a/packages/Webkul/Product/src/Models/ProductAttributeValue.php +++ b/packages/Webkul/Product/src/Models/ProductAttributeValue.php @@ -4,10 +4,16 @@ namespace Webkul\Product\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Attribute\Models\AttributeProxy; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Product\Database\Factories\ProductAttributeValueFactory; use Webkul\Product\Contracts\ProductAttributeValue as ProductAttributeValueContract; class ProductAttributeValue extends Model implements ProductAttributeValueContract { + + use HasFactory; + /** * Indicates if the model should be timestamped. * @@ -56,7 +62,7 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra /** * Get the attribute that owns the attribute value. */ - public function attribute() + public function attribute(): BelongsTo { return $this->belongsTo(AttributeProxy::modelClass()); } @@ -64,8 +70,19 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra /** * Get the product that owns the attribute value. */ - public function product() + public function product(): BelongsTo { return $this->belongsTo(ProductProxy::modelClass()); } + + /** + * Create a new factory instance for the model. + * + * @return ProductAttributeValueFactory + */ + protected static function newFactory(): ProductAttributeValueFactory + { + return ProductAttributeValueFactory::new(); + } + } diff --git a/packages/Webkul/Product/src/Models/ProductDownloadableLink.php b/packages/Webkul/Product/src/Models/ProductDownloadableLink.php index 88bf361c5..ce1ae4e85 100644 --- a/packages/Webkul/Product/src/Models/ProductDownloadableLink.php +++ b/packages/Webkul/Product/src/Models/ProductDownloadableLink.php @@ -4,10 +4,15 @@ namespace Webkul\Product\Models; use Webkul\Core\Eloquent\TranslatableModel; use Illuminate\Support\Facades\Storage; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Product\Database\Factories\ProductDownloadableLinkFactory; use Webkul\Product\Contracts\ProductDownloadableLink as ProductDownloadableLinkContract; class ProductDownloadableLink extends TranslatableModel implements ProductDownloadableLinkContract { + + use HasFactory; + public $translatedAttributes = ['title']; protected $fillable = [ @@ -31,7 +36,7 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * Get the product that owns the image. */ - public function product() + public function product(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(ProductProxy::modelClass()); } @@ -39,7 +44,7 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * Get image url for the file. */ - public function file_url() + public function file_url(): string { return Storage::url($this->path); } @@ -47,7 +52,7 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * Get image url for the file. */ - public function getFileUrlAttribute() + public function getFileUrlAttribute(): string { return $this->file_url(); } @@ -55,7 +60,7 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * Get image url for the sample file. */ - public function sample_file_url() + public function sample_file_url(): string { return Storage::url($this->path); } @@ -63,7 +68,7 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * Get image url for the sample file. */ - public function getSampleFileUrlAttribute() + public function getSampleFileUrlAttribute(): string { return $this->sample_file_url(); } @@ -71,13 +76,13 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo /** * @return array */ - public function toArray() + public function toArray(): array { $array = parent::toArray(); $translation = $this->translate(core()->getRequestedLocaleCode()); - $array['title'] = $translation ? $translation->title : ''; + $array['title'] = $translation->title ?? ''; $array['file_url'] = $this->file ? Storage::url($this->file) : null; @@ -85,4 +90,15 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo return $array; } + + /** + * Create a new factory instance for the model. + * + * @return ProductDownloadableLinkFactory + */ + protected static function newFactory(): ProductDownloadableLinkFactory + { + return ProductDownloadableLinkFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php b/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php index 8dfe77b4e..e4fa4f764 100644 --- a/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php +++ b/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php @@ -3,11 +3,27 @@ namespace Webkul\Product\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Product\Database\Factories\ProductDownloadableLinkTranslationFactory; use Webkul\Product\Contracts\ProductDownloadableLinkTranslation as ProductDownloadableLinkTranslationContract; class ProductDownloadableLinkTranslation extends Model implements ProductDownloadableLinkTranslationContract { + + use HasFactory; + public $timestamps = false; protected $fillable = ['title']; + + /** + * Create a new factory instance for the model. + * + * @return ProductDownloadableLinkTranslationFactory + */ + protected static function newFactory(): ProductDownloadableLinkTranslationFactory + { + return ProductDownloadableLinkTranslationFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductInventory.php b/packages/Webkul/Product/src/Models/ProductInventory.php index 4b7d41301..faa86ffeb 100755 --- a/packages/Webkul/Product/src/Models/ProductInventory.php +++ b/packages/Webkul/Product/src/Models/ProductInventory.php @@ -4,10 +4,16 @@ namespace Webkul\Product\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Inventory\Models\InventorySourceProxy; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Product\Database\Factories\ProductInventoryFactory; use Webkul\Product\Contracts\ProductInventory as ProductInventoryContract; class ProductInventory extends Model implements ProductInventoryContract { + + use HasFactory; + public $timestamps = false; protected $fillable = [ @@ -20,7 +26,7 @@ class ProductInventory extends Model implements ProductInventoryContract /** * Get the product attribute family that owns the product. */ - public function inventory_source() + public function inventory_source(): BelongsTo { return $this->belongsTo(InventorySourceProxy::modelClass()); } @@ -28,8 +34,19 @@ class ProductInventory extends Model implements ProductInventoryContract /** * Get the product that owns the product inventory. */ - public function product() + public function product(): BelongsTo { return $this->belongsTo(ProductProxy::modelClass()); } + + /** + * Create a new factory instance for the model. + * + * @return ProductInventoryFactory + */ + protected static function newFactory(): ProductInventoryFactory + { + return ProductInventoryFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductReview.php b/packages/Webkul/Product/src/Models/ProductReview.php index 859b38fec..becccc86b 100755 --- a/packages/Webkul/Product/src/Models/ProductReview.php +++ b/packages/Webkul/Product/src/Models/ProductReview.php @@ -5,10 +5,17 @@ namespace Webkul\Product\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Customer\Models\CustomerProxy; use Webkul\Product\Models\Product; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Product\Database\Factories\ProductReviewFactory; use Webkul\Product\Contracts\ProductReview as ProductReviewContract; class ProductReview extends Model implements ProductReviewContract { + + use HasFactory; + protected $fillable = [ 'comment', 'title', @@ -22,7 +29,7 @@ class ProductReview extends Model implements ProductReviewContract /** * Get the product attribute family that owns the product. */ - public function customer() + public function customer(): BelongsTo { return $this->belongsTo(CustomerProxy::modelClass()); } @@ -30,7 +37,7 @@ class ProductReview extends Model implements ProductReviewContract /** * Get the product. */ - public function product() + public function product(): BelongsTo { return $this->belongsTo(ProductProxy::modelClass()); } @@ -38,8 +45,19 @@ class ProductReview extends Model implements ProductReviewContract /** * The images that belong to the review. */ - public function images() + public function images(): HasMany { return $this->hasMany(ProductReviewImageProxy::modelClass(), 'review_id'); } + + /** + * Create a new factory instance for the model. + * + * @return ProductReviewFactory + */ + protected static function newFactory(): ProductReviewFactory + { + return ProductReviewFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php index 783b6a286..745a683eb 100755 --- a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php +++ b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php @@ -2,7 +2,6 @@ namespace Webkul\Product\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; use Webkul\Product\Models\ProductProxy; use Webkul\Product\Observers\ProductObserver; @@ -16,23 +15,22 @@ use Webkul\Product\ProductVideo; class ProductServiceProvider extends ServiceProvider { + /** * Bootstrap services. * * @return void */ - public function boot() + public function boot(): void { - include __DIR__ . '/../Http/helpers.php'; + include __DIR__.'/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - - $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->app->register(EventServiceProvider::class); $this->publishes([ - dirname(__DIR__) . '/Config/imagecache.php' => config_path('imagecache.php'), + dirname(__DIR__).'/Config/imagecache.php' => config_path('imagecache.php'), ]); ProductProxy::observe(ProductObserver::class); @@ -50,8 +48,6 @@ class ProductServiceProvider extends ServiceProvider $this->registerCommands(); $this->registerFacades(); - - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); } /** @@ -61,9 +57,7 @@ class ProductServiceProvider extends ServiceProvider */ public function registerConfig(): void { - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/product_types.php', 'product_types' - ); + $this->mergeConfigFrom(dirname(__DIR__).'/Config/product_types.php', 'product_types'); } /** @@ -74,28 +68,19 @@ class ProductServiceProvider extends ServiceProvider protected function registerCommands(): void { if ($this->app->runningInConsole()) { - $this->commands([PriceUpdate::class, GenerateProducts::class,]); + $this->commands([ + PriceUpdate::class, + GenerateProducts::class, + ]); } } - /** - * Register factories. - * - * @param string $path - * @return void - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } - - /** * Register Bouncer as a singleton. * * @return void */ - protected function registerFacades() + protected function registerFacades(): void { // Product image $loader = AliasLoader::getInstance(); @@ -112,4 +97,5 @@ class ProductServiceProvider extends ServiceProvider return app()->make(ProductVideo::class); }); } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php deleted file mode 100644 index 2ac56182c..000000000 --- a/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php +++ /dev/null @@ -1,26 +0,0 @@ -define(InventorySource::class, function (Faker $faker) { - $code = $faker->unique()->word; - - return [ - 'code' => $faker->unique()->word, - 'name' => $code, - 'description' => $faker->sentence, - 'contact_name' => $faker->name, - 'contact_email' => $faker->safeEmail, - 'contact_number' => $faker->phoneNumber, - 'country' => $faker->countryCode, - 'state' => $faker->state, - 'city' => $faker->city, - 'street' => $faker->streetAddress, - 'postcode' => $faker->postcode, - 'priority' => 0, - 'status' => 1, - ]; -}); diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php index 03c5cd36f..1dbb3fbcb 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php @@ -1,61 +1,96 @@ define(Invoice::class, function (Faker $faker, array $attributes) { - $subTotal = $faker->randomFloat(2); - $shippingAmount = $faker->randomFloat(2); - $taxAmount = $faker->randomFloat(2); +class InvoiceFactory extends Factory +{ - if (! isset($attributes['order_id'])) { - $attributes['order_id'] = function () { - return factory(Order::class)->create()->id; - }; - } + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Invoice::class; - if (! isset($attributes['order_address_id'])) { - $attributes['order_address_id'] = function () use ($attributes) { - return factory(OrderAddress::class) - ->create(['order_id' => $attributes['order_id']]) - ->id; - }; - } - - return [ - 'email_sent' => 0, - 'total_qty' => $faker->randomNumber(), - 'base_currency_code' => 'EUR', - 'channel_currency_code' => 'EUR', - 'order_currency_code' => 'EUR', - 'sub_total' => $subTotal, - 'base_sub_total' => $subTotal, - 'grand_total' => $subTotal, - 'base_grand_total' => $subTotal, - 'shipping_amount' => $shippingAmount, - 'base_shipping_amount' => $shippingAmount, - 'tax_amount' => $taxAmount, - 'base_tax_amount' => $taxAmount, - 'discount_amount' => 0, - 'base_discount_amount' => 0, - 'order_id' => $attributes['order_id'], - 'order_address_id' => $attributes['order_address_id'], + /** + * @var array + */ + protected $states = [ + 'pending', + 'paid', + 'refunded', ]; -}); -$factory->state(Invoice::class, 'pending', [ - 'status' => 'pending', -]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $subTotal = $this->faker->randomFloat(2); + $shippingAmount = $this->faker->randomFloat(2); + $taxAmount = $this->faker->randomFloat(2); -$factory->state(Invoice::class, 'paid', [ - 'status' => 'paid', -]); + if (!isset($attributes['order_id'])) { + $attributes['order_id'] = Order::factory(); + } -$factory->state(Invoice::class, 'refunded', [ - 'status' => 'refunded', -]); + if (!isset($attributes['order_address_id'])) { + $attributes['order_address_id'] = OrderAddress::factory(); + } + return [ + 'email_sent' => 0, + 'total_qty' => $this->faker->randomNumber(), + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'order_currency_code' => 'EUR', + 'sub_total' => $subTotal, + 'base_sub_total' => $subTotal, + 'grand_total' => $subTotal, + 'base_grand_total' => $subTotal, + 'shipping_amount' => $shippingAmount, + 'base_shipping_amount' => $shippingAmount, + 'tax_amount' => $taxAmount, + 'base_tax_amount' => $taxAmount, + 'discount_amount' => 0, + 'base_discount_amount' => 0, + 'order_id' => $attributes['order_id'], + 'order_address_id' => $attributes['order_address_id'], + ]; + } + + public function pending(): InvoiceFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'pending', + ]; + }); + } + + public function paid(): InvoiceFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'paid', + ]; + }); + } + + public function refunded(): InvoiceFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'refunded', + ]; + }); + } + +} \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php index 21cd87411..8895d6e33 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php @@ -1,41 +1,54 @@ define(InvoiceItem::class, function (Faker $faker, array $attributes) { +class InvoiceItemFactory extends Factory +{ - $basePrice = $faker->randomFloat(2); - $quantity = $faker->randomNumber(); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = InvoiceItem::class; - if (! $attributes['order_item_id']) { - $attributes['order_item_id'] = function () { - return factory(OrderItem::class)->create()->id; - }; + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $basePrice = $this->faker->randomFloat(2); + $quantity = $this->faker->randomNumber(); + + if (!isset($attributes['order_item_id'])) { + $attributes['order_item_id'] = OrderItem::factory(); + } + + $orderItem = OrderItem::query() + ->find($attributes['order_item_id']); + + return [ + 'name' => $this->faker->word, + 'sku' => $this->faker->unique()->ean13, + 'qty' => $quantity, + 'price' => $basePrice, + 'base_price' => $basePrice, + 'total' => $quantity * $basePrice, + 'base_total' => $quantity * $basePrice, + 'tax_amount' => 0, + 'base_tax_amount' => 0, + 'product_id' => $orderItem->product_id, + 'product_type' => $orderItem->product_type, + 'order_item_id' => $attributes['order_item_id'], + 'invoice_id' => Invoice::factory(), + ]; } - $orderItem = OrderItem::find($attributes['order_item_id']); - - return [ - 'name' => $faker->word, - 'sku' => $faker->unique()->ean13, - 'qty' => $quantity, - 'price' => $basePrice, - 'base_price' => $basePrice, - 'total' => $quantity * $basePrice, - 'base_total' => $quantity * $basePrice, - 'tax_amount' => 0, - 'base_tax_amount' => 0, - 'product_id' => $orderItem->product_id, - 'product_type' => $orderItem->product_type, - 'order_item_id' => $attributes['order_item_id'], - 'invoice_id' => function () { - return factory(Invoice::class)->create()->id; - }, - ]; -}); +} diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php index d8b44c4bc..e2e91c02e 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php @@ -1,34 +1,64 @@ define(OrderAddress::class, function (Faker $faker) { - $customer = factory(Customer::class)->create(); - $customerAddress = factory(CustomerAddress::class)->make(); +class OrderAddressFactory extends Factory +{ - return [ - 'first_name' => $customer->first_name, - 'last_name' => $customer->last_name, - 'email' => $customer->email, - 'address1' => $customerAddress->address1, - 'country' => $customerAddress->country, - 'state' => $customerAddress->state, - 'city' => $customerAddress->city, - 'postcode' => $customerAddress->postcode, - 'phone' => $customerAddress->phone, - 'address_type' => OrderAddress::ADDRESS_TYPE_BILLING, - 'order_id' => function () { - return factory(Order::class)->create()->id; - }, + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = OrderAddress::class; + + /** + * @var string[] + */ + protected $states = [ + 'shipping', ]; -}); -$factory->state(OrderAddress::class, 'shipping', [ - 'address_type' => OrderAddress::ADDRESS_TYPE_SHIPPING, -]); \ No newline at end of file + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $customer = Customer::factory() + ->create(); + $customerAddress = CustomerAddress::factory() + ->make(); + + return [ + 'first_name' => $customer->first_name, + 'last_name' => $customer->last_name, + 'email' => $customer->email, + 'address1' => $customerAddress->address1, + 'country' => $customerAddress->country, + 'state' => $customerAddress->state, + 'city' => $customerAddress->city, + 'postcode' => $customerAddress->postcode, + 'phone' => $customerAddress->phone, + 'address_type' => OrderAddress::ADDRESS_TYPE_BILLING, + 'order_id' => Order::factory(), + ]; + } + + public function shipping(): void + { + $this->state(function (array $attributes) { + return [ + 'address_type' => OrderAddress::ADDRESS_TYPE_SHIPPING, + ]; + }); + } + +} \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php index a32a31e65..5956bbabc 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php @@ -1,67 +1,109 @@ define(Order::class, function (Faker $faker) { - $lastOrder = DB::table('orders') - ->orderBy('id', 'desc') - ->select('id') - ->first() - ->id ?? 0; +class OrderFactory extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Order::class; - $customer = factory(Customer::class)->create(); - - return [ - 'increment_id' => $lastOrder + 1, - 'status' => 'pending', - 'channel_name' => 'Default', - 'is_guest' => 0, - 'customer_id' => $customer->id, - 'customer_email' => $customer->email, - 'customer_first_name' => $customer->first_name, - 'customer_last_name' => $customer->last_name, - 'is_gift' => 0, - 'total_item_count' => 1, - 'total_qty_ordered' => 1, - 'base_currency_code' => 'EUR', - 'channel_currency_code' => 'EUR', - 'order_currency_code' => 'EUR', - 'grand_total' => 0.0000, - 'base_grand_total' => 0.0000, - 'grand_total_invoiced' => 0.0000, - 'base_grand_total_invoiced' => 0.0000, - 'grand_total_refunded' => 0.0000, - 'base_grand_total_refunded' => 0.0000, - 'sub_total' => 0.0000, - 'base_sub_total' => 0.0000, - 'sub_total_invoiced' => 0.0000, - 'base_sub_total_invoiced' => 0.0000, - 'sub_total_refunded' => 0.0000, - 'base_sub_total_refunded' => 0.0000, - 'customer_type' => Customer::class, - 'channel_id' => 1, - 'channel_type' => Channel::class, - 'cart_id' => 0, - 'shipping_method' => 'free_free', - 'shipping_title' => 'Free Shipping', + /** + * @var string[] + */ + protected $states = [ + 'pending', + 'completed', + 'closed', ]; -}); -$factory->state(Order::class, 'pending', [ - 'status' => 'pending', -]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $lastOrder = DB::table('orders') + ->orderBy('id', 'desc') + ->select('id') + ->first()->id ?? 0; -$factory->state(Order::class, 'completed', [ - 'status' => 'completed', -]); -$factory->state(Order::class, 'closed', [ - 'status' => 'closed', -]); + $customer = Customer::factory() + ->create(); + + return [ + 'increment_id' => $lastOrder + 1, + 'status' => 'pending', + 'channel_name' => 'Default', + 'is_guest' => 0, + 'customer_id' => $customer->id, + 'customer_email' => $customer->email, + 'customer_first_name' => $customer->first_name, + 'customer_last_name' => $customer->last_name, + 'is_gift' => 0, + 'total_item_count' => 1, + 'total_qty_ordered' => 1, + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'order_currency_code' => 'EUR', + 'grand_total' => 0.0000, + 'base_grand_total' => 0.0000, + 'grand_total_invoiced' => 0.0000, + 'base_grand_total_invoiced' => 0.0000, + 'grand_total_refunded' => 0.0000, + 'base_grand_total_refunded' => 0.0000, + 'sub_total' => 0.0000, + 'base_sub_total' => 0.0000, + 'sub_total_invoiced' => 0.0000, + 'base_sub_total_invoiced' => 0.0000, + 'sub_total_refunded' => 0.0000, + 'base_sub_total_refunded' => 0.0000, + 'customer_type' => Customer::class, + 'channel_id' => 1, + 'channel_type' => Channel::class, + 'cart_id' => 0, + 'shipping_method' => 'free_free', + 'shipping_title' => 'Free Shipping', + ]; + } + + public function pending(): OrderFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'pending', + ]; + }); + } + + public function completed(): OrderFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'completed', + ]; + }); + } + + public function closed(): OrderFactory + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'closed', + ]; + }); + } + +} diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php index 7eeb89c7b..e58c0fb0d 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php @@ -1,43 +1,62 @@ define(OrderItem::class, function (Faker $faker, array $attributes) { - $now = date("Y-m-d H:i:s"); +class OrderItemFactory extends Factory +{ - if (isset($attributes['product_id'])) { - $product = Product::where('id', $attributes['product_id'])->first(); - } else { - $product = factory(Product::class)->create(); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = OrderItem::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $now = date("Y-m-d H:i:s"); + + if (isset($attributes['product_id'])) { + $product = Product::query() + ->where('id', $attributes['product_id']) + ->first(); + } else { + $product = Product::factory() + ->create(); + } + + $fallbackPrice = $this->faker->randomFloat(4, 0, 1000); + + return [ + 'sku' => $product->sku, + 'type' => $product->type, + 'name' => $product->name, + 'price' => $product->price ?? $fallbackPrice, + 'base_price' => $product->price ?? $fallbackPrice, + 'total' => $product->price ?? $fallbackPrice, + 'base_total' => $product->price ?? $fallbackPrice, + 'product_id' => $product->id, + 'qty_ordered' => 1, + 'qty_shipped' => 0, + 'qty_invoiced' => 0, + 'qty_canceled' => 0, + 'qty_refunded' => 0, + 'additional' => [], + 'order_id' => Order::factory(), + 'created_at' => $now, + 'updated_at' => $now, + 'product_type' => Product::class, + ]; } - $fallbackPrice = $faker->randomFloat(4, 0, 1000); - - return [ - 'sku' => $product->sku, - 'type' => $product->type, - 'name' => $product->name, - 'price' => $product->price ?? $fallbackPrice, - 'base_price' => $product->price ?? $fallbackPrice, - 'total' => $product->price ?? $fallbackPrice, - 'base_total' => $product->price ?? $fallbackPrice, - 'product_id' => $product->id, - 'qty_ordered' => 1, - 'qty_shipped' => 0, - 'qty_invoiced' => 0, - 'qty_canceled' => 0, - 'qty_refunded' => 0, - 'additional' => [], - 'order_id' => function () { - return factory(Order::class)->create()->id; - }, - 'created_at' => $now, - 'updated_at' => $now, - 'product_type' => Product::class, - ]; -}); \ No newline at end of file +} \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php index 5acce649d..a0be980ef 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php @@ -1,19 +1,31 @@ define(OrderPayment::class, function (Faker $faker, array $attributes) { +class OrderPaymentFactory extends Factory +{ - if (!array_key_exists('order_id', $attributes)) { - throw new InvalidArgumentException('order_id must be provided.'); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = OrderPayment::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'method' => 'cashondelivery', + ]; } - return [ - 'method' => 'cashondelivery', - ]; -}); +} diff --git a/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php index c4a5ba62a..4dfd66300 100644 --- a/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php @@ -1,16 +1,32 @@ define(Refund::class, function (Faker $faker, array $attributes) { - return [ - 'order_id' => function () { - return factory(Order::class)->create()->id; - }, - ]; -}); +class RefundFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Refund::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'order_id' => Order::factory(), + ]; + } + +} diff --git a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php index 4332e18d3..339e7b99a 100644 --- a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php @@ -1,22 +1,39 @@ define(Shipment::class, function (Faker $faker) { - $address = factory(OrderAddress::class)->create(); +class ShipmentFactory extends Factory +{ - return [ - 'total_qty' => $faker->numberBetween(1, 20), - 'order_id' => $address->order_id, - 'order_address_id' => $address->id, - 'inventory_source_id' => function () { - return factory(InventorySource::class)->create()->id; - }, - ]; -}); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Shipment::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $address = OrderAddress::factory() + ->create(); + + return [ + 'total_qty' => $this->faker->numberBetween(1, 20), + 'order_id' => $address->order_id, + 'order_address_id' => $address->id, + 'inventory_source_id' => InventorySource::factory(), + ]; + } + +} diff --git a/packages/Webkul/Sales/src/Models/Invoice.php b/packages/Webkul/Sales/src/Models/Invoice.php index 3ce7d640d..785f4c52d 100755 --- a/packages/Webkul/Sales/src/Models/Invoice.php +++ b/packages/Webkul/Sales/src/Models/Invoice.php @@ -3,19 +3,30 @@ namespace Webkul\Sales\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\HasMany; use Webkul\Sales\Contracts\Invoice as InvoiceContract; use Webkul\Sales\Traits\PaymentTerm; +use Webkul\Sales\Database\Factories\InvoiceFactory; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Invoice extends Model implements InvoiceContract { + use PaymentTerm; + use HasFactory; /** * The attributes that aren't mass assignable. * * @var string[]|bool */ - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; /** * Invoice status. @@ -33,13 +44,13 @@ class Invoice extends Model implements InvoiceContract */ public function getStatusLabelAttribute() { - return isset($this->statusLabel[$this->state]) ? $this->statusLabel[$this->state] : ''; + return $this->statusLabel[$this->state] ?? ''; } /** * Get the order that belongs to the invoice. */ - public function order() + public function order(): BelongsTo { return $this->belongsTo(OrderProxy::modelClass()); } @@ -47,15 +58,16 @@ class Invoice extends Model implements InvoiceContract /** * Get the invoice items record associated with the invoice. */ - public function items() + public function items(): HasMany { - return $this->hasMany(InvoiceItemProxy::modelClass())->whereNull('parent_id'); + return $this->hasMany(InvoiceItemProxy::modelClass()) + ->whereNull('parent_id'); } /** * Get the customer record associated with the invoice. */ - public function customer() + public function customer(): MorphTo { return $this->morphTo(); } @@ -63,7 +75,7 @@ class Invoice extends Model implements InvoiceContract /** * Get the channel record associated with the invoice. */ - public function channel() + public function channel(): MorphTo { return $this->morphTo(); } @@ -71,9 +83,20 @@ class Invoice extends Model implements InvoiceContract /** * Get the address for the invoice. */ - public function address() + public function address(): BelongsTo { return $this->belongsTo(OrderAddressProxy::modelClass(), 'order_address_id') - ->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING); + ->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING); } + + /** + * Create a new factory instance for the model. + * + * @return InvoiceFactory + */ + protected static function newFactory(): InvoiceFactory + { + return InvoiceFactory::new(); + } + } diff --git a/packages/Webkul/Sales/src/Models/InvoiceItem.php b/packages/Webkul/Sales/src/Models/InvoiceItem.php index 9eaa6f47c..de39941f0 100755 --- a/packages/Webkul/Sales/src/Models/InvoiceItem.php +++ b/packages/Webkul/Sales/src/Models/InvoiceItem.php @@ -2,12 +2,26 @@ namespace Webkul\Sales\Models; +use Webkul\Product\Type\AbstractType; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Sales\Database\Factories\InvoiceItemFactory; use Webkul\Sales\Contracts\InvoiceItem as InvoiceItemContract; class InvoiceItem extends Model implements InvoiceItemContract { - protected $guarded = ['id', 'created_at', 'updated_at']; + + use HasFactory; + + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; protected $casts = [ 'additional' => 'array', @@ -18,15 +32,15 @@ class InvoiceItem extends Model implements InvoiceItemContract * * @return AbstractType */ - public function getTypeInstance() + public function getTypeInstance(): AbstractType { return $this->order_item->getTypeInstance(); } - + /** * Get the invoice record associated with the invoice item. */ - public function invoice() + public function invoice(): BelongsTo { return $this->belongsTo(InvoiceProxy::modelClass()); } @@ -34,7 +48,7 @@ class InvoiceItem extends Model implements InvoiceItemContract /** * Get the order item record associated with the invoice item. */ - public function order_item() + public function order_item(): BelongsTo { return $this->belongsTo(OrderItemProxy::modelClass()); } @@ -42,7 +56,7 @@ class InvoiceItem extends Model implements InvoiceItemContract /** * Get the invoice record associated with the invoice item. */ - public function product() + public function product(): MorphTo { return $this->morphTo(); } @@ -50,7 +64,7 @@ class InvoiceItem extends Model implements InvoiceItemContract /** * Get the child item record associated with the invoice item. */ - public function child() + public function child(): HasOne { return $this->hasOne(InvoiceItemProxy::modelClass(), 'parent_id'); } @@ -58,7 +72,7 @@ class InvoiceItem extends Model implements InvoiceItemContract /** * Get the children items. */ - public function children() + public function children(): HasMany { return $this->hasMany(self::class, 'parent_id'); } @@ -70,4 +84,15 @@ class InvoiceItem extends Model implements InvoiceItemContract { return $this->order_item->type; } + + /** + * Create a new factory instance for the model. + * + * @return InvoiceItemFactory + */ + protected static function newFactory(): InvoiceItemFactory + { + return InvoiceItemFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Order.php b/packages/Webkul/Sales/src/Models/Order.php index e9df0aecd..21687144b 100755 --- a/packages/Webkul/Sales/src/Models/Order.php +++ b/packages/Webkul/Sales/src/Models/Order.php @@ -5,15 +5,26 @@ namespace Webkul\Sales\Models; use Webkul\Checkout\Models\CartProxy; use Illuminate\Database\Eloquent\Model; use Webkul\Sales\Contracts\Order as OrderContract; +use Webkul\Sales\Database\Factories\OrderFactory; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Order extends Model implements OrderContract { + + use HasFactory; + public const STATUS_PENDING = 'pending'; + public const STATUS_PENDING_PAYMENT = 'pending_payment'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_CANCELED = 'canceled'; + public const STATUS_CLOSED = 'closed'; + public const STATUS_FRAUD = 'fraud'; protected $guarded = [ @@ -41,9 +52,9 @@ class Order extends Model implements OrderContract /** * Get the order items record associated with the order. */ - public function getCustomerFullNameAttribute() + public function getCustomerFullNameAttribute(): string { - return $this->customer_first_name . ' ' . $this->customer_last_name; + return $this->customer_first_name.' '.$this->customer_last_name; } /** @@ -73,7 +84,7 @@ class Order extends Model implements OrderContract /** * Get the associated cart that was used to create this order. */ - public function cart() + public function cart(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(CartProxy::modelClass()); } @@ -81,15 +92,16 @@ class Order extends Model implements OrderContract /** * Get the order items record associated with the order. */ - public function items() + public function items(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->hasMany(OrderItemProxy::modelClass())->whereNull('parent_id'); + return $this->hasMany(OrderItemProxy::modelClass()) + ->whereNull('parent_id'); } /** * Get the comments record associated with the order. */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(OrderCommentProxy::modelClass()); } @@ -97,7 +109,7 @@ class Order extends Model implements OrderContract /** * Get the order items record associated with the order. */ - public function all_items() + public function all_items(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(OrderItemProxy::modelClass()); } @@ -105,7 +117,7 @@ class Order extends Model implements OrderContract /** * Get the order shipments record associated with the order. */ - public function shipments() + public function shipments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ShipmentProxy::modelClass()); } @@ -113,7 +125,7 @@ class Order extends Model implements OrderContract /** * Get the order invoices record associated with the order. */ - public function invoices() + public function invoices(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(InvoiceProxy::modelClass()); } @@ -121,7 +133,7 @@ class Order extends Model implements OrderContract /** * Get the order refunds record associated with the order. */ - public function refunds() + public function refunds(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(RefundProxy::modelClass()); } @@ -129,7 +141,7 @@ class Order extends Model implements OrderContract /** * Get the order transactions record associated with the order. */ - public function transactions() + public function transactions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(OrderTransactionProxy::modelClass()); } @@ -137,7 +149,7 @@ class Order extends Model implements OrderContract /** * Get the customer record associated with the order. */ - public function customer() + public function customer(): \Illuminate\Database\Eloquent\Relations\MorphTo { return $this->morphTo(); } @@ -145,7 +157,7 @@ class Order extends Model implements OrderContract /** * Get the addresses for the order. */ - public function addresses() + public function addresses(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(OrderAddressProxy::modelClass()); } @@ -153,17 +165,18 @@ class Order extends Model implements OrderContract /** * Get the payment for the order. */ - public function payment() + public function payment(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(OrderPaymentProxy::modelClass()); } /** - * Get the biling address for the order. + * Get the billing address for the order. */ - public function billing_address() + public function billing_address(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->addresses()->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING); + return $this->addresses() + ->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING); } /** @@ -171,15 +184,17 @@ class Order extends Model implements OrderContract */ public function getBillingAddressAttribute() { - return $this->billing_address()->first(); + return $this->billing_address() + ->first(); } /** * Get the shipping address for the order. */ - public function shipping_address() + public function shipping_address(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->addresses()->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING); + return $this->addresses() + ->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING); } /** @@ -187,7 +202,8 @@ class Order extends Model implements OrderContract */ public function getShippingAddressAttribute() { - return $this->shipping_address()->first(); + return $this->shipping_address() + ->first(); } /** @@ -206,7 +222,8 @@ class Order extends Model implements OrderContract public function haveStockableItems(): bool { foreach ($this->items as $item) { - if ($item->getTypeInstance()->isStockable()) { + if ($item->getTypeInstance() + ->isStockable()) { return true; } } @@ -268,12 +285,13 @@ class Order extends Model implements OrderContract if ($this->payment->method == 'moneytransfer' && core()->getConfigData('sales.paymentmethods.moneytransfer.generate_invoice')) { return false; } - + if ($this->status === self::STATUS_FRAUD) { return false; } - $pendingInvoice = $this->invoices->where('state', 'pending')->first(); + $pendingInvoice = $this->invoices->where('state', 'pending') + ->first(); if ($pendingInvoice) { return true; } @@ -297,8 +315,9 @@ class Order extends Model implements OrderContract if ($this->status === self::STATUS_FRAUD) { return false; } - - $pendingInvoice = $this->invoices->where('state', 'pending')->first(); + + $pendingInvoice = $this->invoices->where('state', 'pending') + ->first(); if ($pendingInvoice) { return false; } @@ -309,10 +328,22 @@ class Order extends Model implements OrderContract } } - if ($this->base_grand_total_invoiced - $this->base_grand_total_refunded - $this->refunds()->sum('base_adjustment_fee') > 0) { + if ($this->base_grand_total_invoiced - $this->base_grand_total_refunded - $this->refunds() + ->sum('base_adjustment_fee') > 0) { return true; } return false; } + + /** + * Create a new factory instance for the model. + * + * @return OrderFactory + */ + protected static function newFactory(): OrderFactory + { + return OrderFactory::new(); + } + } diff --git a/packages/Webkul/Sales/src/Models/OrderAddress.php b/packages/Webkul/Sales/src/Models/OrderAddress.php index a8a63f700..4358a764d 100755 --- a/packages/Webkul/Sales/src/Models/OrderAddress.php +++ b/packages/Webkul/Sales/src/Models/OrderAddress.php @@ -4,20 +4,28 @@ namespace Webkul\Sales\Models; use Webkul\Checkout\Models\CartAddress; use Webkul\Core\Models\Address; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Sales\Database\Factories\OrderAddressFactory; use Webkul\Sales\Contracts\OrderAddress as OrderAddressContract; use Illuminate\Database\Eloquent\Builder; /** * Class OrderAddress + * * @package Webkul\Sales\Models * * @property integer $order_id - * @property Order $order + * @property Order $order * */ class OrderAddress extends Address implements OrderAddressContract { + + use HasFactory; + public const ADDRESS_TYPE_SHIPPING = 'order_shipping'; + public const ADDRESS_TYPE_BILLING = 'order_billing'; /** @@ -32,12 +40,12 @@ class OrderAddress extends Address implements OrderAddressContract * * @return void */ - protected static function boot() + protected static function boot(): void { static::addGlobalScope('address_type', function (Builder $builder) { $builder->whereIn('address_type', [ self::ADDRESS_TYPE_BILLING, - self::ADDRESS_TYPE_SHIPPING + self::ADDRESS_TYPE_SHIPPING, ]); }); @@ -58,8 +66,19 @@ class OrderAddress extends Address implements OrderAddressContract /** * Get the order record associated with the address. */ - public function order() + public function order(): BelongsTo { return $this->belongsTo(Order::class); } + + /** + * Create a new factory instance for the model. + * + * @return OrderAddressFactory + */ + protected static function newFactory(): OrderAddressFactory + { + return OrderAddressFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/OrderItem.php b/packages/Webkul/Sales/src/Models/OrderItem.php index cfd479d4e..5c43f37cb 100755 --- a/packages/Webkul/Sales/src/Models/OrderItem.php +++ b/packages/Webkul/Sales/src/Models/OrderItem.php @@ -2,12 +2,21 @@ namespace Webkul\Sales\Models; +use Webkul\Product\Type\AbstractType; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Webkul\Sales\Database\Factories\OrderItemFactory; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Sales\Contracts\OrderItem as OrderItemContract; -use Webkul\Product\Models\Product; class OrderItem extends Model implements OrderItemContract { + + use HasFactory; + protected $guarded = [ 'id', 'child', @@ -27,13 +36,13 @@ class OrderItem extends Model implements OrderItemContract * * @return AbstractType */ - public function getTypeInstance() + public function getTypeInstance(): AbstractType { if ($this->typeInstance) { return $this->typeInstance; } - $this->typeInstance = app(config('product_types.' . $this->type . '.class')); + $this->typeInstance = app(config('product_types.'.$this->type.'.class')); if ($this->product) { $this->typeInstance->setProduct($this); @@ -45,17 +54,18 @@ class OrderItem extends Model implements OrderItemContract /** * @return bool */ - public function isStockable() + public function isStockable(): bool { - return $this->getTypeInstance()->isStockable(); + return $this->getTypeInstance() + ->isStockable(); } /** - * Checks if new shipment is allow or not + * Checks if new shipment is allowed or not */ - public function canShip() + public function canShip(): bool { - if (! $this->isStockable()) { + if (!$this->isStockable()) { return false; } @@ -71,7 +81,7 @@ class OrderItem extends Model implements OrderItemContract */ public function getQtyToShipAttribute() { - if (! $this->isStockable()) { + if (!$this->isStockable()) { return 0; } @@ -101,13 +111,9 @@ class OrderItem extends Model implements OrderItemContract /** * Checks if new cancel is allow or not */ - public function canCancel() + public function canCancel(): bool { - if ($this->qty_to_cancel > 0) { - return true; - } - - return false; + return $this->qty_to_cancel > 0; } /** @@ -129,7 +135,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the order record associated with the order item. */ - public function order() + public function order(): BelongsTo { return $this->belongsTo(OrderProxy::modelClass()); } @@ -137,7 +143,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the product record associated with the order item. */ - public function product() + public function product(): MorphTo { return $this->morphTo(); } @@ -145,7 +151,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the child item record associated with the order item. */ - public function child() + public function child(): HasOne { return $this->hasOne(OrderItemProxy::modelClass(), 'parent_id'); } @@ -153,7 +159,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the parent item record associated with the order item. */ - public function parent() + public function parent(): BelongsTo { return $this->belongsTo(self::class, 'parent_id'); } @@ -161,7 +167,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the children items. */ - public function children() + public function children(): HasMany { return $this->hasMany(self::class, 'parent_id'); } @@ -169,7 +175,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the invoice items record associated with the order item. */ - public function invoice_items() + public function invoice_items(): HasMany { return $this->hasMany(InvoiceItemProxy::modelClass()); } @@ -177,7 +183,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the shipment items record associated with the order item. */ - public function shipment_items() + public function shipment_items(): HasMany { return $this->hasMany(ShipmentItemProxy::modelClass()); } @@ -185,7 +191,7 @@ class OrderItem extends Model implements OrderItemContract /** * Get the refund items record associated with the order item. */ - public function refund_items() + public function refund_items(): HasMany { return $this->hasMany(RefundItemProxy::modelClass()); } @@ -193,7 +199,7 @@ class OrderItem extends Model implements OrderItemContract /** * Returns configurable option html */ - public function downloadable_link_purchased() + public function downloadable_link_purchased(): HasMany { return $this->hasMany(DownloadableLinkPurchasedProxy::modelClass()); } @@ -201,7 +207,7 @@ class OrderItem extends Model implements OrderItemContract /** * @return array */ - public function toArray() + public function toArray(): array { $array = parent::toArray(); @@ -217,4 +223,15 @@ class OrderItem extends Model implements OrderItemContract return $array; } + + /** + * Create a new factory instance for the model. + * + * @return OrderItemFactory + */ + protected static function newFactory(): OrderItemFactory + { + return OrderItemFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/OrderPayment.php b/packages/Webkul/Sales/src/Models/OrderPayment.php index 23eeccd5f..34eedb442 100755 --- a/packages/Webkul/Sales/src/Models/OrderPayment.php +++ b/packages/Webkul/Sales/src/Models/OrderPayment.php @@ -3,10 +3,15 @@ namespace Webkul\Sales\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Sales\Database\Factories\OrderPaymentFactory; use Webkul\Sales\Contracts\OrderPayment as OrderPaymentContract; class OrderPayment extends Model implements OrderPaymentContract { + + use HasFactory; + protected $table = 'order_payment'; protected $guarded = [ @@ -16,6 +21,17 @@ class OrderPayment extends Model implements OrderPaymentContract ]; protected $casts = [ - 'additional' => 'array' + 'additional' => 'array', ]; + + /** + * Create a new factory instance for the model. + * + * @return OrderPaymentFactory + */ + protected static function newFactory(): OrderPaymentFactory + { + return OrderPaymentFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Refund.php b/packages/Webkul/Sales/src/Models/Refund.php index fa70bbc23..645cc60ef 100644 --- a/packages/Webkul/Sales/src/Models/Refund.php +++ b/packages/Webkul/Sales/src/Models/Refund.php @@ -3,31 +3,38 @@ namespace Webkul\Sales\Models; use Illuminate\Database\Eloquent\Model; +use Webkul\Sales\Database\Factories\RefundFactory; use Webkul\Sales\Contracts\Refund as RefundContract; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Refund extends Model implements RefundContract { + + use HasFactory; + protected $guarded = [ 'id', 'created_at', 'updated_at', ]; - protected $statusLabel = [ - ]; + protected $statusLabel = []; /** * Returns the status label from status code */ public function getStatusLabelAttribute() { - return isset($this->statusLabel[$this->state]) ? $this->statusLabel[$this->state] : ''; + return $this->statusLabel[$this->state] ?? ''; } /** * Get the order that belongs to the Refund. */ - public function order() + public function order(): BelongsTo { return $this->belongsTo(OrderProxy::modelClass()); } @@ -35,14 +42,16 @@ class Refund extends Model implements RefundContract /** * Get the Refund items record associated with the Refund. */ - public function items() { - return $this->hasMany(RefundItemProxy::modelClass())->whereNull('parent_id'); + public function items(): HasMany + { + return $this->hasMany(RefundItemProxy::modelClass()) + ->whereNull('parent_id'); } /** * Get the customer record associated with the Refund. */ - public function customer() + public function customer(): MorphTo { return $this->morphTo(); } @@ -50,7 +59,7 @@ class Refund extends Model implements RefundContract /** * Get the channel record associated with the Refund. */ - public function channel() + public function channel(): MorphTo { return $this->morphTo(); } @@ -58,8 +67,19 @@ class Refund extends Model implements RefundContract /** * Get the addresses for the shipment. */ - public function address() + public function address(): BelongsTo { return $this->belongsTo(OrderAddressProxy::modelClass(), 'order_address_id'); } + + /** + * Create a new factory instance for the model. + * + * @return RefundFactory + */ + protected static function newFactory(): RefundFactory + { + return RefundFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Shipment.php b/packages/Webkul/Sales/src/Models/Shipment.php index 8dc2cbb87..942060a3d 100755 --- a/packages/Webkul/Sales/src/Models/Shipment.php +++ b/packages/Webkul/Sales/src/Models/Shipment.php @@ -4,10 +4,18 @@ namespace Webkul\Sales\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Inventory\Models\InventorySource; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Webkul\Sales\Database\Factories\ShipmentFactory; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Sales\Contracts\Shipment as ShipmentContract; class Shipment extends Model implements ShipmentContract { + + use HasFactory; + protected $guarded = [ 'id', 'created_at', @@ -17,7 +25,7 @@ class Shipment extends Model implements ShipmentContract /** * Get the order that belongs to the invoice. */ - public function order() + public function order(): BelongsTo { return $this->belongsTo(OrderProxy::modelClass()); } @@ -25,7 +33,7 @@ class Shipment extends Model implements ShipmentContract /** * Get the shipment items record associated with the shipment. */ - public function items() + public function items(): HasMany { return $this->hasMany(ShipmentItemProxy::modelClass()); } @@ -33,7 +41,7 @@ class Shipment extends Model implements ShipmentContract /** * Get the inventory source associated with the shipment. */ - public function inventory_source() + public function inventory_source(): BelongsTo { return $this->belongsTo(InventorySource::class, 'inventory_source_id'); } @@ -41,7 +49,7 @@ class Shipment extends Model implements ShipmentContract /** * Get the customer record associated with the shipment. */ - public function customer() + public function customer(): MorphTo { return $this->morphTo(); } @@ -49,9 +57,20 @@ class Shipment extends Model implements ShipmentContract /** * Get the address for the shipment. */ - public function address() + public function address(): BelongsTo { return $this->belongsTo(OrderAddressProxy::modelClass(), 'order_address_id') - ->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING); + ->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING); } + + /** + * Create a new factory instance for the model. + * + * @return ShipmentFactory + */ + protected static function newFactory(): ShipmentFactory + { + return ShipmentFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php index a3d2a6003..f966f91ac 100755 --- a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php +++ b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php @@ -2,41 +2,24 @@ namespace Webkul\Sales\Providers; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; class SalesServiceProvider extends ServiceProvider { - public function boot() + + public function boot(): void { - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); } /** * Register services. * * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException */ - public function register() + public function register(): void { - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); - - $this->mergeConfigFrom( - dirname(__DIR__) . '/Config/system.php', 'core' - ); + $this->mergeConfigFrom(dirname(__DIR__).'/Config/system.php', 'core'); } - /** - * Register factories. - * - * @param string $path - * - * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException - */ - protected function registerEloquentFactoriesFrom($path): void - { - $this->app->make(EloquentFactory::class)->load($path); - } } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php index a0aab3cab..2078f7398 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php @@ -1,14 +1,32 @@ define(TaxCategory::class, function (Faker $faker) { - return [ - 'code' => $faker->uuid, - 'name' => $faker->words(2, true), - 'description' => $faker->sentence(10), - ]; -}); +class TaxCategoryFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = TaxCategory::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'code' => $this->faker->uuid, + 'name' => $this->faker->words(2, true), + 'description' => $this->faker->sentence(10), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php index 7e7d50769..bd90e0300 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php @@ -1,19 +1,34 @@ TaxCategory::factory(), + 'tax_rate_id' => TaxRate::factory(), + ]; + } + +} -$factory->define(TaxMap::class, function (Faker $faker) { - return [ - 'tax_category_id' => function () { - return factory(TaxCategory::class)->create()->id; - }, - 'tax_rate_id' => function () { - return factory(TaxRate::class)->create()->id; - }, - ]; -}); diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php index a611bebc0..0008f14a4 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php @@ -1,19 +1,37 @@ define(TaxRate::class, function (Faker $faker) { - return [ - 'identifier' => $faker->uuid, - 'is_zip' => 0, - 'zip_code' => '*', - 'zip_from' => null, - 'zip_to' => null, - 'state' => '', - 'country' => $faker->countryCode, - 'tax_rate' => $faker->randomFloat(2, 3, 25), - ]; -}); +class TaxRateFactory extends Factory +{ + + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = TaxRate::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'identifier' => $this->faker->uuid, + 'is_zip' => 0, + 'zip_code' => '*', + 'zip_from' => null, + 'zip_to' => null, + 'state' => '', + 'country' => $this->faker->countryCode, + 'tax_rate' => $this->faker->randomFloat(2, 3, 25), + ]; + } + +} \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxCategory.php b/packages/Webkul/Tax/src/Models/TaxCategory.php index 011e37106..e2984ecf9 100755 --- a/packages/Webkul/Tax/src/Models/TaxCategory.php +++ b/packages/Webkul/Tax/src/Models/TaxCategory.php @@ -3,10 +3,16 @@ namespace Webkul\Tax\Models; use Illuminate\Database\Eloquent\Model; +use Webkul\Tax\Database\Factories\TaxCategoryFactory; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Webkul\Tax\Contracts\TaxCategory as TaxCategoryContract; class TaxCategory extends Model implements TaxCategoryContract { + + use HasFactory; + /** * The attributes that are mass assignable. * @@ -16,14 +22,26 @@ class TaxCategory extends Model implements TaxCategoryContract protected $table = 'tax_categories'; protected $fillable = [ - 'code', - 'name', - 'description', + 'code', + 'name', + 'description', ]; //for joining the two way pivot table - public function tax_rates() + public function tax_rates(): BelongsToMany { - return $this->belongsToMany(TaxRateProxy::modelClass(), 'tax_categories_tax_rates', 'tax_category_id')->withPivot('id'); + return $this->belongsToMany(TaxRateProxy::modelClass(), 'tax_categories_tax_rates', 'tax_category_id') + ->withPivot('id'); } + + /** + * Create a new factory instance for the model. + * + * @return TaxCategoryFactory + */ + protected static function newFactory(): TaxCategoryFactory + { + return TaxCategoryFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxMap.php b/packages/Webkul/Tax/src/Models/TaxMap.php index a74c5fa1f..f1aeda2f9 100755 --- a/packages/Webkul/Tax/src/Models/TaxMap.php +++ b/packages/Webkul/Tax/src/Models/TaxMap.php @@ -5,10 +5,14 @@ namespace Webkul\Tax\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Tax\Models\TaxCategory; use Webkul\Tax\Models\TaxRate; +use Webkul\Tax\Database\Factories\TaxMapFactory; use Webkul\Tax\Contracts\TaxMap as TaxMapContract; +use Illuminate\Database\Eloquent\Factories\HasFactory; class TaxMap extends Model implements TaxMapContract { + use HasFactory; + /** * The attributes that are mass assignable. * @@ -22,4 +26,14 @@ class TaxMap extends Model implements TaxMapContract 'tax_rate_id', ]; + /** + * Create a new factory instance for the model. + * + * @return TaxMapFactory + */ + protected static function newFactory(): TaxMapFactory + { + return TaxMapFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxRate.php b/packages/Webkul/Tax/src/Models/TaxRate.php index 404d4a154..b3a8fdb0d 100755 --- a/packages/Webkul/Tax/src/Models/TaxRate.php +++ b/packages/Webkul/Tax/src/Models/TaxRate.php @@ -4,10 +4,14 @@ namespace Webkul\Tax\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Tax\Models\TaxCategory; +use Webkul\Tax\Database\Factories\TaxRateFactory; use Webkul\Tax\Contracts\TaxRate as TaxRateContract; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; class TaxRate extends Model implements TaxRateContract { + use HasFactory; /** * The attributes that are mass assignable. * @@ -27,8 +31,19 @@ class TaxRate extends Model implements TaxRateContract 'tax_rate', ]; - public function tax_categories() + public function tax_categories(): BelongsToMany { return $this->belongsToMany(TaxCategoryProxy::modelClass(), 'tax_categories_tax_rates', 'tax_rate_id', 'id'); } + + /** + * Create a new factory instance for the model. + * + * @return TaxRateFactory + */ + protected static function newFactory(): TaxRateFactory + { + return TaxRateFactory::new(); + } + } \ No newline at end of file From 1320e493d248abfe80f978f9f403aed275295cbc Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Mon, 4 Oct 2021 16:35:47 +0300 Subject: [PATCH 02/18] - working on test cases. - update codeception driver for laravel. --- composer.json | 3 +- composer.lock | 1608 ++++++++++------- .../Factories/AttributeOptionFactory.php | 2 +- .../Attribute/src/Models/AttributeFamily.php | 57 +- .../Attribute/src/Models/AttributeOption.php | 17 +- .../Webkul/CartRule/src/Models/CartRule.php | 2 +- .../Database/Factories/CategoryFactory.php | 2 +- .../Webkul/Category/src/Models/Category.php | 46 +- .../src/Models/CategoryTranslation.php | 2 + .../src/Database/Factories/CartFactory.php | 6 +- .../Database/Factories/CartRuleFactory.php | 2 +- .../Core/src/Helpers/Laravel5Helper.php | 75 +- .../ProductAttributeValueFactory.php | 2 +- .../Database/Factories/OrderItemFactory.php | 1 + 14 files changed, 1045 insertions(+), 780 deletions(-) diff --git a/composer.json b/composer.json index e78a54f53..f7cd87193 100755 --- a/composer.json +++ b/composer.json @@ -42,7 +42,8 @@ "codeception/codeception": "^4.1", "codeception/module-asserts": "^1.1", "codeception/module-filesystem": "^1.0", - "codeception/module-laravel5": "^1.0", + "codeception/module-laravel": "^2.0", + "codeception/module-laravel5": "^1.1", "codeception/module-webdriver": "^1.0", "filp/whoops": "^2.0", "mockery/mockery": "^1.3.1", diff --git a/composer.lock b/composer.lock index 3189b4011..20612125b 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": "487d5fda315fc77479141cb31da7a32c", + "content-hash": "b8c13c4e3310a5c05c64b4137d4d314b", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -166,20 +166,71 @@ "time": "2020-11-19T14:10:38+00:00" }, { - "name": "aws/aws-sdk-php", - "version": "3.182.0", + "name": "aws/aws-crt-php", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "998e5caf1b1bb52516a32fb8084eb7006ab5ae7d" + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "3942776a8c99209908ee0b287746263725685732" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/998e5caf1b1bb52516a32fb8084eb7006ab5ae7d", - "reference": "998e5caf1b1bb52516a32fb8084eb7006ab5ae7d", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/3942776a8c99209908ee0b287746263725685732", + "reference": "3942776a8c99209908ee0b287746263725685732", "shasum": "" }, "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.2" + }, + "time": "2021-09-03T22:57:30+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.196.1", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2845899d05c66a00d88eabbf7cf5d3dbae2da58a", + "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.0.2", "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", @@ -251,22 +302,22 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.182.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.196.1" }, - "time": "2021-05-17T18:14:44+00:00" + "time": "2021-10-01T18:23:06+00:00" }, { "name": "babenkoivan/elastic-adapter", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/babenkoivan/elastic-adapter.git", - "reference": "d3b5daa27386956f341c1cf6e1c1d4e872e96496" + "reference": "6e6461c6988cf1bc655fcec2c2aa2beeb3163f55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-adapter/zipball/d3b5daa27386956f341c1cf6e1c1d4e872e96496", - "reference": "d3b5daa27386956f341c1cf6e1c1d4e872e96496", + "url": "https://api.github.com/repos/babenkoivan/elastic-adapter/zipball/6e6461c6988cf1bc655fcec2c2aa2beeb3163f55", + "reference": "6e6461c6988cf1bc655fcec2c2aa2beeb3163f55", "shasum": "" }, "require": { @@ -304,7 +355,7 @@ ], "support": { "issues": "https://github.com/babenkoivan/elastic-adapter/issues", - "source": "https://github.com/babenkoivan/elastic-adapter/tree/v1.16.0" + "source": "https://github.com/babenkoivan/elastic-adapter/tree/v1.17.0" }, "funding": [ { @@ -316,7 +367,7 @@ "type": "paypal" } ], - "time": "2021-05-17T20:37:51+00:00" + "time": "2021-07-19T17:33:35+00:00" }, { "name": "babenkoivan/elastic-client", @@ -391,16 +442,16 @@ }, { "name": "babenkoivan/elastic-scout-driver", - "version": "v1.3.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/babenkoivan/elastic-scout-driver.git", - "reference": "3bc0105de26664731a9d5e8a145b010eea8fad4a" + "reference": "2f7751085f385c17154a29f3553071d3be1ca205" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-scout-driver/zipball/3bc0105de26664731a9d5e8a145b010eea8fad4a", - "reference": "3bc0105de26664731a9d5e8a145b010eea8fad4a", + "url": "https://api.github.com/repos/babenkoivan/elastic-scout-driver/zipball/2f7751085f385c17154a29f3553071d3be1ca205", + "reference": "2f7751085f385c17154a29f3553071d3be1ca205", "shasum": "" }, "require": { @@ -410,9 +461,9 @@ }, "require-dev": { "babenkoivan/elastic-migrations": "^1.4", - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^3.0", "laravel/legacy-factories": "^1.1", - "laravel/scout": "^8.0", + "laravel/scout": "^9.0", "orchestra/testbench": "^6.12", "phpstan/phpstan": "^0.12.32", "phpunit/phpunit": "^9.5" @@ -451,7 +502,7 @@ ], "support": { "issues": "https://github.com/babenkoivan/elastic-scout-driver/issues", - "source": "https://github.com/babenkoivan/elastic-scout-driver/tree/v1.3.0" + "source": "https://github.com/babenkoivan/elastic-scout-driver/tree/v1.6.0" }, "funding": [ { @@ -463,7 +514,7 @@ "type": "paypal" } ], - "time": "2021-02-25T12:18:25+00:00" + "time": "2021-08-09T21:09:19+00:00" }, { "name": "bagistobrasil/bagisto-product-social-share", @@ -511,16 +562,16 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v3.5.7", + "version": "v3.6.2", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "88fd9cfa144b06b2549e9d487fdaec68265e791e" + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/88fd9cfa144b06b2549e9d487fdaec68265e791e", - "reference": "88fd9cfa144b06b2549e9d487fdaec68265e791e", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", "shasum": "" }, "require": { @@ -580,15 +631,19 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.7" + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" }, "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, { "url": "https://github.com/barryvdh", "type": "github" } ], - "time": "2021-05-13T20:18:35+00:00" + "time": "2021-06-14T14:29:26+00:00" }, { "name": "barryvdh/laravel-dompdf", @@ -658,16 +713,16 @@ }, { "name": "brick/math", - "version": "0.9.2", + "version": "0.9.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", "shasum": "" }, "require": { @@ -677,7 +732,7 @@ "require-dev": { "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.3.2" + "vimeo/psalm": "4.9.2" }, "type": "library", "autoload": { @@ -702,36 +757,39 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.2" + "source": "https://github.com/brick/math/tree/0.9.3" }, "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/brick/math", "type": "tidelift" } ], - "time": "2021-01-20T22:51:39+00:00" + "time": "2021-08-15T20:50:18+00:00" }, { "name": "doctrine/cache", - "version": "1.11.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0" + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/a9c1b59eba5a08ca2770a76eddb88922f504e8e0", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0", + "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", "shasum": "" }, "require": { "php": "~7.1 || ^8.0" }, "conflict": { - "doctrine/common": ">2.2,<2.4", - "psr/cache": ">=3" + "doctrine/common": ">2.2,<2.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", @@ -740,8 +798,9 @@ "mongodb/mongodb": "^1.1", "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "predis/predis": "~1.0", - "psr/cache": "^1.0 || ^2.0", - "symfony/cache": "^4.4 || ^5.2" + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -793,7 +852,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.11.0" + "source": "https://github.com/doctrine/cache/tree/2.1.1" }, "funding": [ { @@ -809,37 +868,39 @@ "type": "tidelift" } ], - "time": "2021-04-13T14:46:17+00:00" + "time": "2021-07-17T14:49:29+00:00" }, { "name": "doctrine/dbal", - "version": "2.13.1", + "version": "2.13.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c800380457948e65bbd30ba92cc17cda108bf8c9" + "reference": "2411a55a2a628e6d8dd598388ab13474802c7b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c800380457948e65bbd30ba92cc17cda108bf8c9", - "reference": "c800380457948e65bbd30ba92cc17cda108bf8c9", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/2411a55a2a628e6d8dd598388ab13474802c7b6e", + "reference": "2411a55a2a628e6d8dd598388ab13474802c7b6e", "shasum": "" }, "require": { - "doctrine/cache": "^1.0", + "doctrine/cache": "^1.0|^2.0", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", "ext-pdo": "*", "php": "^7.1 || ^8" }, "require-dev": { - "doctrine/coding-standard": "8.2.0", - "jetbrains/phpstorm-stubs": "2020.2", - "phpstan/phpstan": "0.12.81", - "phpunit/phpunit": "^7.5.20|^8.5|9.5.0", + "doctrine/coding-standard": "9.0.0", + "jetbrains/phpstorm-stubs": "2021.1", + "phpstan/phpstan": "0.12.99", + "phpunit/phpunit": "^7.5.20|^8.5|9.5.10", + "psalm/plugin-phpunit": "0.16.1", "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "4.6.4" + "vimeo/psalm": "4.10.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -900,7 +961,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/2.13.1" + "source": "https://github.com/doctrine/dbal/tree/2.13.4" }, "funding": [ { @@ -916,7 +977,7 @@ "type": "tidelift" } ], - "time": "2021-04-17T17:30:19+00:00" + "time": "2021-10-02T15:59:26+00:00" }, { "name": "doctrine/deprecations", @@ -1433,35 +1494,32 @@ }, { "name": "elasticsearch/elasticsearch", - "version": "v7.12.0", + "version": "v7.15.0", "source": { "type": "git", "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "25522ef4f16adcf49d7a1db149f2fcf010655b7f" + "reference": "77a4ade87aef8e8e6b84bafb6704cd35ac15742a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/25522ef4f16adcf49d7a1db149f2fcf010655b7f", - "reference": "25522ef4f16adcf49d7a1db149f2fcf010655b7f", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/77a4ade87aef8e8e6b84bafb6704cd35ac15742a", + "reference": "77a4ade87aef8e8e6b84bafb6704cd35ac15742a", "shasum": "" }, "require": { "ext-json": ">=1.3.7", "ezimuel/ringphp": "^1.1.2", "php": "^7.3 || ^8.0", - "psr/log": "~1.0" + "psr/log": "^1|^2" }, "require-dev": { - "doctrine/inflector": "^1.3", "ext-yaml": "*", "ext-zip": "*", "mockery/mockery": "^1.2", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "phpunit/phpunit": "^9.3", "squizlabs/php_codesniffer": "^3.4", - "symfony/finder": "~4.0", - "symfony/yaml": "~4.0", - "symplify/git-wrapper": "~9.0" + "symfony/finder": "~4.0" }, "suggest": { "ext-curl": "*", @@ -1496,31 +1554,32 @@ ], "support": { "issues": "https://github.com/elastic/elasticsearch-php/issues", - "source": "https://github.com/elastic/elasticsearch-php/tree/v7.12.0" + "source": "https://github.com/elastic/elasticsearch-php/tree/v7.15.0" }, - "time": "2021-03-23T18:08:45+00:00" + "time": "2021-09-23T07:05:35+00:00" }, { "name": "enshrined/svg-sanitize", - "version": "0.14.0", + "version": "0.14.1", "source": { "type": "git", "url": "https://github.com/darylldoyle/svg-sanitizer.git", - "reference": "beff89576a72540ee99476aeb9cfe98222e76fb8" + "reference": "307b42066fb0b76b5119f5e1f0826e18fefabe95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/beff89576a72540ee99476aeb9cfe98222e76fb8", - "reference": "beff89576a72540ee99476aeb9cfe98222e76fb8", + "url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/307b42066fb0b76b5119f5e1f0826e18fefabe95", + "reference": "307b42066fb0b76b5119f5e1f0826e18fefabe95", "shasum": "" }, "require": { "ext-dom": "*", - "ext-libxml": "*" + "ext-libxml": "*", + "php": "^7.0 || ^8.0" }, "require-dev": { "codeclimate/php-test-reporter": "^0.1.2", - "phpunit/phpunit": "^6" + "phpunit/phpunit": "^6.5 || ^8.5" }, "type": "library", "autoload": { @@ -1541,9 +1600,9 @@ "description": "An SVG sanitizer for PHP", "support": { "issues": "https://github.com/darylldoyle/svg-sanitizer/issues", - "source": "https://github.com/darylldoyle/svg-sanitizer/tree/0.14.0" + "source": "https://github.com/darylldoyle/svg-sanitizer/tree/0.14.1" }, - "time": "2021-01-21T10:13:20+00:00" + "time": "2021-08-09T23:46:54+00:00" }, { "name": "ezimuel/guzzlestreams", @@ -1708,16 +1767,16 @@ }, { "name": "facade/flare-client-php", - "version": "1.8.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "69742118c037f34ee1ef86dc605be4a105d9e984" + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/69742118c037f34ee1ef86dc605be4a105d9e984", - "reference": "69742118c037f34ee1ef86dc605be4a105d9e984", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", "shasum": "" }, "require": { @@ -1761,7 +1820,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.8.0" + "source": "https://github.com/facade/flare-client-php/tree/1.9.1" }, "funding": [ { @@ -1769,28 +1828,27 @@ "type": "github" } ], - "time": "2021-04-30T11:11:50+00:00" + "time": "2021-09-13T12:16:46+00:00" }, { "name": "facade/ignition", - "version": "2.9.0", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "e7db3b601ce742568b92648818ef903904d20164" + "reference": "c6126e291bd44ad3fe482537a145fc70e3320598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/e7db3b601ce742568b92648818ef903904d20164", - "reference": "e7db3b601ce742568b92648818ef903904d20164", + "url": "https://api.github.com/repos/facade/ignition/zipball/c6126e291bd44ad3fe482537a145fc70e3320598", + "reference": "c6126e291bd44ad3fe482537a145fc70e3320598", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "facade/flare-client-php": "^1.6", + "facade/flare-client-php": "^1.9.1", "facade/ignition-contracts": "^1.0.2", - "filp/whoops": "^2.4", "illuminate/support": "^7.0|^8.0", "monolog/monolog": "^2.0", "php": "^7.2.5|^8.0", @@ -1846,7 +1904,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-05-05T06:45:12+00:00" + "time": "2021-10-01T12:58:45+00:00" }, { "name": "facade/ignition-contracts", @@ -1903,21 +1961,21 @@ }, { "name": "fakerphp/faker", - "version": "v1.14.1", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1" + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "psr/container": "^1.0", + "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2" }, "conflict": { @@ -1937,7 +1995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.15-dev" + "dev-main": "v1.16-dev" } }, "autoload": { @@ -1962,9 +2020,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" }, - "time": "2021-03-30T06:27:33+00:00" + "time": "2021-09-06T14:53:37+00:00" }, { "name": "fideloper/proxy", @@ -2024,77 +2082,6 @@ }, "time": "2020-10-22T13:48:01+00:00" }, - { - "name": "filp/whoops", - "version": "2.12.1", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.12.1" - }, - "funding": [ - { - "url": "https://github.com/denis-sokolov", - "type": "github" - } - ], - "time": "2021-04-25T12:00:00+00:00" - }, { "name": "flynsarmy/db-blade-compiler", "version": "5.5.0", @@ -2159,31 +2146,26 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" + "reference": "84afea85c6841deeea872f36249a206e878a5de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", + "reference": "84afea85c6841deeea872f36249a206e878a5de0", "shasum": "" }, "require": { - "php": "^7.0|^8.0", - "phpoption/phpoption": "^1.7.3" + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "GrahamCampbell\\ResultType\\": "src/" @@ -2196,7 +2178,7 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk" } ], "description": "An Implementation Of The Result Type", @@ -2209,7 +2191,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.2" }, "funding": [ { @@ -2221,7 +2203,7 @@ "type": "tidelift" } ], - "time": "2020-04-13T13:17:36+00:00" + "time": "2021-08-28T21:34:50+00:00" }, { "name": "guzzlehttp/guzzle", @@ -2458,26 +2440,26 @@ }, { "name": "intervention/image", - "version": "2.5.1", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e" + "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", + "url": "https://api.github.com/repos/Intervention/image/zipball/0925f10b259679b5d8ca58f3a2add9255ffcda45", + "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45", "shasum": "" }, "require": { "ext-fileinfo": "*", - "guzzlehttp/psr7": "~1.1", + "guzzlehttp/psr7": "~1.1 || ^2.0", "php": ">=5.4.0" }, "require-dev": { "mockery/mockery": "~0.9.2", - "phpunit/phpunit": "^4.8 || ^5.7" + "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15" }, "suggest": { "ext-gd": "to use GD library based image processing.", @@ -2526,9 +2508,19 @@ ], "support": { "issues": "https://github.com/Intervention/image/issues", - "source": "https://github.com/Intervention/image/tree/master" + "source": "https://github.com/Intervention/image/tree/2.6.1" }, - "time": "2019-11-02T09:15:47+00:00" + "funding": [ + { + "url": "https://www.paypal.me/interventionphp", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2021-07-22T14:31:53+00:00" }, { "name": "intervention/imagecache", @@ -2599,22 +2591,22 @@ }, { "name": "kalnoy/nestedset", - "version": "v5.0.3", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/lazychaser/laravel-nestedset.git", - "reference": "789a70bce94a7c3bd206fb05fa4b747cf27acbe2" + "reference": "abf4c8602977874368a79eb6648d5d0014b613bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lazychaser/laravel-nestedset/zipball/789a70bce94a7c3bd206fb05fa4b747cf27acbe2", - "reference": "789a70bce94a7c3bd206fb05fa4b747cf27acbe2", + "url": "https://api.github.com/repos/lazychaser/laravel-nestedset/zipball/abf4c8602977874368a79eb6648d5d0014b613bb", + "reference": "abf4c8602977874368a79eb6648d5d0014b613bb", "shasum": "" }, "require": { - "illuminate/database": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0", - "illuminate/events": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0", + "illuminate/database": "~5.7.0|~5.8.0|^6.0|^7.0|>=8.0 <8.43.0", + "illuminate/events": "~5.7.0|~5.8.0|^6.0|^7.0|>=8.0 <8.43.0", + "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0|>=8.0 <8.43.0", "php": ">=7.1.3" }, "require-dev": { @@ -2656,22 +2648,22 @@ ], "support": { "issues": "https://github.com/lazychaser/laravel-nestedset/issues", - "source": "https://github.com/lazychaser/laravel-nestedset/tree/v5.0.3" + "source": "https://github.com/lazychaser/laravel-nestedset/tree/v5.0.5" }, - "time": "2020-12-07T05:59:45+00:00" + "time": "2021-05-28T07:23:48+00:00" }, { "name": "khaled.alshamaa/ar-php", - "version": "v6.1.0", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/khaled-alshamaa/ar-php.git", - "reference": "026b139e724851e4a3396aa23c84735984f6fc65" + "reference": "a3eb0dfe14ea9ba0fa291673c52ae7a75749e35a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/khaled-alshamaa/ar-php/zipball/026b139e724851e4a3396aa23c84735984f6fc65", - "reference": "026b139e724851e4a3396aa23c84735984f6fc65", + "url": "https://api.github.com/repos/khaled-alshamaa/ar-php/zipball/a3eb0dfe14ea9ba0fa291673c52ae7a75749e35a", + "reference": "a3eb0dfe14ea9ba0fa291673c52ae7a75749e35a", "shasum": "" }, "require": { @@ -2711,9 +2703,9 @@ ], "support": { "issues": "https://github.com/khaled-alshamaa/ar-php/issues", - "source": "https://github.com/khaled-alshamaa/ar-php/tree/v6.1.0" + "source": "https://github.com/khaled-alshamaa/ar-php/tree/v6.2.0" }, - "time": "2021-04-30T22:04:14+00:00" + "time": "2021-06-20T18:15:36+00:00" }, { "name": "konekt/concord", @@ -2779,16 +2771,16 @@ }, { "name": "konekt/enum", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/artkonekt/enum.git", - "reference": "da96fadf4eda4bd97cc46937e936a6fa6a1e5c94" + "reference": "e1beb8cbeeef9986b9a576bd996c91528ee9e0bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/artkonekt/enum/zipball/da96fadf4eda4bd97cc46937e936a6fa6a1e5c94", - "reference": "da96fadf4eda4bd97cc46937e936a6fa6a1e5c94", + "url": "https://api.github.com/repos/artkonekt/enum/zipball/e1beb8cbeeef9986b9a576bd996c91528ee9e0bd", + "reference": "e1beb8cbeeef9986b9a576bd996c91528ee9e0bd", "shasum": "" }, "require": { @@ -2823,7 +2815,7 @@ "issues": "https://github.com/artkonekt/enum/issues", "source": "https://github.com/artkonekt/enum" }, - "time": "2020-11-28T21:37:27+00:00" + "time": "2021-09-30T17:56:50+00:00" }, { "name": "konekt/enum-eloquent", @@ -2895,16 +2887,16 @@ }, { "name": "laravel/framework", - "version": "v8.41.0", + "version": "v8.42.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "05417155d886df8710e55c84e12622b52d83c47c" + "reference": "41ec4897a70eb8729cf0ff34a8354413c54e42a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/05417155d886df8710e55c84e12622b52d83c47c", - "reference": "05417155d886df8710e55c84e12622b52d83c47c", + "url": "https://api.github.com/repos/laravel/framework/zipball/41ec4897a70eb8729cf0ff34a8354413c54e42a6", + "reference": "41ec4897a70eb8729cf0ff34a8354413c54e42a6", "shasum": "" }, "require": { @@ -3059,7 +3051,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-05-11T14:00:02+00:00" + "time": "2021-05-19T13:03:18+00:00" }, { "name": "laravel/scout", @@ -3132,16 +3124,16 @@ }, { "name": "laravel/socialite", - "version": "v5.2.3", + "version": "v5.2.5", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "1960802068f81e44b2ae9793932181cf1cb91b5c" + "reference": "fd0f6a3dd963ca480b598649b54f92d81a43617f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/1960802068f81e44b2ae9793932181cf1cb91b5c", - "reference": "1960802068f81e44b2ae9793932181cf1cb91b5c", + "url": "https://api.github.com/repos/laravel/socialite/zipball/fd0f6a3dd963ca480b598649b54f92d81a43617f", + "reference": "fd0f6a3dd963ca480b598649b54f92d81a43617f", "shasum": "" }, "require": { @@ -3197,20 +3189,20 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2021-04-06T14:38:16+00:00" + "time": "2021-08-31T15:16:26+00:00" }, { "name": "laravel/tinker", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "04ad32c1a3328081097a181875733fa51f402083" + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/04ad32c1a3328081097a181875733fa51f402083", - "reference": "04ad32c1a3328081097a181875733fa51f402083", + "url": "https://api.github.com/repos/laravel/tinker/zipball/c808a7227f97ecfd9219fbf913bad842ea854ddc", + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc", "shasum": "" }, "require": { @@ -3263,28 +3255,29 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.6.1" + "source": "https://github.com/laravel/tinker/tree/v2.6.2" }, - "time": "2021-03-02T16:53:12+00:00" + "time": "2021-09-28T15:47:34+00:00" }, { "name": "laravel/ui", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0" + "reference": "07d725813350c695c779382cbd6dac0ab8665537" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/e2478cd0342a92ec1c8c77422553bda8ee004fd0", - "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0", + "url": "https://api.github.com/repos/laravel/ui/zipball/07d725813350c695c779382cbd6dac0ab8665537", + "reference": "07d725813350c695c779382cbd6dac0ab8665537", "shasum": "" }, "require": { - "illuminate/console": "^8.0", - "illuminate/filesystem": "^8.0", - "illuminate/support": "^8.0", + "illuminate/console": "^8.42", + "illuminate/filesystem": "^8.42", + "illuminate/support": "^8.42", + "illuminate/validation": "^8.42", "php": "^7.3|^8.0" }, "type": "library", @@ -3320,9 +3313,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v3.2.1" + "source": "https://github.com/laravel/ui/tree/v3.3.0" }, - "time": "2021-04-27T18:17:41+00:00" + "time": "2021-05-25T16:45:33+00:00" }, { "name": "lcobucci/jwt", @@ -3388,16 +3381,16 @@ }, { "name": "league/commonmark", - "version": "1.6.2", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb" + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/7d70d2f19c84bcc16275ea47edabee24747352eb", - "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c4228d11e30d7493c6836d20872f9582d8ba6dcf", + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf", "shasum": "" }, "require": { @@ -3415,7 +3408,7 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.90", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -3485,20 +3478,20 @@ "type": "tidelift" } ], - "time": "2021-05-12T11:39:41+00:00" + "time": "2021-07-17T17:13:23+00:00" }, { "name": "league/flysystem", - "version": "1.1.4", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32" + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32", - "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea", + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea", "shasum": "" }, "require": { @@ -3571,7 +3564,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.4" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.5" }, "funding": [ { @@ -3579,20 +3572,20 @@ "type": "other" } ], - "time": "2021-06-23T21:56:05+00:00" + "time": "2021-08-17T13:49:42+00:00" }, { "name": "league/mime-type-detection", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e", + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e", "shasum": "" }, "require": { @@ -3623,7 +3616,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0" }, "funding": [ { @@ -3635,26 +3628,27 @@ "type": "tidelift" } ], - "time": "2021-01-18T20:58:21+00:00" + "time": "2021-09-25T08:23:19+00:00" }, { "name": "league/oauth1-client", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth1-client.git", - "reference": "1e7e6be2dc543bf466236fb171e5b20e1b06aee6" + "reference": "88dd16b0cff68eb9167bfc849707d2c40ad91ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/1e7e6be2dc543bf466236fb171e5b20e1b06aee6", - "reference": "1e7e6be2dc543bf466236fb171e5b20e1b06aee6", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/88dd16b0cff68eb9167bfc849707d2c40ad91ddc", + "reference": "88dd16b0cff68eb9167bfc849707d2c40ad91ddc", "shasum": "" }, "require": { "ext-json": "*", "ext-openssl": "*", "guzzlehttp/guzzle": "^6.0|^7.0", + "guzzlehttp/psr7": "^1.7|^2.0", "php": ">=7.1||>=8.0" }, "require-dev": { @@ -3708,29 +3702,29 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth1-client/issues", - "source": "https://github.com/thephpleague/oauth1-client/tree/v1.9.0" + "source": "https://github.com/thephpleague/oauth1-client/tree/v1.10.0" }, - "time": "2021-01-20T01:40:53+00:00" + "time": "2021-08-15T23:05:49+00:00" }, { "name": "maatwebsite/excel", - "version": "3.1.30", + "version": "3.1.33", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "aa5d2e4d25c5c8218ea0a15103da95f5f8728953" + "reference": "b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/aa5d2e4d25c5c8218ea0a15103da95f5f8728953", - "reference": "aa5d2e4d25c5c8218ea0a15103da95f5f8728953", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8", + "reference": "b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8", "shasum": "" }, "require": { "ext-json": "*", "illuminate/support": "5.8.*|^6.0|^7.0|^8.0", "php": "^7.0|^8.0", - "phpoffice/phpspreadsheet": "1.16.*" + "phpoffice/phpspreadsheet": "^1.18" }, "require-dev": { "orchestra/testbench": "^6.0", @@ -3776,7 +3770,7 @@ ], "support": { "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", - "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.30" + "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.33" }, "funding": [ { @@ -3788,7 +3782,7 @@ "type": "github" } ], - "time": "2021-04-06T17:17:02+00:00" + "time": "2021-08-12T15:52:25+00:00" }, { "name": "maennchen/zipstream-php", @@ -3863,16 +3857,16 @@ }, { "name": "markbaker/complex", - "version": "2.0.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" + "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/6f724d7e04606fd8adaa4e3bb381c3e9db09c946", + "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946", "shasum": "" }, "require": { @@ -3881,11 +3875,7 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "2.*", "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", - "sebastian/phpcpd": "^4.0", "squizlabs/php_codesniffer": "^3.4" }, "type": "library", @@ -3956,22 +3946,22 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPComplex/issues", - "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8" + "source": "https://github.com/MarkBaker/PHPComplex/tree/2.0.3" }, - "time": "2020-08-26T10:42:07+00:00" + "time": "2021-06-02T09:44:11+00:00" }, { "name": "markbaker/matrix", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a" + "reference": "174395a901b5ba0925f1d790fa91bab531074b61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/174395a901b5ba0925f1d790fa91bab531074b61", + "reference": "174395a901b5ba0925f1d790fa91bab531074b61", "shasum": "" }, "require": { @@ -4030,22 +4020,22 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2" + "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.3" }, - "time": "2021-01-23T16:37:31+00:00" + "time": "2021-05-25T15:42:17+00:00" }, { "name": "maximebf/debugbar", - "version": "v1.16.5", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62" + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6d51ee9e94cff14412783785e79a4e7ef97b9d62", - "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", "shasum": "" }, "require": { @@ -4064,7 +4054,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4095,30 +4085,30 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.16.5" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" }, - "time": "2020-12-07T11:07:24+00:00" + "time": "2021-08-01T09:19:02+00:00" }, { "name": "monolog/monolog", - "version": "2.2.0", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", "shasum": "" }, "require": { "php": ">=7.2", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0" + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" }, "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", @@ -4126,14 +4116,14 @@ "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4", + "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.59", + "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <7.0.1", + "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -4141,8 +4131,11 @@ "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", @@ -4181,7 +4174,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + "source": "https://github.com/Seldaek/monolog/tree/2.3.5" }, "funding": [ { @@ -4193,20 +4186,20 @@ "type": "tidelift" } ], - "time": "2020-12-14T13:15:25+00:00" + "time": "2021-10-01T21:08:31+00:00" }, { "name": "mtdowling/jmespath.php", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb" + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/42dae2cbd13154083ca6d70099692fef8ca84bfb", - "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", "shasum": "" }, "require": { @@ -4214,7 +4207,7 @@ "symfony/polyfill-mbstring": "^1.17" }, "require-dev": { - "composer/xdebug-handler": "^1.4", + "composer/xdebug-handler": "^1.4 || ^2.0", "phpunit/phpunit": "^4.8.36 || ^7.5.15" }, "bin": [ @@ -4252,22 +4245,22 @@ ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.6.0" + "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" }, - "time": "2020-07-31T21:01:56+00:00" + "time": "2021-06-14T00:11:39+00:00" }, { "name": "myclabs/php-enum", - "version": "1.8.0", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421" + "reference": "b942d263c641ddb5190929ff840c68f78713e937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937", + "reference": "b942d263c641ddb5190929ff840c68f78713e937", "shasum": "" }, "require": { @@ -4277,7 +4270,7 @@ "require-dev": { "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.5.1" + "vimeo/psalm": "^4.6.2" }, "type": "library", "autoload": { @@ -4302,7 +4295,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.0" + "source": "https://github.com/myclabs/php-enum/tree/1.8.3" }, "funding": [ { @@ -4314,7 +4307,7 @@ "type": "tidelift" } ], - "time": "2021-02-15T16:11:48+00:00" + "time": "2021-07-05T08:18:36+00:00" }, { "name": "namshi/jose", @@ -4385,27 +4378,28 @@ }, { "name": "nesbot/carbon", - "version": "2.48.0", + "version": "2.53.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d3c447f21072766cddec3522f9468a5849a76147" + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3c447f21072766cddec3522f9468a5849a76147", - "reference": "d3c447f21072766cddec3522f9468a5849a76147", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045", + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", @@ -4419,8 +4413,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -4446,15 +4440,15 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", @@ -4474,20 +4468,20 @@ "type": "tidelift" } ], - "time": "2021-05-07T10:08:30+00:00" + "time": "2021-09-06T09:29:23+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.5", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -4528,9 +4522,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "opis/closure", @@ -4780,16 +4774,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.16.0", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "76d4323b85129d0c368149c831a07a3e258b2b50" + "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/76d4323b85129d0c368149c831a07a3e258b2b50", - "reference": "76d4323b85129d0c368149c831a07a3e258b2b50", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/418cd304e8e6b417ea79c3b29126a25dc4b1170c", + "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c", "shasum": "" }, "require": { @@ -4808,20 +4802,23 @@ "ext-zlib": "*", "ezyang/htmlpurifier": "^4.13", "maennchen/zipstream-php": "^2.1", - "markbaker/complex": "^1.5||^2.0", - "markbaker/matrix": "^1.2||^2.0", - "php": "^7.2||^8.0", + "markbaker/complex": "^2.0", + "markbaker/matrix": "^2.0", + "php": "^7.2 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0" }, "require-dev": { - "dompdf/dompdf": "^0.8.5", - "friendsofphp/php-cs-fixer": "^2.16", + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dompdf/dompdf": "^1.0", + "friendsofphp/php-cs-fixer": "^2.18", "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^8.0", "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.5||^9.3", + "phpstan/phpstan": "^0.12.82", + "phpstan/phpstan-phpunit": "^0.12.18", + "phpunit/phpunit": "^8.5", "squizlabs/php_codesniffer": "^3.5", "tecnickcom/tcpdf": "^6.3" }, @@ -4875,35 +4872,35 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.16.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.18.0" }, - "time": "2020-12-31T18:03:49+00:00" + "time": "2021-05-31T18:21:15+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.0 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -4922,7 +4919,7 @@ }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk" } ], "description": "Option Type for PHP", @@ -4934,7 +4931,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.8.0" }, "funding": [ { @@ -4946,20 +4943,20 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2021-08-28T21:27:29+00:00" }, { "name": "prettus/l5-repository", - "version": "2.7.6", + "version": "2.7.8", "source": { "type": "git", "url": "https://github.com/andersao/l5-repository.git", - "reference": "2bd56801c78becf6a26b0d795312d879e55730cd" + "reference": "2425139f178681553cd77460f75af045a818ecad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/andersao/l5-repository/zipball/2bd56801c78becf6a26b0d795312d879e55730cd", - "reference": "2bd56801c78becf6a26b0d795312d879e55730cd", + "url": "https://api.github.com/repos/andersao/l5-repository/zipball/2425139f178681553cd77460f75af045a818ecad", + "reference": "2425139f178681553cd77460f75af045a818ecad", "shasum": "" }, "require": { @@ -5019,7 +5016,7 @@ "source": "https://github.com/andersao/l5-repository", "wiki": "https://github.com/andersao/l5-repository" }, - "time": "2021-04-22T21:15:10+00:00" + "time": "2021-09-03T21:05:45+00:00" }, { "name": "prettus/laravel-validation", @@ -5551,20 +5548,21 @@ }, { "name": "ramsey/collection", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" + "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", - "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "url": "https://api.github.com/repos/ramsey/collection/zipball/eaca1dc1054ddd10cbd83c1461907bee6fb528fa", + "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa", "shasum": "" }, "require": { - "php": "^7.2 || ^8" + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { "captainhook/captainhook": "^5.3", @@ -5574,6 +5572,7 @@ "hamcrest/hamcrest-php": "^2", "jangregor/phpstan-prophecy": "^0.8", "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^0.12.32", "phpstan/phpstan-mockery": "^0.12.5", @@ -5601,7 +5600,7 @@ "homepage": "https://benramsey.com" } ], - "description": "A PHP 7.2+ library for representing and manipulating collections.", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ "array", "collection", @@ -5612,7 +5611,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.1.3" + "source": "https://github.com/ramsey/collection/tree/1.2.1" }, "funding": [ { @@ -5624,53 +5623,54 @@ "type": "tidelift" } ], - "time": "2021-01-21T17:40:04+00:00" + "time": "2021-08-06T03:41:06+00:00" }, { "name": "ramsey/uuid", - "version": "4.1.1", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "cd4032040a750077205918c86049aa0f43d22947" + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", - "reference": "cd4032040a750077205918c86049aa0f43d22947", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "php": "^7.2 || ^8", + "php": "^7.2 || ^8.0", "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8" + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.8", - "goaop/framework": "^2", + "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", - "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^0.17.1", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-mockery": "^0.12", "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^8.5", - "psy/psysh": "^0.10.0", - "slevomat/coding-standard": "^6.0", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "3.9.4" + "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", @@ -5683,7 +5683,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-main": "4.x-dev" + }, + "captainhook": { + "force-install": true } }, "autoload": { @@ -5699,7 +5702,6 @@ "MIT" ], "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", @@ -5707,16 +5709,19 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid" + "source": "https://github.com/ramsey/uuid/tree/4.2.3" }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" } ], - "time": "2020-08-18T17:17:46+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "react/promise", @@ -5894,27 +5899,29 @@ }, { "name": "symfony/console", - "version": "v5.2.8", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "864568fdc0208b3eba3638b6000b69d2386e6768" + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/864568fdc0208b3eba3638b6000b69d2386e6768", - "reference": "864568fdc0208b3eba3638b6000b69d2386e6768", + "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", + "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2", "symfony/string": "^5.1" }, "conflict": { + "psr/log": ">=3", "symfony/dependency-injection": "<4.4", "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", @@ -5922,10 +5929,10 @@ "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/event-dispatcher": "^4.4|^5.0", @@ -5971,7 +5978,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.8" + "source": "https://github.com/symfony/console/tree/v5.3.7" }, "funding": [ { @@ -5987,24 +5994,25 @@ "type": "tidelift" } ], - "time": "2021-05-11T15:45:21+00:00" + "time": "2021-08-25T20:02:16+00:00" }, { "name": "symfony/css-selector", - "version": "v5.2.7", + "version": "v5.3.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "59a684f5ac454f066ecbe6daecce6719aed283fb" + "reference": "7fb120adc7f600a59027775b224c13a33530dd90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/59a684f5ac454f066ecbe6daecce6719aed283fb", - "reference": "59a684f5ac454f066ecbe6daecce6719aed283fb", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90", + "reference": "7fb120adc7f600a59027775b224c13a33530dd90", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -6036,7 +6044,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/css-selector/tree/v5.3.4" }, "funding": [ { @@ -6052,26 +6060,25 @@ "type": "tidelift" } ], - "time": "2021-04-07T16:07:52+00:00" + "time": "2021-07-21T12:38:00+00:00" }, { "name": "symfony/debug", - "version": "v4.4.22", + "version": "v4.4.31", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "45b2136377cca5f10af858968d6079a482bca473" + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/45b2136377cca5f10af858968d6079a482bca473", - "reference": "45b2136377cca5f10af858968d6079a482bca473", + "url": "https://api.github.com/repos/symfony/debug/zipball/43ede438d4cb52cd589ae5dc070e9323866ba8e0", + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0", "shasum": "" }, "require": { "php": ">=7.1.3", - "psr/log": "~1.0", - "symfony/polyfill-php80": "^1.15" + "psr/log": "^1|^2|^3" }, "conflict": { "symfony/http-kernel": "<3.4" @@ -6105,7 +6112,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.22" + "source": "https://github.com/symfony/debug/tree/v4.4.31" }, "funding": [ { @@ -6121,7 +6128,7 @@ "type": "tidelift" } ], - "time": "2021-04-02T07:50:12+00:00" + "time": "2021-09-24T13:30:14+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6192,22 +6199,21 @@ }, { "name": "symfony/error-handler", - "version": "v5.2.8", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "1416bc16317a8188aabde251afef7618bf4687ac" + "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/1416bc16317a8188aabde251afef7618bf4687ac", - "reference": "1416bc16317a8188aabde251afef7618bf4687ac", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", + "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "^1.0", - "symfony/polyfill-php80": "^1.15", + "psr/log": "^1|^2|^3", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { @@ -6241,7 +6247,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.8" + "source": "https://github.com/symfony/error-handler/tree/v5.3.7" }, "funding": [ { @@ -6257,27 +6263,27 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:42:21+00:00" + "time": "2021-08-28T15:07:08+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.4", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d08d6ec121a425897951900ab692b612a61d6240" + "reference": "ce7b20d69c66a20939d8952b617506a44d102130" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", - "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ce7b20d69c66a20939d8952b617506a44d102130", + "reference": "ce7b20d69c66a20939d8952b617506a44d102130", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "symfony/dependency-injection": "<4.4" @@ -6287,7 +6293,7 @@ "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/error-handler": "^4.4|^5.0", @@ -6326,7 +6332,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.7" }, "funding": [ { @@ -6342,7 +6348,7 @@ "type": "tidelift" } ], - "time": "2021-02-18T17:12:37+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6425,20 +6431,21 @@ }, { "name": "symfony/finder", - "version": "v5.2.8", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "eccb8be70d7a6a2230d05f6ecede40f3fdd9e252" + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/eccb8be70d7a6a2230d05f6ecede40f3fdd9e252", - "reference": "eccb8be70d7a6a2230d05f6ecede40f3fdd9e252", + "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -6466,7 +6473,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.8" + "source": "https://github.com/symfony/finder/tree/v5.3.7" }, "funding": [ { @@ -6482,7 +6489,7 @@ "type": "tidelift" } ], - "time": "2021-05-10T14:39:23+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/http-client-contracts", @@ -6564,23 +6571,23 @@ }, { "name": "symfony/http-foundation", - "version": "v5.2.8", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e8fbbab7c4a71592985019477532629cb2e142dc" + "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8fbbab7c4a71592985019477532629cb2e142dc", - "reference": "e8fbbab7c4a71592985019477532629cb2e142dc", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", + "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "predis/predis": "~1.0", @@ -6617,7 +6624,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.8" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.7" }, "funding": [ { @@ -6633,40 +6640,40 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:41:16+00:00" + "time": "2021-08-27T11:20:35+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.8", + "version": "v5.3.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "c3cb71ee7e2d3eae5fe1001f81780d6a49b37937" + "reference": "ceaf46a992f60e90645e7279825a830f733a17c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c3cb71ee7e2d3eae5fe1001f81780d6a49b37937", - "reference": "c3cb71ee7e2d3eae5fe1001f81780d6a49b37937", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ceaf46a992f60e90645e7279825a830f733a17c5", + "reference": "ceaf46a992f60e90645e7279825a830f733a17c5", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "~1.0", + "psr/log": "^1|^2", "symfony/deprecation-contracts": "^2.1", "symfony/error-handler": "^4.4|^5.0", "symfony/event-dispatcher": "^5.0", "symfony/http-client-contracts": "^1.1|^2", - "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-foundation": "^5.3.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "symfony/browser-kit": "<4.4", "symfony/cache": "<5.0", "symfony/config": "<5.0", "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.1.8", + "symfony/dependency-injection": "<5.3", "symfony/doctrine-bridge": "<5.0", "symfony/form": "<5.0", "symfony/http-client": "<5.0", @@ -6678,7 +6685,7 @@ "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", @@ -6686,7 +6693,7 @@ "symfony/config": "^5.0", "symfony/console": "^4.4|^5.0", "symfony/css-selector": "^4.4|^5.0", - "symfony/dependency-injection": "^5.1.8", + "symfony/dependency-injection": "^5.3", "symfony/dom-crawler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/finder": "^4.4|^5.0", @@ -6729,7 +6736,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.8" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.9" }, "funding": [ { @@ -6745,20 +6752,20 @@ "type": "tidelift" } ], - "time": "2021-05-12T13:27:53+00:00" + "time": "2021-09-28T10:25:11+00:00" }, { "name": "symfony/mime", - "version": "v5.2.7", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "7af452bf51c46f18da00feb32e1ad36db9426515" + "reference": "a756033d0a7e53db389618653ae991eba5a19a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/7af452bf51c46f18da00feb32e1ad36db9426515", - "reference": "7af452bf51c46f18da00feb32e1ad36db9426515", + "url": "https://api.github.com/repos/symfony/mime/zipball/a756033d0a7e53db389618653ae991eba5a19a11", + "reference": "a756033d0a7e53db389618653ae991eba5a19a11", "shasum": "" }, "require": { @@ -6766,7 +6773,7 @@ "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "egulias/email-validator": "~3.0.0", @@ -6812,7 +6819,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.7" + "source": "https://github.com/symfony/mime/tree/v5.3.8" }, "funding": [ { @@ -6828,20 +6835,20 @@ "type": "tidelift" } ], - "time": "2021-04-29T20:47:09+00:00" + "time": "2021-09-10T12:30:38+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -6853,7 +6860,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6891,7 +6898,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -6907,20 +6914,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", "shasum": "" }, "require": { @@ -6932,7 +6939,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6971,7 +6978,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" }, "funding": [ { @@ -6987,20 +6994,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "shasum": "" }, "require": { @@ -7012,7 +7019,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7052,7 +7059,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" }, "funding": [ { @@ -7068,20 +7075,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "shasum": "" }, "require": { @@ -7095,7 +7102,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7139,7 +7146,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" }, "funding": [ { @@ -7155,20 +7162,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -7180,7 +7187,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7223,7 +7230,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" }, "funding": [ { @@ -7239,20 +7246,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { @@ -7264,7 +7271,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7303,7 +7310,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" }, "funding": [ { @@ -7319,7 +7326,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-php56", @@ -7391,16 +7398,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { @@ -7409,7 +7416,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7447,7 +7454,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" }, "funding": [ { @@ -7463,20 +7470,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { @@ -7485,7 +7492,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7526,7 +7533,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" }, "funding": [ { @@ -7542,20 +7549,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { @@ -7564,7 +7571,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7609,7 +7616,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" }, "funding": [ { @@ -7625,25 +7632,104 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-07-28T13:41:28+00:00" }, { - "name": "symfony/process", - "version": "v5.2.7", + "name": "symfony/polyfill-php81", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-21T13:25:03+00:00" + }, + { + "name": "symfony/process", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -7671,7 +7757,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/process/tree/v5.3.7" }, "funding": [ { @@ -7687,36 +7773,37 @@ "type": "tidelift" } ], - "time": "2021-04-08T10:27:02+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/routing", - "version": "v5.2.7", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c" + "reference": "be865017746fe869007d94220ad3f5297951811b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c", - "reference": "3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c", + "url": "https://api.github.com/repos/symfony/routing/zipball/be865017746fe869007d94220ad3f5297951811b", + "reference": "be865017746fe869007d94220ad3f5297951811b", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/config": "<5.0", + "doctrine/annotations": "<1.12", + "symfony/config": "<5.3", "symfony/dependency-injection": "<4.4", "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4", - "psr/log": "~1.0", - "symfony/config": "^5.0", + "doctrine/annotations": "^1.12", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.3", "symfony/dependency-injection": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", @@ -7760,7 +7847,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.7" + "source": "https://github.com/symfony/routing/tree/v5.3.7" }, "funding": [ { @@ -7776,7 +7863,7 @@ "type": "tidelift" } ], - "time": "2021-04-11T22:55:21+00:00" + "time": "2021-08-04T21:42:42+00:00" }, { "name": "symfony/service-contracts", @@ -7859,16 +7946,16 @@ }, { "name": "symfony/string", - "version": "v5.2.8", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db" + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", - "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", + "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", "shasum": "" }, "require": { @@ -7922,7 +8009,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.8" + "source": "https://github.com/symfony/string/tree/v5.3.7" }, "funding": [ { @@ -7938,26 +8025,27 @@ "type": "tidelift" } ], - "time": "2021-05-10T14:56:10+00:00" + "time": "2021-08-26T08:00:08+00:00" }, { "name": "symfony/translation", - "version": "v5.2.8", + "version": "v5.3.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "445caa74a5986f1cc9dd91a2975ef68fa7cb2068" + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/445caa74a5986f1cc9dd91a2975ef68fa7cb2068", - "reference": "445caa74a5986f1cc9dd91a2975ef68fa7cb2068", + "url": "https://api.github.com/repos/symfony/translation/zipball/6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15", + "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^2.3" }, "conflict": { @@ -7971,13 +8059,14 @@ "symfony/translation-implementation": "2.3" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0", "symfony/console": "^4.4|^5.0", "symfony/dependency-injection": "^5.0", "symfony/finder": "^4.4|^5.0", "symfony/http-kernel": "^5.0", "symfony/intl": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2", "symfony/yaml": "^4.4|^5.0" }, @@ -8015,7 +8104,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.8" + "source": "https://github.com/symfony/translation/tree/v5.3.9" }, "funding": [ { @@ -8031,7 +8120,7 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:41:16+00:00" + "time": "2021-08-26T08:22:53+00:00" }, { "name": "symfony/translation-contracts", @@ -8113,22 +8202,22 @@ }, { "name": "symfony/var-dumper", - "version": "v5.2.8", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba" + "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba", - "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eaaea4098be1c90c8285543e1356a09c8aa5c8da", + "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "phpunit/phpunit": "<5.4.3", @@ -8181,7 +8270,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.8" }, "funding": [ { @@ -8197,7 +8286,7 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:42:21+00:00" + "time": "2021-09-24T15:59:58+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -8340,31 +8429,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.3.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + "reference": "accaddf133651d4b5cf81a119f25296736ffc850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", + "reference": "accaddf133651d4b5cf81a119f25296736ffc850", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.1", + "graham-campbell/result-type": "^1.0.2", "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.7.4", - "symfony/polyfill-ctype": "^1.17", - "symfony/polyfill-mbstring": "^1.17", - "symfony/polyfill-php80": "^1.17" + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -8387,13 +8476,11 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "email": "vance@vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -8404,7 +8491,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" }, "funding": [ { @@ -8416,7 +8503,7 @@ "type": "tidelift" } ], - "time": "2021-01-20T15:23:13+00:00" + "time": "2021-10-02T19:24:42+00:00" }, { "name": "voku/portable-ascii", @@ -8767,20 +8854,20 @@ }, { "name": "codeception/lib-innerbrowser", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/Codeception/lib-innerbrowser.git", - "reference": "4b0d89b37fe454e060a610a85280a87ab4f534f1" + "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/4b0d89b37fe454e060a610a85280a87ab4f534f1", - "reference": "4b0d89b37fe454e060a610a85280a87ab4f534f1", + "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", + "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", + "codeception/codeception": "4.*@dev", "ext-dom": "*", "ext-json": "*", "ext-mbstring": "*", @@ -8821,9 +8908,9 @@ ], "support": { "issues": "https://github.com/Codeception/lib-innerbrowser/issues", - "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.5.0" + "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.5.1" }, - "time": "2021-04-23T06:18:29+00:00" + "time": "2021-08-30T15:21:42+00:00" }, { "name": "codeception/module-asserts", @@ -8934,6 +9021,65 @@ }, "time": "2020-10-24T14:46:40+00:00" }, + { + "name": "codeception/module-laravel", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/Codeception/module-laravel.git", + "reference": "91e812bfa0219276b04d327dab6eafa64d5e802c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/module-laravel/zipball/91e812bfa0219276b04d327dab6eafa64d5e802c", + "reference": "91e812bfa0219276b04d327dab6eafa64d5e802c", + "shasum": "" + }, + "require": { + "codeception/codeception": "^4.0", + "codeception/lib-innerbrowser": "^1.3", + "ext-json": "*", + "php": "^7.3 | ^8.0" + }, + "require-dev": { + "codeception/module-asserts": "^1.3", + "codeception/module-rest": "^1.2", + "vlucas/phpdotenv": "^3.6 | ^4.1 | ^5.2" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan-Henk Gerritsen" + }, + { + "name": "Michael Bodnarchuk" + }, + { + "name": "Gustavo Nieves", + "homepage": "https://medium.com/@ganieves" + } + ], + "description": "Codeception module for Laravel framework", + "homepage": "https://codeception.com/", + "keywords": [ + "codeception", + "laravel" + ], + "support": { + "issues": "https://github.com/Codeception/module-laravel/issues", + "source": "https://github.com/Codeception/module-laravel/tree/2.1.0" + }, + "time": "2021-09-10T04:19:09+00:00" + }, { "name": "codeception/module-laravel5", "version": "1.1.1", @@ -8989,16 +9135,16 @@ }, { "name": "codeception/module-webdriver", - "version": "1.2.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "ebbe729c630415e8caf6b0087e457906f0c6c0c6" + "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/ebbe729c630415e8caf6b0087e457906f0c6c0c6", - "reference": "ebbe729c630415e8caf6b0087e457906f0c6c0c6", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/baa18b7bf70aa024012f967b5ce5021e1faa9151", + "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151", "shasum": "" }, "require": { @@ -9039,9 +9185,9 @@ ], "support": { "issues": "https://github.com/Codeception/module-webdriver/issues", - "source": "https://github.com/Codeception/module-webdriver/tree/1.2.1" + "source": "https://github.com/Codeception/module-webdriver/tree/1.4.0" }, - "time": "2021-04-23T17:30:57+00:00" + "time": "2021-09-02T12:01:02+00:00" }, { "name": "codeception/phpunit-wrapper", @@ -9195,6 +9341,77 @@ ], "time": "2020-11-10T18:47:58+00:00" }, + { + "name": "filp/whoops", + "version": "2.14.4", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "f056f1fe935d9ed86e698905a957334029899895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895", + "reference": "f056f1fe935d9ed86e698905a957334029899895", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.4" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2021-10-03T12:00:00+00:00" + }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.1", @@ -9248,16 +9465,16 @@ }, { "name": "mockery/mockery", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", "shasum": "" }, "require": { @@ -9314,9 +9531,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.3" + "source": "https://github.com/mockery/mockery/tree/1.4.4" }, - "time": "2021-02-24T09:51:49+00:00" + "time": "2021-09-13T15:28:59+00:00" }, { "name": "myclabs/deep-copy", @@ -9378,33 +9595,32 @@ }, { "name": "nunomaduro/collision", - "version": "v5.4.0", + "version": "v5.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "41b7e9999133d5082700d31a1d0977161df8322a" + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/41b7e9999133d5082700d31a1d0977161df8322a", - "reference": "41b7e9999133d5082700d31a1d0977161df8322a", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00", + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.7.2", + "filp/whoops": "^2.14.3", "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { "brianium/paratest": "^6.1", "fideloper/proxy": "^4.4.1", - "friendsofphp/php-cs-fixer": "^2.17.3", "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "^9.0", + "laravel/framework": "8.x-dev", "nunomaduro/larastan": "^0.6.2", "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^7.0", + "orchestra/testbench": "^6.0", "phpstan/phpstan": "^0.12.64", "phpunit/phpunit": "^9.5.0" }, @@ -9462,20 +9678,20 @@ "type": "patreon" } ], - "time": "2021-04-09T13:38:32+00:00" + "time": "2021-09-20T15:06:32+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -9520,9 +9736,9 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2020-06-27T14:33:11+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", @@ -9577,16 +9793,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "66adc952127dd1314af94ce28f8fc332d38f229b" + "reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/66adc952127dd1314af94ce28f8fc332d38f229b", - "reference": "66adc952127dd1314af94ce28f8fc332d38f229b", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/da16e39968f8dd5cfb7d07eef91dc2b731c69880", + "reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880", "shasum": "" }, "require": { @@ -9614,11 +9830,6 @@ "ext-SimpleXML": "For Firefox profile creation" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.8.x-dev" - } - }, "autoload": { "psr-4": { "Facebook\\WebDriver\\": "lib/" @@ -9642,9 +9853,9 @@ ], "support": { "issues": "https://github.com/php-webdriver/php-webdriver/issues", - "source": "https://github.com/php-webdriver/php-webdriver/tree/1.11.0" + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.11.1" }, - "time": "2021-05-03T10:19:43+00:00" + "time": "2021-05-21T15:12:49+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -9757,16 +9968,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -9774,7 +9985,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -9800,39 +10012,39 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -9867,29 +10079,29 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.12.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -9938,7 +10150,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" }, "funding": [ { @@ -9946,7 +10158,7 @@ "type": "github" } ], - "time": "2021-03-28T07:26:59+00:00" + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -10191,16 +10403,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.4", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -10212,11 +10424,11 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -10230,7 +10442,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -10278,7 +10490,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -10290,7 +10502,7 @@ "type": "github" } ], - "time": "2021-03-23T07:16:29+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "sebastian/cli-parser", @@ -10798,16 +11010,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { @@ -10850,7 +11062,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" }, "funding": [ { @@ -10858,7 +11070,7 @@ "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -11149,16 +11361,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -11193,7 +11405,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -11201,7 +11413,7 @@ "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", @@ -11258,21 +11470,22 @@ }, { "name": "symfony/browser-kit", - "version": "v5.2.7", + "version": "v5.3.4", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "b1c9d5701273a255da3a580f85066b83bd94e97d" + "reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b1c9d5701273a255da3a580f85066b83bd94e97d", - "reference": "b1c9d5701273a255da3a580f85066b83bd94e97d", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c1e3f64fcc631c96e2c5843b666db66679ced11c", + "reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/dom-crawler": "^4.4|^5.0" + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "symfony/css-selector": "^4.4|^5.0", @@ -11309,7 +11522,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v5.2.7" + "source": "https://github.com/symfony/browser-kit/tree/v5.3.4" }, "funding": [ { @@ -11325,27 +11538,28 @@ "type": "tidelift" } ], - "time": "2021-04-08T10:27:02+00:00" + "time": "2021-07-21T12:40:44+00:00" }, { "name": "symfony/dom-crawler", - "version": "v5.2.4", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "400e265163f65aceee7e904ef532e15228de674b" + "reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/400e265163f65aceee7e904ef532e15228de674b", - "reference": "400e265163f65aceee7e904ef532e15228de674b", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c7eef3a60ccfdd8eafe07f81652e769ac9c7146c", + "reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "masterminds/html5": "<2.6" @@ -11383,7 +11597,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.2.4" + "source": "https://github.com/symfony/dom-crawler/tree/v5.3.7" }, "funding": [ { @@ -11399,20 +11613,20 @@ "type": "tidelift" } ], - "time": "2021-02-15T18:55:04+00:00" + "time": "2021-08-29T19:32:13+00:00" }, { "name": "symfony/yaml", - "version": "v5.2.7", + "version": "v5.3.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "76546cbeddd0a9540b4e4e57eddeec3e9bb444a5" + "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/76546cbeddd0a9540b4e4e57eddeec3e9bb444a5", - "reference": "76546cbeddd0a9540b4e4e57eddeec3e9bb444a5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", + "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", "shasum": "" }, "require": { @@ -11458,7 +11672,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.2.7" + "source": "https://github.com/symfony/yaml/tree/v5.3.6" }, "funding": [ { @@ -11474,20 +11688,20 @@ "type": "tidelift" } ], - "time": "2021-04-29T20:47:09+00:00" + "time": "2021-07-29T06:20:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -11516,7 +11730,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -11524,7 +11738,7 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php index 94b848922..37801f24f 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php @@ -25,7 +25,7 @@ class AttributeOptionFactory extends Factory { return [ 'admin_name' => $this->faker->word, - 'sort_order' => $this->faker->randomDigit, + 'sort_order' => $this->faker->randomDigit(), 'attribute_id' => Attribute::factory(['swatch_type' => 'text']), 'swatch_value' => null, ]; diff --git a/packages/Webkul/Attribute/src/Models/AttributeFamily.php b/packages/Webkul/Attribute/src/Models/AttributeFamily.php index c651610e1..9729312a3 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeFamily.php +++ b/packages/Webkul/Attribute/src/Models/AttributeFamily.php @@ -4,65 +4,88 @@ namespace Webkul\Attribute\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Product\Models\ProductProxy; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Attribute\Database\Factories\AttributeFamilyFactory; use Webkul\Attribute\Contracts\AttributeFamily as AttributeFamilyContract; class AttributeFamily extends Model implements AttributeFamilyContract { + + use HasFactory; + public $timestamps = false; - protected $fillable = ['code', 'name']; + protected $fillable = [ + 'code', + 'name', + ]; /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function custom_attributes() { return (AttributeProxy::modelClass())::join('attribute_group_mappings', 'attributes.id', '=', 'attribute_group_mappings.attribute_id') - ->join('attribute_groups', 'attribute_group_mappings.attribute_group_id', '=', 'attribute_groups.id') - ->join('attribute_families', 'attribute_groups.attribute_family_id', '=', 'attribute_families.id') - ->where('attribute_families.id', $this->id) - ->select('attributes.*'); + ->join('attribute_groups', 'attribute_group_mappings.attribute_group_id', '=', 'attribute_groups.id') + ->join('attribute_families', 'attribute_groups.attribute_family_id', '=', 'attribute_families.id') + ->where('attribute_families.id', $this->id) + ->select('attributes.*'); } /** - * Get all of the comparable attributes which belongs to attribute family. + * Get all the comparable attributes which belongs to attribute family. */ public function getComparableAttributesBelongsToFamily() { return (AttributeProxy::modelClass())::join('attribute_group_mappings', 'attribute_group_mappings.attribute_id', '=', 'attributes.id') - ->select('attributes.*')->where('attributes.is_comparable', 1)->distinct()->get(); + ->select('attributes.*') + ->where('attributes.is_comparable', 1) + ->distinct() + ->get(); } /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function getCustomAttributesAttribute() { - return $this->custom_attributes()->get(); + return $this->custom_attributes() + ->get(); } /** - * Get all of the attribute groups. + * Get all the attribute groups. */ - public function attribute_groups() + public function attribute_groups(): HasMany { - return $this->hasMany(AttributeGroupProxy::modelClass())->orderBy('position'); + return $this->hasMany(AttributeGroupProxy::modelClass()) + ->orderBy('position'); } /** - * Get all of the attributes for the attribute groups. + * Get all the attributes for the attribute groups. */ public function getConfigurableAttributesAttribute() { - return $this->custom_attributes()->where('attributes.is_configurable', 1)->where('attributes.type', 'select')->get(); + return $this->custom_attributes() + ->where('attributes.is_configurable', 1) + ->where('attributes.type', 'select') + ->get(); } /** - * Get all of the products. + * Get all the products. */ - public function products() + public function products(): HasMany { return $this->hasMany(ProductProxy::modelClass()); } + + protected static function newFactory(): AttributeFamilyFactory + { + return AttributeFamilyFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/AttributeOption.php b/packages/Webkul/Attribute/src/Models/AttributeOption.php index 7ff766c8f..d1342069a 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeOption.php +++ b/packages/Webkul/Attribute/src/Models/AttributeOption.php @@ -4,10 +4,17 @@ namespace Webkul\Attribute\Models; use Illuminate\Support\Facades\Storage; use Webkul\Core\Eloquent\TranslatableModel; +use Illuminate\Testing\Fluent\Concerns\Has; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Webkul\Attribute\Database\Factories\AttributeOptionFactory; use Webkul\Attribute\Contracts\AttributeOption as AttributeOptionContract; class AttributeOption extends TranslatableModel implements AttributeOptionContract { + + use HasFactory; + public $timestamps = false; public $translatedAttributes = ['label']; @@ -22,7 +29,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra /** * Get the attribute that owns the attribute option. */ - public function attribute() + public function attribute(): BelongsTo { return $this->belongsTo(AttributeProxy::modelClass()); } @@ -35,7 +42,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra if ($this->swatch_value && $this->attribute->swatch_type == 'image') { return url('cache/small/'.$this->swatch_value); } - + return; } @@ -46,4 +53,10 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra { return $this->swatch_value_url(); } + + protected static function newFactory(): AttributeOptionFactory + { + return AttributeOptionFactory::new(); + } + } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRule.php b/packages/Webkul/CartRule/src/Models/CartRule.php index ac2c9f9ba..9100fc57e 100644 --- a/packages/Webkul/CartRule/src/Models/CartRule.php +++ b/packages/Webkul/CartRule/src/Models/CartRule.php @@ -3,8 +3,8 @@ namespace Webkul\CartRule\Models; use Illuminate\Database\Eloquent\Model; +use Webkul\Core\Database\Factories\CartRuleFactory; use Illuminate\Database\Eloquent\Factories\HasFactory; -use Webkul\CartRule\Database\Factories\CartRuleFactory; use Webkul\CartRule\Contracts\CartRule as CartRuleContract; use Webkul\Core\Models\ChannelProxy; use Webkul\Customer\Models\CustomerGroupProxy; diff --git a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php index 79ecddbb9..414e8004a 100644 --- a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php +++ b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php @@ -32,7 +32,7 @@ class CategoryFactory extends Factory { return [ 'status' => 1, - 'position' => $this->faker->randomDigit, + 'position' => $this->faker->randomDigit(), 'parent_id' => 1, ]; } diff --git a/packages/Webkul/Category/src/Models/Category.php b/packages/Webkul/Category/src/Models/Category.php index 107aa473c..0a8905463 100755 --- a/packages/Webkul/Category/src/Models/Category.php +++ b/packages/Webkul/Category/src/Models/Category.php @@ -7,6 +7,7 @@ use Kalnoy\Nestedset\NodeTrait; use Illuminate\Support\Facades\Storage; use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Category\Database\Factories\CategoryFactory; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Webkul\Category\Contracts\Category as CategoryContract; use Webkul\Attribute\Models\AttributeProxy; @@ -69,7 +70,7 @@ class Category extends TranslatableModel implements CategoryContract /** * The filterable attributes that belong to the category. */ - public function filterableAttributes() + public function filterableAttributes(): BelongsToMany { return $this->belongsToMany(AttributeProxy::modelClass(), 'category_filterable_attributes') ->with([ @@ -82,28 +83,29 @@ class Category extends TranslatableModel implements CategoryContract /** * Getting the root category of a category * - * @return Category + * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object */ - public function getRootCategory(): Category + public function getRootCategory() { - return Category::where([ - [ - 'parent_id', - '=', - null, - ], - [ - '_lft', - '<=', - $this->_lft, - ], - [ - '_rgt', - '>=', - $this->_rgt, - ], - ]) - ->first(); + return self::query() + ->where([ + [ + 'parent_id', + '=', + null, + ], + [ + '_lft', + '<=', + $this->_lft, + ], + [ + '_rgt', + '>=', + $this->_rgt, + ], + ]) + ->first(); } /** @@ -156,7 +158,7 @@ class Category extends TranslatableModel implements CategoryContract /** * The products that belong to the category. */ - public function products() + public function products(): BelongsToMany { return $this->belongsToMany(ProductProxy::modelClass(), 'product_categories'); } diff --git a/packages/Webkul/Category/src/Models/CategoryTranslation.php b/packages/Webkul/Category/src/Models/CategoryTranslation.php index 71ccee2fa..621cb3fcb 100755 --- a/packages/Webkul/Category/src/Models/CategoryTranslation.php +++ b/packages/Webkul/Category/src/Models/CategoryTranslation.php @@ -14,6 +14,7 @@ use Webkul\Category\Contracts\CategoryTranslation as CategoryTranslationContract */ class CategoryTranslation extends Model implements CategoryTranslationContract { + public $timestamps = false; protected $fillable = [ @@ -25,4 +26,5 @@ class CategoryTranslation extends Model implements CategoryTranslationContract 'meta_keywords', 'locale_id', ]; + } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php index ee99e724f..7cc5c75a5 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php @@ -32,10 +32,8 @@ class CartFactory extends Factory ->select('id') ->first(); - $customer = Customer::factory() - ->create(); - $cartAddress = CartAddress::factory() - ->create(); + $customer = Customer::factory() + ->create(); return [ 'is_guest' => 0, diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php index 60e53339b..da292f841 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php @@ -1,6 +1,6 @@ numberBetween(1, 666); + $grand_total = (string) $faker->numberBetween(1, 666); $base_grand_total = $grand_total; } @@ -129,7 +133,7 @@ class Laravel5Helper extends Laravel5 // actually set the cart to the user's session // when in an functional test: - $stub = new StdClass(); + $stub = new StdClass(); $stub->id = $cart->id; $I->setSession(['cart' => $stub]); @@ -146,7 +150,7 @@ class Laravel5Helper extends Laravel5 /** * Set all session with the given key and value in the array. * - * @param array $keyValue + * @param array $keyValue */ public function setSession(array $keyValue): void { @@ -169,9 +173,9 @@ class Laravel5Helper extends Laravel5 * 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 + * @param int $productType see constants in this class for usage + * @param array $configs + * @param array $productStates * * @return \Webkul\Product\Models\Product * @part ORM @@ -208,7 +212,7 @@ class Laravel5Helper extends Laravel5 private function haveSimpleProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('simple', $productStates)) { + if (!in_array('simple', $productStates)) { $productStates = array_merge($productStates, ['simple']); } @@ -224,7 +228,7 @@ class Laravel5Helper extends Laravel5 private function haveVirtualProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('virtual', $productStates)) { + if (!in_array('virtual', $productStates)) { $productStates = array_merge($productStates, ['virtual']); } @@ -240,7 +244,7 @@ class Laravel5Helper extends Laravel5 private function haveDownloadableProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('downloadable', $productStates)) { + if (!in_array('downloadable', $productStates)) { $productStates = array_merge($productStates, ['downloadable']); } @@ -256,7 +260,7 @@ class Laravel5Helper extends Laravel5 private function haveBookingEventProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (! in_array('booking', $productStates)) { + if (!in_array('booking', $productStates)) { $productStates = array_merge($productStates, ['booking']); } @@ -271,7 +275,13 @@ class Laravel5Helper extends Laravel5 private function createProduct(array $attributes = [], array $states = []): Product { - return factory(Product::class)->states($states)->create($attributes); + return Product::factory() + ->state(function () use ($states) { + return [ + 'type' => $states[0], + ]; + }) + ->create($attributes); } private function createInventory(int $productId, array $inventoryConfig = []): void @@ -285,7 +295,7 @@ class Laravel5Helper extends Laravel5 private function createDownloadableLink(int $productId): void { - $I = $this; + $I = $this; $link = $I->have(ProductDownloadableLink::class, [ 'product_id' => $productId, ]); @@ -297,7 +307,7 @@ class Laravel5Helper extends Laravel5 private function createBookingEventProduct(int $productId): void { - $I = $this; + $I = $this; $bookingProduct = $I->have(BookingProduct::class, [ 'product_id' => $productId, ]); @@ -314,17 +324,16 @@ class Laravel5Helper extends Laravel5 $faker = Factory::create(); $brand = Attribute::query() - ->where(['code' => 'brand']) - ->firstOrFail(); // usually 25 + ->where(['code' => 'brand']) + ->firstOrFail(); // usually 25 - if (! AttributeOption::query() - ->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, ]); - } /** @@ -345,17 +354,19 @@ class Laravel5Helper extends Laravel5 'special_price_to' => null, 'special_price' => null, 'price' => $faker->randomFloat(2, 1, 1000), - 'weight' => '1.00', // necessary for shipping - 'brand' => AttributeOption::query()->firstWhere('attribute_id', $brand->id)->id, + 'weight' => '1.00', + // necessary for shipping + 'brand' => AttributeOption::query() + ->firstWhere('attribute_id', $brand->id)->id, ]; $attributeValues = array_merge($defaultAttributeValues, $attributeValues); /** @var array $possibleAttributeValues list of the possible attributes a product can have */ $possibleAttributeValues = DB::table('attributes') - ->select('id', 'code', 'type') - ->get() - ->toArray(); + ->select('id', 'code', 'type') + ->get() + ->toArray(); foreach ($possibleAttributeValues as $attributeSet) { $data = [ @@ -374,14 +385,14 @@ class Laravel5Helper extends Laravel5 } /** - * @param string $attributeCode - * @param array $data + * @param string $attributeCode + * @param array $data * * @return array */ private function appendAttributeDependencies(string $attributeCode, array $data): array { - $locale = core()->getCurrentLocale()->code; + $locale = core()->getCurrentLocale()->code; $channel = core()->getCurrentChannelCode(); $attributeSetDependencies = [ @@ -389,7 +400,7 @@ class Laravel5Helper extends Laravel5 'locale', 'channel', ], - 'tax_category_id' => [ + 'tax_category_id' => [ 'channel', ], 'short_description' => [ diff --git a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php index 90f8d5060..8e494d75f 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php @@ -24,7 +24,7 @@ class ProductAttributeValueFactory extends Factory public function definition(): array { return [ - 'product_id' => Product::factory(), + //'product_id' => Product::factory(), 'locale' => 'en', 'channel' => 'default', ]; diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php index e58c0fb0d..4520630c3 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php @@ -32,6 +32,7 @@ class OrderItemFactory extends Factory ->first(); } else { $product = Product::factory() + ->simple() ->create(); } From 7a94b5233e205b056254ec3685b4de04e987253d Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Tue, 5 Oct 2021 11:39:30 +0300 Subject: [PATCH 03/18] - Fix test cases. - Code reformat. --- .../CartRule/src/Models/CartRuleCoupon.php | 3 +- .../Webkul/Category/src/Models/Category.php | 3 +- .../Factories/CartRuleCouponFactory.php | 2 +- .../Webkul/Customer/src/Models/Customer.php | 3 +- packages/Webkul/Sales/src/Models/Invoice.php | 3 +- tests/unit/CartRule/CartRuleCest.php | 512 ++++++++++-------- 6 files changed, 304 insertions(+), 222 deletions(-) diff --git a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php index 01a5f02f7..602424b46 100644 --- a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php +++ b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php @@ -5,11 +5,12 @@ namespace Webkul\CartRule\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; -use Webkul\CartRule\Database\Factories\CartRuleCouponFactory; +use Webkul\Core\Database\Factories\CartRuleCouponFactory; use Webkul\CartRule\Contracts\CartRuleCoupon as CartRuleCouponContract; class CartRuleCoupon extends Model implements CartRuleCouponContract { + use HasFactory; protected $fillable = [ diff --git a/packages/Webkul/Category/src/Models/Category.php b/packages/Webkul/Category/src/Models/Category.php index 0a8905463..6bce836ea 100755 --- a/packages/Webkul/Category/src/Models/Category.php +++ b/packages/Webkul/Category/src/Models/Category.php @@ -24,8 +24,7 @@ use Webkul\Product\Models\ProductProxy; class Category extends TranslatableModel implements CategoryContract { - use NodeTrait; - use HasFactory; + use NodeTrait, HasFactory; public $translatedAttributes = [ 'name', diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php index 8d0fdbfe1..f4c71eff9 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php @@ -1,6 +1,6 @@ cartRule = $cartRule; - $this->coupon = $coupon; + $this->coupon = $coupon; } + } -class expectedCartItem +class expectedCartItem implements Arrayable { + public const ITEM_DISCOUNT_AMOUNT_PRECISION = 4; + public const ITEM_TAX_AMOUNT_PRECISION = 4; public $cart_id; + public $product_id; + public $quantity = 1; + public $price = 0.0; + public $base_price = 0.0; + public $total = 0.0; + public $base_total = 0.0; + public $tax_percent = 0.0; + public $tax_amount = 0.0; + public $base_tax_amount = 0.0; + public $coupon_code = null; + public $discount_percent = 0.0; + public $discount_amount = 0.0; + public $base_discount_amount = 0.0; + public $applied_cart_rule_ids = ''; public function __construct(int $cartId, int $productId) { - $this->cart_id = $cartId; + $this->cart_id = $cartId; $this->product_id = $productId; } public function calcTotals(): void { - $this->total = $this->quantity * $this->price; + $this->total = $this->quantity * $this->price; $this->base_total = $this->quantity * $this->price; } public function calcTaxAmounts(): void { - $this->tax_amount = round( - $this->quantity * $this->price * $this->tax_percent / 100, - self::ITEM_TAX_AMOUNT_PRECISION - ); - $this->base_tax_amount = round( - $this->quantity * $this->price * $this->tax_percent / 100, - self::ITEM_TAX_AMOUNT_PRECISION - ); + $this->tax_amount = round($this->quantity * $this->price * $this->tax_percent / 100, self::ITEM_TAX_AMOUNT_PRECISION); + $this->base_tax_amount = round($this->quantity * $this->price * $this->tax_percent / 100, self::ITEM_TAX_AMOUNT_PRECISION); } public function calcFixedDiscountAmounts(float $discount, float $baseDiscount, string $code, int $cartRuleId): void { - $this->discount_amount = $this->quantity * $discount; - $this->base_discount_amount = $this->quantity * $baseDiscount; - $this->coupon_code = $code; - $this->applied_cart_rule_ids = (string)$cartRuleId; + $this->discount_amount = $this->quantity * $discount; + $this->base_discount_amount = $this->quantity * $baseDiscount; + $this->coupon_code = $code; + $this->applied_cart_rule_ids = (string) $cartRuleId; } public function calcPercentageDiscountAmounts(float $discount, string $code, int $cartRuleId): void { - $this->discount_percent = $discount; - $this->discount_amount = round( - ($this->total + $this->tax_amount) * $this->discount_percent / 100, - self::ITEM_DISCOUNT_AMOUNT_PRECISION - ); - $this->base_discount_amount = round( - ($this->base_total + $this->base_tax_amount) * $this->discount_percent / 100, - self::ITEM_DISCOUNT_AMOUNT_PRECISION - ); - $this->coupon_code = $code; - $this->applied_cart_rule_ids = (string)$cartRuleId; + $this->discount_percent = $discount; + $this->discount_amount = round(($this->total + $this->tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); + $this->base_discount_amount = round(($this->base_total + $this->base_tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); + $this->coupon_code = $code; + $this->applied_cart_rule_ids = (string) $cartRuleId; } + + public function toArray(): array + { + return [ + 'cart_id' => $this->cart_id, + 'product_id' => $this->product_id, + 'quantity' => $this->quantity, + 'price' => $this->price, + 'base_price' => $this->base_price, + 'total' => $this->total, + 'base_total' => $this->base_total, + 'tax_percent' => $this->tax_percent, + 'tax_amount' => $this->tax_amount, + 'base_tax_amount' => $this->base_tax_amount, + 'coupon_code' => $this->coupon_code, + 'discount_percent' => $this->discount_percent, + 'discount_amount' => $this->discount_amount, + 'base_discount_amount' => $this->base_discount_amount, + 'applied_cart_rule_ids' => $this->applied_cart_rule_ids, + ]; + } + } class expectedCart { + public const CART_TOTAL_PRECISION = 2; public $customer_id; + public $id; + public $items_count = 0; + public $items_qty = 0.0; + public $sub_total = 0.0; + public $tax_total = 0.0; + public $discount_amount = 0.0; + public $grand_total = 0.0; + public $base_sub_total = 0.0; + public $base_tax_total = 0.0; + public $base_discount_amount = 0.0; + public $base_grand_total = 0.0; + public $coupon_code = null; + public $applied_cart_rule_ids = ''; public function __construct(int $cartId, int $customerId) { - $this->id = $cartId; + $this->id = $cartId; $this->customer_id = $customerId; } public function applyCoupon(int $cartRuleId, string $couponCode): void { - $this->coupon_code = $couponCode; - $this->applied_cart_rule_ids = (string)$cartRuleId; + $this->coupon_code = $couponCode; + $this->applied_cart_rule_ids = (string) $cartRuleId; } public function finalizeTotals(): void { - $this->sub_total = round($this->sub_total, self::CART_TOTAL_PRECISION); - $this->tax_total = round($this->tax_total, self::CART_TOTAL_PRECISION); + $this->sub_total = round($this->sub_total, self::CART_TOTAL_PRECISION); + $this->tax_total = round($this->tax_total, self::CART_TOTAL_PRECISION); $this->discount_amount = round($this->discount_amount, self::CART_TOTAL_PRECISION); - $this->grand_total = round($this->sub_total + $this->tax_total - $this->discount_amount, - self::CART_TOTAL_PRECISION); + $this->grand_total = round($this->sub_total + $this->tax_total - $this->discount_amount, self::CART_TOTAL_PRECISION); - $this->base_sub_total = round($this->base_sub_total, self::CART_TOTAL_PRECISION); - $this->base_tax_total = round($this->base_tax_total, self::CART_TOTAL_PRECISION); + $this->base_sub_total = round($this->base_sub_total, self::CART_TOTAL_PRECISION); + $this->base_tax_total = round($this->base_tax_total, self::CART_TOTAL_PRECISION); $this->base_discount_amount = round($this->base_discount_amount, self::CART_TOTAL_PRECISION); - $this->base_grand_total = round($this->base_sub_total + $this->base_tax_total - $this->base_discount_amount, - self::CART_TOTAL_PRECISION); + $this->base_grand_total = round($this->base_sub_total + $this->base_tax_total - $this->base_discount_amount, self::CART_TOTAL_PRECISION); } public function toArray(): array { - return (array)$this; + return (array) $this; } + } -class expectedOrder +class expectedOrder implements Arrayable { + public $status; + public $customer_email; + public $customer_first_name; + public $customer_vat_id; + public $coupon_code; + public $total_item_count; + public $total_qty_ordered; + public $grand_total; + public $base_grand_total; + public $sub_total; + public $base_sub_total; + public $discount_amount; + public $base_discount_amount; + public $tax_amount; + public $base_tax_amount; + public $customer_id; + public $cart_id; + public $applied_cart_rule_ids; + public $shipping_method; + public $shipping_amount; + public $base_shipping_amount; + public $shipping_discount_amount; public function __construct(expectedCart $expectedCart, Customer $customer, int $cartId) { - $this->status = 'pending'; - $this->customer_email = $customer->email; - $this->customer_first_name = $customer->first_name; - $this->customer_vat_id = $customer->vat_id; - $this->coupon_code = $expectedCart->coupon_code; - $this->total_item_count = $expectedCart->items_count; - $this->total_qty_ordered = $expectedCart->items_qty; - $this->grand_total = $expectedCart->grand_total; - $this->base_grand_total = $expectedCart->base_grand_total; - $this->sub_total = $expectedCart->sub_total; - $this->base_sub_total = $expectedCart->base_sub_total; - $this->discount_amount = $expectedCart->discount_amount; - $this->base_discount_amount = $expectedCart->base_discount_amount; - $this->tax_amount = $expectedCart->tax_total; - $this->base_tax_amount = $expectedCart->base_tax_total; - $this->customer_id = $customer->id; - $this->cart_id = $cartId; - $this->applied_cart_rule_ids = $expectedCart->applied_cart_rule_ids; - $this->shipping_method = null; - $this->shipping_amount = null; - $this->base_shipping_amount = null; + $this->status = 'pending'; + $this->customer_email = $customer->email; + $this->customer_first_name = $customer->first_name; + $this->customer_vat_id = $customer->vat_id; + $this->coupon_code = $expectedCart->coupon_code; + $this->total_item_count = $expectedCart->items_count; + $this->total_qty_ordered = $expectedCart->items_qty; + $this->grand_total = $expectedCart->grand_total; + $this->base_grand_total = $expectedCart->base_grand_total; + $this->sub_total = $expectedCart->sub_total; + $this->base_sub_total = $expectedCart->base_sub_total; + $this->discount_amount = $expectedCart->discount_amount; + $this->base_discount_amount = $expectedCart->base_discount_amount; + $this->tax_amount = $expectedCart->tax_total; + $this->base_tax_amount = $expectedCart->base_tax_total; + $this->customer_id = $customer->id; + $this->cart_id = $cartId; + $this->applied_cart_rule_ids = $expectedCart->applied_cart_rule_ids; + $this->shipping_method = null; + $this->shipping_amount = null; + $this->base_shipping_amount = null; $this->shipping_discount_amount = null; } + + public function toArray(): array + { + return [ + 'status' => $this->status, + 'customer_email' => $this->customer_email, + 'customer_first_name' => $this->customer_first_name, + 'customer_vat_id' => $this->customer_vat_id, + 'coupon_code' => $this->coupon_code, + 'total_item_count' => $this->total_item_count, + 'total_qty_ordered' => $this->total_qty_ordered, + 'grand_total' => $this->grand_total, + 'base_grand_total' => $this->base_grand_total, + 'sub_total' => $this->sub_total, + 'base_sub_total' => $this->base_sub_total, + 'discount_amount' => $this->discount_amount, + 'base_discount_amount' => $this->base_discount_amount, + 'tax_amount' => $this->tax_amount, + 'base_tax_amount' => $this->base_tax_amount, + 'customer_id' => $this->customer_id, + 'cart_id' => $this->cart_id, + 'applied_cart_rule_ids' => $this->applied_cart_rule_ids, + 'shipping_method' => $this->shipping_method, + 'shipping_amount' => $this->shipping_amount, + 'base_shipping_amount' => $this->base_shipping_amount, + 'shipping_discount_amount' => $this->shipping_discount_amount, + ]; + } + } class CartRuleCest { + private $products; + private $sessionToken; public const PRODUCT_PRICE = 13.57; + public const REDUCED_PRODUCT_PRICE = 7.21; + public const TAX_RATE = 18.5; + public const REDUCED_TAX_RATE = 5.5; public const DISCOUNT_AMOUNT_FIX = 3.37; + public const DISCOUNT_AMOUNT_PERCENT = 7.5; + public const DISCOUNT_AMOUNT_FIX_FULL = 999999.99; + public const DISCOUNT_AMOUNT_CART = 8.33; public const ACTION_TYPE_FIXED = "by_fixed"; + public const ACTION_TYPE_PERCENTAGE = "by_percent"; + public const ACTION_TYPE_CART_FIXED = "cart_fixed"; public const PRODUCT_FREE = 0; + public const PRODUCT_NOT_FREE = 1; + public const PRODUCT_NOT_FREE_REDUCED_TAX = 2; public const TAX_CATEGORY = 0; + public const TAX_REDUCED_CATEGORY = 1; public const COUPON_FIXED = 0; + public const COUPON_FIXED_FULL = 1; + public const COUPON_PERCENTAGE = 2; + public const COUPON_PERCENTAGE_FULL = 3; + public const COUPON_FIXED_CART = 4; @@ -471,8 +582,8 @@ class CartRuleCest } /** - * @param \UnitTester $I - * @param \Codeception\Example $scenario + * @param \UnitTester $I + * @param \Codeception\Example $scenario * * @dataProvider getCartWithCouponScenarios * @group slow_unit @@ -485,13 +596,15 @@ class CartRuleCest config(['app.default_country' => 'DE']); $customer = $I->have(Customer::class); - auth()->guard('customer')->loginUsingId($customer->id); + auth() + ->guard('customer') + ->loginUsingId($customer->id); Event::dispatch('customer.after.login', $customer['email']); $this->sessionToken = $faker->uuid; session(['_token' => $this->sessionToken]); - $taxCategories = $this->generateTaxCategories($I); + $taxCategories = $this->generateTaxCategories($I); $this->products = $this->generateProducts($I, $scenario['productSequence'], $taxCategories); $cartRuleWithCoupon = null; @@ -511,8 +624,10 @@ class CartRuleCest if ($scenario['withCoupon']) { $expectedCartCoupon = $cartRuleWithCoupon->coupon->code; - $I->comment('I try to use coupon code ' . $expectedCartCoupon); - cart()->setCouponCode($expectedCartCoupon)->collectTotals(); + $I->comment('I try to use coupon code '.$expectedCartCoupon); + cart() + ->setCouponCode($expectedCartCoupon) + ->collectTotals(); } else { $I->comment('I have no coupon'); $expectedCartCoupon = null; @@ -525,7 +640,11 @@ class CartRuleCest $expectedCartItems = $this->checkMaxDiscount($expectedCartItems); foreach ($expectedCartItems as $expectedCartItem) { - $I->seeRecord('cart_items', $expectedCartItem); + /** + * @var $expectedCartItem \Tests\Unit\CartRule\expectedCartItem + */ + + $I->seeRecord('cart_items', $expectedCartItem->toArray()); } $expectedCart = $this->getExpectedCart($cart->id, $expectedCartItems, $cartRuleWithCoupon); @@ -569,17 +688,18 @@ class CartRuleCest cart()->saveShippingMethod('free_free'); cart()->savePaymentMethod(['method' => 'mollie_creditcard']); $I->assertFalse(cart()->hasError()); - $orderItemRepository = new OrderItemRepository(app()); - $downloadableLinkRepository = new ProductDownloadableLinkRepository(app()); - $downloadableLinkPurchasedRepository = - new DownloadableLinkPurchasedRepository($downloadableLinkRepository, app()); - $orderRepository = new OrderRepository($orderItemRepository, $downloadableLinkPurchasedRepository, app()); + $orderItemRepository = new OrderItemRepository(app()); + $downloadableLinkRepository = new ProductDownloadableLinkRepository(app()); + $downloadableLinkPurchasedRepository = new DownloadableLinkPurchasedRepository($downloadableLinkRepository, app()); + $orderRepository = new OrderRepository($orderItemRepository, $downloadableLinkPurchasedRepository, app()); $orderRepository->create(cart()->prepareDataForOrder()); $expectedOrder = new expectedOrder($expectedCart, $customer, $cart->id); - $I->seeRecord('orders', $expectedOrder); + $I->seeRecord('orders', $expectedOrder->toArray()); - auth()->guard('customer')->logout(); + auth() + ->guard('customer') + ->logout(); } } @@ -591,7 +711,9 @@ class CartRuleCest $customer = $I->have(Customer::class); - auth()->guard('customer')->loginUsingId($customer->id); + auth() + ->guard('customer') + ->loginUsingId($customer->id); Event::dispatch('customer.after.login', $customer['email']); $this->sessionToken = $faker->uuid; @@ -615,7 +737,7 @@ class CartRuleCest 'tax_category_id' => $taxCategorie->id, ], ]; - $product = $I->haveProduct(Laravel5Helper::SIMPLE_PRODUCT, $productConfig); + $product = $I->haveProduct(Laravel5Helper::SIMPLE_PRODUCT, $productConfig); $ruleConfig = [ 'action_type' => self::ACTION_TYPE_PERCENTAGE, @@ -629,24 +751,27 @@ class CartRuleCest ], ], ]; - $cartRule = $I->have(CartRule::class, $ruleConfig); + $cartRule = $I->have(CartRule::class, $ruleConfig); - DB::table('cart_rule_channels')->insert([ - 'cart_rule_id' => $cartRule->id, - 'channel_id' => core()->getCurrentChannel()->id, - ]); + DB::table('cart_rule_channels') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'channel_id' => core()->getCurrentChannel()->id, + ]); $guestCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'guest']); - DB::table('cart_rule_customer_groups')->insert([ - 'cart_rule_id' => $cartRule->id, - 'customer_group_id' => $guestCustomerGroup['id'], - ]); + DB::table('cart_rule_customer_groups') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'customer_group_id' => $guestCustomerGroup['id'], + ]); $generalCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'general']); - DB::table('cart_rule_customer_groups')->insert([ - 'cart_rule_id' => $cartRule->id, - 'customer_group_id' => $generalCustomerGroup['id'], - ]); + DB::table('cart_rule_customer_groups') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'customer_group_id' => $generalCustomerGroup['id'], + ]); $coupon = $I->have(CartRuleCoupon::class, [ 'code' => 'AWESOME', @@ -655,15 +780,18 @@ class CartRuleCest $data = [ - '_token' => session('_token'), - 'product_id' => $product->id, - 'quantity' => 1, + '_token' => session('_token'), + 'product_id' => $product->id, + 'quantity' => 1, ]; cart()->addProduct($product->id, $data); - cart()->setCouponCode('AWESOME')->collectTotals(); + cart() + ->setCouponCode('AWESOME') + ->collectTotals(); - $cart = cart()->getCart(); - $cartItem = $cart->items()->first(); + $cart = cart()->getCart(); + $cartItem = $cart->items() + ->first(); $I->assertEquals('AWESOME', $cartItem['coupon_code']); $I->assertEquals(23.92, $cartItem['price']); @@ -680,9 +808,9 @@ class CartRuleCest } /** - * @param \Codeception\Example $scenario - * @param \Tests\Unit\Category\cartRuleWithCoupon $cartRuleWithCoupon - * @param int $cartID + * @param \Codeception\Example $scenario + * @param \Tests\Unit\Category\cartRuleWithCoupon $cartRuleWithCoupon + * @param int $cartID * * @return array */ @@ -691,18 +819,10 @@ class CartRuleCest $cartItems = []; foreach ($scenario['productSequence'] as $key => $item) { - $pos = $this->array_find( - 'product_id', - $this->products[$scenario['productSequence'][$key]]->id, - $cartItems - ); + $pos = $this->array_find('product_id', $this->products[$scenario['productSequence'][$key]]->id, $cartItems); if ($pos === null) { - $cartItem = new expectedCartItem( - $cartID, - $this->products[$scenario['productSequence'][$key]]->id - ); - + $cartItem = new expectedCartItem($cartID, $this->products[$scenario['productSequence'][$key]]->id); } else { $cartItem = $cartItems[$pos]; $cartItem->quantity++; @@ -714,8 +834,8 @@ class CartRuleCest break; case self::PRODUCT_NOT_FREE: - $cartItem->price = self::PRODUCT_PRICE; - $cartItem->base_price = self::PRODUCT_PRICE; + $cartItem->price = self::PRODUCT_PRICE; + $cartItem->base_price = self::PRODUCT_PRICE; $cartItem->tax_percent = self::TAX_RATE; $cartItem->calcTotals(); @@ -723,8 +843,8 @@ class CartRuleCest break; case self::PRODUCT_NOT_FREE_REDUCED_TAX: - $cartItem->price = self::REDUCED_PRODUCT_PRICE; - $cartItem->base_price = self::REDUCED_PRODUCT_PRICE; + $cartItem->price = self::REDUCED_PRODUCT_PRICE; + $cartItem->base_price = self::REDUCED_PRODUCT_PRICE; $cartItem->tax_percent = self::REDUCED_TAX_RATE; $cartItem->calcTotals(); @@ -737,12 +857,7 @@ class CartRuleCest case self::COUPON_FIXED: foreach ($scenario['couponScenario']['products'] as $couponItem) { if ($item === $couponItem) { - $cartItem->calcFixedDiscountAmounts( - self::DISCOUNT_AMOUNT_FIX, - self::DISCOUNT_AMOUNT_FIX, - $cartRuleWithCoupon->coupon->code, - $cartRuleWithCoupon->cartRule->id - ); + $cartItem->calcFixedDiscountAmounts(self::DISCOUNT_AMOUNT_FIX, self::DISCOUNT_AMOUNT_FIX, $cartRuleWithCoupon->coupon->code, $cartRuleWithCoupon->cartRule->id); continue; } } @@ -751,12 +866,7 @@ class CartRuleCest case self::COUPON_FIXED_FULL: foreach ($scenario['couponScenario']['products'] as $couponItem) { if ($item === $couponItem) { - $cartItem->calcFixedDiscountAmounts( - self::DISCOUNT_AMOUNT_FIX_FULL, - self::DISCOUNT_AMOUNT_FIX_FULL, - $cartRuleWithCoupon->coupon->code, - $cartRuleWithCoupon->cartRule->id - ); + $cartItem->calcFixedDiscountAmounts(self::DISCOUNT_AMOUNT_FIX_FULL, self::DISCOUNT_AMOUNT_FIX_FULL, $cartRuleWithCoupon->coupon->code, $cartRuleWithCoupon->cartRule->id); continue; } } @@ -765,11 +875,7 @@ class CartRuleCest case self::COUPON_PERCENTAGE: foreach ($scenario['couponScenario']['products'] as $couponItem) { if ($item === $couponItem) { - $cartItem->calcPercentageDiscountAmounts( - self::DISCOUNT_AMOUNT_PERCENT, - $cartRuleWithCoupon->coupon->code, - $cartRuleWithCoupon->cartRule->id - ); + $cartItem->calcPercentageDiscountAmounts(self::DISCOUNT_AMOUNT_PERCENT, $cartRuleWithCoupon->coupon->code, $cartRuleWithCoupon->cartRule->id); continue; } } @@ -778,11 +884,7 @@ class CartRuleCest case self::COUPON_PERCENTAGE_FULL: foreach ($scenario['couponScenario']['products'] as $couponItem) { if ($item === $couponItem) { - $cartItem->calcPercentageDiscountAmounts( - 100.0, - $cartRuleWithCoupon->coupon->code, - $cartRuleWithCoupon->cartRule->id - ); + $cartItem->calcPercentageDiscountAmounts(100.0, $cartRuleWithCoupon->coupon->code, $cartRuleWithCoupon->cartRule->id); continue; } } @@ -792,14 +894,13 @@ class CartRuleCest if ($pos === null) { $cartItems[] = $cartItem; - } else { $cartItems[$pos] = $cartItem; } } if ($scenario['withCoupon'] && $scenario['couponScenario']['scenario'] === self::COUPON_FIXED_CART) { - $totals = $this->calcTotals($cartItems); + $totals = $this->calcTotals($cartItems); $cartItems = $this->splitDiscountToItems($cartItems, $cartRuleWithCoupon, $totals); } @@ -813,10 +914,10 @@ class CartRuleCest 'baseSubTotal' => 0.0, ]; foreach ($cartItems as $expectedCartItem) { - $result['subTotal'] += $expectedCartItem->total; + $result['subTotal'] += $expectedCartItem->total; $result['baseSubTotal'] += $expectedCartItem->base_total; } - $result['subTotal'] = round($result['subTotal'], expectedCart::CART_TOTAL_PRECISION); + $result['subTotal'] = round($result['subTotal'], expectedCart::CART_TOTAL_PRECISION); $result['baseSubTotal'] = round($result['baseSubTotal'], expectedCart::CART_TOTAL_PRECISION); return $result; @@ -827,52 +928,44 @@ class CartRuleCest cartRuleWithCoupon $cartRuleWithCoupon, array $totals ): array { - $discountAmount = self::DISCOUNT_AMOUNT_CART; + $discountAmount = self::DISCOUNT_AMOUNT_CART; $baseDiscountAmount = self::DISCOUNT_AMOUNT_CART; // split coupon amount to cart items $length = count($cartItems) - 1; for ($i = 0; $i < $length; $i++) { - $cartItems[$i]->discount_amount = round( - self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->total / $totals['subTotal'], - expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION - ); - $discountAmount -= $cartItems[$i]->discount_amount; + $cartItems[$i]->discount_amount = round(self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->total / $totals['subTotal'], expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); + $discountAmount -= $cartItems[$i]->discount_amount; - $cartItems[$i]->base_discount_amount = round( - self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->base_total / $totals['baseSubTotal'], - expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION - ); - $baseDiscountAmount -= $cartItems[$i]->discount_amount; + $cartItems[$i]->base_discount_amount = round(self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->base_total / $totals['baseSubTotal'], expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); + $baseDiscountAmount -= $cartItems[$i]->discount_amount; - $cartItems[$i]->coupon_code = $cartRuleWithCoupon->coupon->code; - $cartItems[$i]->applied_cart_rule_ids = (string)$cartRuleWithCoupon->cartRule->id; + $cartItems[$i]->coupon_code = $cartRuleWithCoupon->coupon->code; + $cartItems[$i]->applied_cart_rule_ids = (string) $cartRuleWithCoupon->cartRule->id; } - $cartItems[$length]->discount_amount = $discountAmount; + $cartItems[$length]->discount_amount = $discountAmount; $cartItems[$length]->base_discount_amount = $baseDiscountAmount; - $cartItems[$length]->coupon_code = $cartRuleWithCoupon->coupon->code; - $cartItems[$length]->applied_cart_rule_ids = (string)$cartRuleWithCoupon->cartRule->id; + $cartItems[$length]->coupon_code = $cartRuleWithCoupon->coupon->code; + $cartItems[$length]->applied_cart_rule_ids = (string) $cartRuleWithCoupon->cartRule->id; return $cartItems; } /** - * @param array $expectedCartItems + * @param array $expectedCartItems * * @return array */ private function checkMaxDiscount(array $expectedCartItems): array { foreach ($expectedCartItems as $key => $cartItem) { - $itemGrandTotal = round($cartItem->total + $cartItem->tax_amount, - expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); + $itemGrandTotal = round($cartItem->total + $cartItem->tax_amount, expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); if ($cartItem->discount_amount > $itemGrandTotal) { $expectedCartItems[$key]->discount_amount = $itemGrandTotal; } - $itemBaseGrandTotal = round($cartItem->base_total + $cartItem->base_tax_amount, - expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); + $itemBaseGrandTotal = round($cartItem->base_total + $cartItem->base_tax_amount, expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); if ($cartItem->base_discount_amount > $itemBaseGrandTotal) { $expectedCartItems[$key]->base_discount_amount = $itemBaseGrandTotal; } @@ -882,37 +975,33 @@ class CartRuleCest } /** - * @param int $cartId - * @param array $expectedCartItems + * @param int $cartId + * @param array $expectedCartItems * - * @param \Tests\Unit\Category\cartRuleWithCoupon $cartRuleWithCoupon + * @param \Tests\Unit\Category\cartRuleWithCoupon $cartRuleWithCoupon * * @return \Tests\Unit\Category\expectedCart */ private function getExpectedCart(int $cartId, array $expectedCartItems, ?cartRuleWithCoupon $cartRuleWithCoupon): expectedCart { - $cart = new expectedCart( - $cartId, - auth()->guard('customer')->user()->id - ); + $cart = new expectedCart($cartId, auth() + ->guard('customer') + ->user()->id); if ($cartRuleWithCoupon) { - $cart->applyCoupon( - $cartRuleWithCoupon->cartRule->id, - $cartRuleWithCoupon->coupon->code - ); + $cart->applyCoupon($cartRuleWithCoupon->cartRule->id, $cartRuleWithCoupon->coupon->code); } foreach ($expectedCartItems as $cartItem) { $cart->items_count++; $cart->items_qty += $cartItem->quantity; - $cart->sub_total += $cartItem->total; - $cart->tax_total += $cartItem->tax_amount; + $cart->sub_total += $cartItem->total; + $cart->tax_total += $cartItem->tax_amount; $cart->discount_amount += $cartItem->discount_amount; - $cart->base_sub_total += $cartItem->base_total; - $cart->base_tax_total += $cartItem->base_tax_amount; + $cart->base_sub_total += $cartItem->base_total; + $cart->base_tax_total += $cartItem->base_tax_amount; $cart->base_discount_amount += $cartItem->base_discount_amount; } @@ -922,13 +1011,13 @@ class CartRuleCest } /** - * @param \UnitTester $I + * @param \UnitTester $I * * @return array */ private function generateTaxCategories(UnitTester $I): array { - $result = []; + $result = []; $country = strtoupper(Config::get('app.default_country')) ?? 'DE'; foreach ($this->getTaxRateSpecifications() as $taxSpec => $taxRate) { $tax = $I->have(TaxRate::class, [ @@ -950,20 +1039,20 @@ class CartRuleCest } /** - * @param \UnitTester $I - * @param array $scenario - * @param array $taxCategories + * @param \UnitTester $I + * @param array $scenario + * @param array $taxCategories * * @return array * @throws \Exception */ private function generateProducts(UnitTester $I, array $scenario, array $taxCategories): array { - $products = []; + $products = []; $productSpecs = $this->getProductSpecifications(); foreach ($scenario as $item) { - $productConfig = $this->makeProductConfig($productSpecs[$item], $taxCategories); + $productConfig = $this->makeProductConfig($productSpecs[$item], $taxCategories); $products[$item] = $I->haveProduct($productSpecs[$item]['productType'], $productConfig); } @@ -971,8 +1060,8 @@ class CartRuleCest } /** - * @param \UnitTester $I - * @param array $couponConfig + * @param \UnitTester $I + * @param array $couponConfig * * @return \Tests\Unit\Category\cartRuleWithCoupon */ @@ -981,44 +1070,39 @@ class CartRuleCest $faker = Factory::create(); $couponSpecifications = $this->getCouponSpecifications(); - $ruleConfig = $this->makeRuleConfig( - $couponSpecifications[$couponConfig['scenario']], - $this->products, - $couponConfig['products'] - ); - $cartRule = $I->have(CartRule::class, $ruleConfig); + $ruleConfig = $this->makeRuleConfig($couponSpecifications[$couponConfig['scenario']], $this->products, $couponConfig['products']); + $cartRule = $I->have(CartRule::class, $ruleConfig); - DB::table('cart_rule_channels')->insert([ - 'cart_rule_id' => $cartRule->id, - 'channel_id' => core()->getCurrentChannel()->id, - ]); + DB::table('cart_rule_channels') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'channel_id' => core()->getCurrentChannel()->id, + ]); $guestCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'guest']); - DB::table('cart_rule_customer_groups')->insert([ - 'cart_rule_id' => $cartRule->id, - 'customer_group_id' => $guestCustomerGroup['id'], - ]); + DB::table('cart_rule_customer_groups') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'customer_group_id' => $guestCustomerGroup['id'], + ]); $generalCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'general']); - DB::table('cart_rule_customer_groups')->insert([ - 'cart_rule_id' => $cartRule->id, - 'customer_group_id' => $generalCustomerGroup['id'], - ]); + DB::table('cart_rule_customer_groups') + ->insert([ + 'cart_rule_id' => $cartRule->id, + 'customer_group_id' => $generalCustomerGroup['id'], + ]); $coupon = $I->have(CartRuleCoupon::class, [ 'cart_rule_id' => $cartRule->id, ]); - return new cartRuleWithCoupon( - $cartRule, - $coupon - ); - + return new cartRuleWithCoupon($cartRule, $coupon); } /** - * @param array $productSpec - * @param array $taxCategories + * @param array $productSpec + * @param array $taxCategories * * @return array */ @@ -1052,9 +1136,9 @@ class CartRuleCest } /** - * @param array $ruleSpec - * @param array $products - * @param array $couponableProducts + * @param array $ruleSpec + * @param array $products + * @param array $couponableProducts * * @return array */ @@ -1151,9 +1235,9 @@ class CartRuleCest } /** - * @param string $param + * @param string $param * @param $needleValue - * @param array $data + * @param array $data * * @return int|null */ From 2ab4873e5c40ed9e5f6d4db3f94e12996922e506 Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Tue, 5 Oct 2021 11:56:28 +0300 Subject: [PATCH 04/18] - Fix code style. --- database/factories/UserFactory.php | 13 ++++++++++++- .../Webkul/API/Http/Resources/Catalog/Attribute.php | 3 +++ .../API/Http/Resources/Catalog/AttributeOption.php | 5 ++++- .../src/Database/Factories/AttributeFactory.php | 2 -- .../Database/Factories/AttributeFamilyFactory.php | 2 -- .../Database/Factories/AttributeOptionFactory.php | 2 -- packages/Webkul/Attribute/src/Models/Attribute.php | 2 -- .../Webkul/Attribute/src/Models/AttributeFamily.php | 2 -- .../Webkul/Attribute/src/Models/AttributeOption.php | 6 +----- .../Factories/BookingProductEventTicketFactory.php | 2 -- .../Database/Factories/BookingProductFactory.php | 2 -- .../BookingProduct/src/Models/BookingProduct.php | 3 --- .../src/Models/BookingProductEventTicket.php | 2 -- .../src/Providers/BookingProductServiceProvider.php | 13 ++++++------- packages/Webkul/CartRule/src/Models/CartRule.php | 2 -- .../Webkul/CartRule/src/Models/CartRuleCoupon.php | 2 -- .../src/Database/Factories/CategoryFactory.php | 2 -- packages/Webkul/Category/src/Models/Category.php | 2 -- .../src/Providers/CategoryServiceProvider.php | 4 +--- .../src/Database/Factories/CartAddressFactory.php | 2 -- .../Checkout/src/Database/Factories/CartFactory.php | 2 -- .../src/Database/Factories/CartItemFactory.php | 2 -- .../src/Database/Factories/CartPaymentFactory.php | 2 -- packages/Webkul/Checkout/src/Models/Cart.php | 6 ++---- packages/Webkul/Checkout/src/Models/CartAddress.php | 2 -- packages/Webkul/Checkout/src/Models/CartItem.php | 2 -- packages/Webkul/Checkout/src/Models/CartPayment.php | 2 -- .../Database/Factories/CartRuleCouponFactory.php | 2 -- .../Core/src/Database/Factories/CartRuleFactory.php | 2 -- .../Core/src/Database/Factories/ChannelFactory.php | 2 -- .../Factories/ChannelInventorySourceFactory.php | 2 -- .../Core/src/Database/Factories/CurrencyFactory.php | 2 -- .../Core/src/Database/Factories/LocaleFactory.php | 2 -- .../Database/Factories/SubscriberListFactory.php | 2 -- packages/Webkul/Core/src/Models/Channel.php | 2 -- packages/Webkul/Core/src/Models/Currency.php | 2 -- packages/Webkul/Core/src/Models/Locale.php | 2 -- packages/Webkul/Core/src/Models/SubscribersList.php | 2 -- .../Database/Factories/CustomerAddressFactory.php | 2 -- .../src/Database/Factories/CustomerFactory.php | 2 -- .../src/Database/Factories/CustomerGroupFactory.php | 2 -- packages/Webkul/Customer/src/Models/Customer.php | 4 +--- .../Webkul/Customer/src/Models/CustomerAddress.php | 2 -- .../Webkul/Customer/src/Models/CustomerGroup.php | 2 -- .../Database/Factories/InventorySourceFactory.php | 2 -- .../Webkul/Inventory/src/Models/InventorySource.php | 2 -- .../Factories/ProductAttributeValueFactory.php | 2 -- .../Factories/ProductDownloadableLinkFactory.php | 4 +--- .../ProductDownloadableLinkTranslationFactory.php | 2 -- .../src/Database/Factories/ProductFactory.php | 2 -- .../Database/Factories/ProductInventoryFactory.php | 2 -- .../src/Database/Factories/ProductReviewFactory.php | 2 -- packages/Webkul/Product/src/Models/Product.php | 4 +--- .../Product/src/Models/ProductAttributeValue.php | 2 -- .../Product/src/Models/ProductDownloadableLink.php | 2 -- .../Models/ProductDownloadableLinkTranslation.php | 2 -- .../Webkul/Product/src/Models/ProductInventory.php | 2 -- .../Webkul/Product/src/Models/ProductReview.php | 3 --- .../Sales/src/Database/Factories/InvoiceFactory.php | 2 -- .../src/Database/Factories/InvoiceItemFactory.php | 2 -- .../src/Database/Factories/OrderAddressFactory.php | 2 -- .../Sales/src/Database/Factories/OrderFactory.php | 2 -- .../src/Database/Factories/OrderItemFactory.php | 2 -- .../src/Database/Factories/OrderPaymentFactory.php | 2 -- .../Sales/src/Database/Factories/RefundFactory.php | 2 -- .../src/Database/Factories/ShipmentFactory.php | 2 -- packages/Webkul/Sales/src/Models/Invoice.php | 2 -- packages/Webkul/Sales/src/Models/InvoiceItem.php | 2 -- packages/Webkul/Sales/src/Models/Order.php | 4 +--- packages/Webkul/Sales/src/Models/OrderAddress.php | 2 -- packages/Webkul/Sales/src/Models/OrderItem.php | 2 -- packages/Webkul/Sales/src/Models/OrderPayment.php | 2 -- packages/Webkul/Sales/src/Models/Refund.php | 2 -- packages/Webkul/Sales/src/Models/Shipment.php | 2 -- .../src/Database/Factories/TaxCategoryFactory.php | 2 -- .../Tax/src/Database/Factories/TaxMapFactory.php | 2 -- .../Tax/src/Database/Factories/TaxRateFactory.php | 2 -- packages/Webkul/Tax/src/Models/TaxCategory.php | 2 -- packages/Webkul/Tax/src/Models/TaxMap.php | 3 --- packages/Webkul/Tax/src/Models/TaxRate.php | 3 +-- 80 files changed, 34 insertions(+), 174 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 72f13b707..5ac28a244 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,5 +1,6 @@ $this->updated_at, ]; } + } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php b/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php index e0a9a8a5e..791e955f0 100644 --- a/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php +++ b/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php @@ -6,10 +6,12 @@ use Illuminate\Http\Resources\Json\JsonResource; class AttributeOption extends JsonResource { + /** * Transform the resource into an array. * * @param \Illuminate\Http\Request + * * @return array */ public function toArray($request) @@ -18,7 +20,8 @@ class AttributeOption extends JsonResource 'id' => $this->id, 'admin_name' => $this->admin_name, 'label' => $this->label, - 'swatch_value' => $this->swatch_value + 'swatch_value' => $this->swatch_value, ]; } + } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php index 9682f5761..b5af6698c 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class AttributeFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -140,5 +139,4 @@ class AttributeFactory extends Factory ]; }); } - } diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php index caaa05ecb..d103d1668 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class AttributeFamilyFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -30,5 +29,4 @@ class AttributeFamilyFactory extends Factory 'status' => 0, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php index 37801f24f..ac013681e 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class AttributeOptionFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -30,5 +29,4 @@ class AttributeOptionFactory extends Factory 'swatch_value' => null, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/Attribute.php b/packages/Webkul/Attribute/src/Models/Attribute.php index 43ea1be24..79f929cb5 100755 --- a/packages/Webkul/Attribute/src/Models/Attribute.php +++ b/packages/Webkul/Attribute/src/Models/Attribute.php @@ -11,7 +11,6 @@ use Webkul\Attribute\Contracts\Attribute as AttributeContract; class Attribute extends TranslatableModel implements AttributeContract { - use HasFactory; public $translatedAttributes = ['name']; @@ -68,5 +67,4 @@ class Attribute extends TranslatableModel implements AttributeContract { return AttributeFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/AttributeFamily.php b/packages/Webkul/Attribute/src/Models/AttributeFamily.php index 9729312a3..65fcc3b61 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeFamily.php +++ b/packages/Webkul/Attribute/src/Models/AttributeFamily.php @@ -11,7 +11,6 @@ use Webkul\Attribute\Contracts\AttributeFamily as AttributeFamilyContract; class AttributeFamily extends Model implements AttributeFamilyContract { - use HasFactory; public $timestamps = false; @@ -87,5 +86,4 @@ class AttributeFamily extends Model implements AttributeFamilyContract { return AttributeFamilyFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/AttributeOption.php b/packages/Webkul/Attribute/src/Models/AttributeOption.php index d1342069a..e57d231c2 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeOption.php +++ b/packages/Webkul/Attribute/src/Models/AttributeOption.php @@ -2,9 +2,7 @@ namespace Webkul\Attribute\Models; -use Illuminate\Support\Facades\Storage; use Webkul\Core\Eloquent\TranslatableModel; -use Illuminate\Testing\Fluent\Concerns\Has; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Attribute\Database\Factories\AttributeOptionFactory; @@ -12,7 +10,6 @@ use Webkul\Attribute\Contracts\AttributeOption as AttributeOptionContract; class AttributeOption extends TranslatableModel implements AttributeOptionContract { - use HasFactory; public $timestamps = false; @@ -40,7 +37,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra public function swatch_value_url() { if ($this->swatch_value && $this->attribute->swatch_type == 'image') { - return url('cache/small/'.$this->swatch_value); + return url('cache/small/' . $this->swatch_value); } return; @@ -58,5 +55,4 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra { return AttributeOptionFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php index 584be0ac1..e8d018bf9 100644 --- a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php @@ -8,7 +8,6 @@ use Webkul\BookingProduct\Models\BookingProductEventTicket; class BookingProductEventTicketFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,5 +28,4 @@ class BookingProductEventTicketFactory extends Factory 'booking_product_id' => BookingProduct::factory(), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php index 13edec3b5..dadda4250 100644 --- a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class BookingProductFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -34,5 +33,4 @@ class BookingProductFactory extends Factory 'product_id' => Product::factory(['type' => 'booking']), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProduct.php b/packages/Webkul/BookingProduct/src/Models/BookingProduct.php index a1cc69704..911f71ef2 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProduct.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProduct.php @@ -3,14 +3,12 @@ namespace Webkul\BookingProduct\Models; use Illuminate\Database\Eloquent\Model; -use Webkul\Product\Models\ProductProxy; use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\BookingProduct\Database\Factories\BookingProductFactory; use Webkul\BookingProduct\Contracts\BookingProduct as BookingProductContract; class BookingProduct extends Model implements BookingProductContract { - use HasFactory; protected $fillable = [ @@ -86,5 +84,4 @@ class BookingProduct extends Model implements BookingProductContract { return BookingProductFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php index ad364ce4d..b98066959 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php @@ -9,7 +9,6 @@ use Webkul\BookingProduct\Contracts\BookingProductEventTicket as BookingProductE class BookingProductEventTicket extends TranslatableModel implements BookingProductEventTicketContract { - use HasFactory; public $timestamps = false; @@ -37,5 +36,4 @@ class BookingProductEventTicket extends TranslatableModel implements BookingProd { return BookingProductEventTicketFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php index c816bdf3e..cf53b167b 100644 --- a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php +++ b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php @@ -11,20 +11,19 @@ class BookingProductServiceProvider extends ServiceProvider * Bootstrap services. * * @return void - * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function boot(): void { - $this->loadRoutesFrom(__DIR__.'/../Http/front-routes.php'); + $this->loadRoutesFrom(__DIR__ . '/../Http/front-routes.php'); - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'bookingproduct'); + $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'bookingproduct'); - $this->loadViewsFrom(__DIR__.'/../Resources/views', 'bookingproduct'); + $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'bookingproduct'); $this->publishes([ - __DIR__.'/../../publishable/assets' => public_path('themes/default/assets'), + __DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'), ], 'public'); $this->app->register(EventServiceProvider::class); @@ -37,7 +36,7 @@ class BookingProductServiceProvider extends ServiceProvider */ public function register(): void { - $this->mergeConfigFrom(dirname(__DIR__).'/Config/product_types.php', 'product_types'); + $this->mergeConfigFrom(dirname(__DIR__) . '/Config/product_types.php', 'product_types'); } } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRule.php b/packages/Webkul/CartRule/src/Models/CartRule.php index 9100fc57e..78c324028 100644 --- a/packages/Webkul/CartRule/src/Models/CartRule.php +++ b/packages/Webkul/CartRule/src/Models/CartRule.php @@ -11,7 +11,6 @@ use Webkul\Customer\Models\CustomerGroupProxy; class CartRule extends Model implements CartRuleContract { - use HasFactory; protected $fillable = [ @@ -140,5 +139,4 @@ class CartRule extends Model implements CartRuleContract { return CartRuleFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php index 602424b46..767a4a36a 100644 --- a/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php +++ b/packages/Webkul/CartRule/src/Models/CartRuleCoupon.php @@ -10,7 +10,6 @@ use Webkul\CartRule\Contracts\CartRuleCoupon as CartRuleCouponContract; class CartRuleCoupon extends Model implements CartRuleCouponContract { - use HasFactory; protected $fillable = [ @@ -41,5 +40,4 @@ class CartRuleCoupon extends Model implements CartRuleCouponContract { return CartRuleCouponFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php index 414e8004a..6b8612e99 100644 --- a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php +++ b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CategoryFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -60,5 +59,4 @@ class CategoryFactory extends Factory ]; }); } - } diff --git a/packages/Webkul/Category/src/Models/Category.php b/packages/Webkul/Category/src/Models/Category.php index 6bce836ea..894cc9d75 100755 --- a/packages/Webkul/Category/src/Models/Category.php +++ b/packages/Webkul/Category/src/Models/Category.php @@ -23,7 +23,6 @@ use Webkul\Product\Models\ProductProxy; */ class Category extends TranslatableModel implements CategoryContract { - use NodeTrait, HasFactory; public $translatedAttributes = [ @@ -171,5 +170,4 @@ class Category extends TranslatableModel implements CategoryContract { return CategoryFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php index c4905e07c..b31a9a834 100755 --- a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php +++ b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php @@ -8,7 +8,6 @@ use Webkul\Category\Observers\CategoryObserver; class CategoryServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -16,9 +15,8 @@ class CategoryServiceProvider extends ServiceProvider */ public function boot(): void { - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); CategoryProxy::observe(CategoryObserver::class); } - } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php index d83dcdf9a..cb179e9b0 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartAddressFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,5 +28,4 @@ class CartAddressFactory extends Factory 'address_type' => CartAddress::ADDRESS_TYPE_BILLING, ]; } - } diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php index 7cc5c75a5..65e5f46b9 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -54,6 +53,5 @@ class CartFactory extends Factory 'updated_at' => $now, ]; } - } diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php index c20838dd2..0ead5b1c4 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartItemFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -53,5 +52,4 @@ class CartItemFactory extends Factory 'updated_at' => $now, ]; } - } diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php index 692c3202f..62522f176 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartPaymentFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartPaymentFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -30,7 +29,6 @@ class CartPaymentFactory extends Factory 'updated_at' => $now, ]; } - } diff --git a/packages/Webkul/Checkout/src/Models/Cart.php b/packages/Webkul/Checkout/src/Models/Cart.php index f5960f31f..09f33b416 100755 --- a/packages/Webkul/Checkout/src/Models/Cart.php +++ b/packages/Webkul/Checkout/src/Models/Cart.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Cart extends Model implements CartContract { - use HasFactory; protected $table = 'cart'; @@ -193,9 +192,9 @@ class Cart extends Model implements CartContract */ public function checkMinimumOrder(): bool { - $minimumOrderAmount = (float) (core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0); + $minimumOrderAmount = (float)(core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0); - $cartBaseSubTotal = (float) $this->base_sub_total; + $cartBaseSubTotal = (float)$this->base_sub_total; return $cartBaseSubTotal >= $minimumOrderAmount; } @@ -210,5 +209,4 @@ class Cart extends Model implements CartContract { return CartFactory::new(); } - } diff --git a/packages/Webkul/Checkout/src/Models/CartAddress.php b/packages/Webkul/Checkout/src/Models/CartAddress.php index e6f8aac00..c7b26bf47 100755 --- a/packages/Webkul/Checkout/src/Models/CartAddress.php +++ b/packages/Webkul/Checkout/src/Models/CartAddress.php @@ -21,7 +21,6 @@ use Webkul\Core\Models\Address; */ class CartAddress extends Address implements CartAddressContract { - use HasFactory; public const ADDRESS_TYPE_SHIPPING = 'cart_shipping'; @@ -77,5 +76,4 @@ class CartAddress extends Address implements CartAddressContract { return CartAddressFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Models/CartItem.php b/packages/Webkul/Checkout/src/Models/CartItem.php index 6a092e6c3..f2da97ccb 100755 --- a/packages/Webkul/Checkout/src/Models/CartItem.php +++ b/packages/Webkul/Checkout/src/Models/CartItem.php @@ -15,7 +15,6 @@ use Webkul\Checkout\Contracts\CartItem as CartItemContract; class CartItem extends Model implements CartItemContract { - use HasFactory; protected $table = 'cart_items'; @@ -93,5 +92,4 @@ class CartItem extends Model implements CartItemContract { return CartItemFactory::new(); } - } diff --git a/packages/Webkul/Checkout/src/Models/CartPayment.php b/packages/Webkul/Checkout/src/Models/CartPayment.php index 68d2a10b7..f518fed58 100755 --- a/packages/Webkul/Checkout/src/Models/CartPayment.php +++ b/packages/Webkul/Checkout/src/Models/CartPayment.php @@ -9,7 +9,6 @@ use Webkul\Checkout\Contracts\CartPayment as CartPaymentContract; class CartPayment extends Model implements CartPaymentContract { - use HasFactory; protected $table = 'cart_payment'; @@ -23,5 +22,4 @@ class CartPayment extends Model implements CartPaymentContract { return CartPaymentFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php index f4c71eff9..cbe42b6a1 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartRuleCouponFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -33,5 +32,4 @@ class CartRuleCouponFactory extends Factory 'cart_rule_id' => CartRule::factory(), ]; } - } diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php index da292f841..403654acf 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CartRuleFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -45,5 +44,4 @@ class CartRuleFactory extends Factory 'conditions' => null, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php index e71bd75e2..ab6ab1574 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php @@ -11,7 +11,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ChannelFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -46,5 +45,4 @@ class ChannelFactory extends Factory 'home_seo' => json_encode($seoData, JSON_THROW_ON_ERROR), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php index 193a5b6f3..0ddce3c49 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php @@ -6,7 +6,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ChannelInventorySourceFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -26,5 +25,4 @@ class ChannelInventorySourceFactory extends Factory 'inventory_source_id' => 1, ]; } - } diff --git a/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php b/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php index c5faa1b83..73bfc2c59 100644 --- a/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CurrencyFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CurrencyFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -28,5 +27,4 @@ class CurrencyFactory extends Factory 'name' => $this->faker->word, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php index 7f740198f..251632861 100644 --- a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class LocaleFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -50,5 +49,4 @@ class LocaleFactory extends Factory ]; }); } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php index 80f779824..8d13426a1 100644 --- a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class SubscriberListFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -28,6 +27,5 @@ class SubscriberListFactory extends Factory 'channel_id' => 1, ]; } - } diff --git a/packages/Webkul/Core/src/Models/Channel.php b/packages/Webkul/Core/src/Models/Channel.php index 7e7c08564..a3fd16e01 100755 --- a/packages/Webkul/Core/src/Models/Channel.php +++ b/packages/Webkul/Core/src/Models/Channel.php @@ -12,7 +12,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Channel extends TranslatableModel implements ChannelContract { - use HasFactory; protected $fillable = [ @@ -138,5 +137,4 @@ class Channel extends TranslatableModel implements ChannelContract { return ChannelFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/Currency.php b/packages/Webkul/Core/src/Models/Currency.php index 16f9fe929..1e3db0e9d 100755 --- a/packages/Webkul/Core/src/Models/Currency.php +++ b/packages/Webkul/Core/src/Models/Currency.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Currency extends Model implements CurrencyContract { - use HasFactory; /** @@ -53,5 +52,4 @@ class Currency extends Model implements CurrencyContract { return CurrencyFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/Locale.php b/packages/Webkul/Core/src/Models/Locale.php index 391e4cced..7814bdd94 100755 --- a/packages/Webkul/Core/src/Models/Locale.php +++ b/packages/Webkul/Core/src/Models/Locale.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Locale extends Model implements LocaleContract { - use HasFactory; /** @@ -32,5 +31,4 @@ class Locale extends Model implements LocaleContract { return LocaleFactory::new(); } - } diff --git a/packages/Webkul/Core/src/Models/SubscribersList.php b/packages/Webkul/Core/src/Models/SubscribersList.php index 21c8c3006..2cbbb7ef8 100755 --- a/packages/Webkul/Core/src/Models/SubscribersList.php +++ b/packages/Webkul/Core/src/Models/SubscribersList.php @@ -11,7 +11,6 @@ use Webkul\Core\Contracts\SubscribersList as SubscribersListContract; class SubscribersList extends Model implements SubscribersListContract { - use HasFactory; /** @@ -49,5 +48,4 @@ class SubscribersList extends Model implements SubscribersListContract { return SubscriberListFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index d148c5cd2..5b2e0e487 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CustomerAddressFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -46,7 +45,6 @@ class CustomerAddressFactory extends Factory 'address_type' => CustomerAddress::ADDRESS_TYPE, ]; } - } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php index 4e9689e90..cccfc9002 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CustomerFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -72,5 +71,4 @@ class CustomerFactory extends Factory ]; }); } - } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php index 012ae252b..5fc1bf625 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class CustomerGroupFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -31,5 +30,4 @@ class CustomerGroupFactory extends Factory 'code' => lcfirst($name), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Models/Customer.php b/packages/Webkul/Customer/src/Models/Customer.php index 26876658e..e06f18e66 100755 --- a/packages/Webkul/Customer/src/Models/Customer.php +++ b/packages/Webkul/Customer/src/Models/Customer.php @@ -20,7 +20,6 @@ use Webkul\Customer\Database\Factories\CustomerAddressFactory; class Customer extends Authenticatable implements CustomerContract, JWTSubject { - use Notifiable, HasFactory; protected $table = 'customers'; @@ -53,7 +52,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject */ public function getNameAttribute(): string { - return ucfirst($this->first_name).' '.ucfirst($this->last_name); + return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name); } /** @@ -194,5 +193,4 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject { return CustomerFactory::new(); } - } diff --git a/packages/Webkul/Customer/src/Models/CustomerAddress.php b/packages/Webkul/Customer/src/Models/CustomerAddress.php index 19857cd6b..e84eb6ee3 100755 --- a/packages/Webkul/Customer/src/Models/CustomerAddress.php +++ b/packages/Webkul/Customer/src/Models/CustomerAddress.php @@ -10,7 +10,6 @@ use Webkul\Customer\Contracts\CustomerAddress as CustomerAddressContract; class CustomerAddress extends Address implements CustomerAddressContract { - use HasFactory; public const ADDRESS_TYPE = 'customer'; @@ -45,5 +44,4 @@ class CustomerAddress extends Address implements CustomerAddressContract { return CustomerAddressFactory::new(); } - } diff --git a/packages/Webkul/Customer/src/Models/CustomerGroup.php b/packages/Webkul/Customer/src/Models/CustomerGroup.php index 8ce906b11..87a0ef940 100755 --- a/packages/Webkul/Customer/src/Models/CustomerGroup.php +++ b/packages/Webkul/Customer/src/Models/CustomerGroup.php @@ -9,7 +9,6 @@ use Webkul\Customer\Contracts\CustomerGroup as CustomerGroupContract; class CustomerGroup extends Model implements CustomerGroupContract { - use HasFactory; protected $table = 'customer_groups'; @@ -37,5 +36,4 @@ class CustomerGroup extends Model implements CustomerGroupContract { return CustomerGroupFactory::new(); } - } diff --git a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php index 58d36d07c..74d5ee111 100644 --- a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php +++ b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class InventorySourceFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -42,5 +41,4 @@ class InventorySourceFactory extends Factory 'updated_at' => $now, ]; } - } diff --git a/packages/Webkul/Inventory/src/Models/InventorySource.php b/packages/Webkul/Inventory/src/Models/InventorySource.php index 222b3bb1a..05834f972 100755 --- a/packages/Webkul/Inventory/src/Models/InventorySource.php +++ b/packages/Webkul/Inventory/src/Models/InventorySource.php @@ -9,7 +9,6 @@ use Webkul\Inventory\Contracts\InventorySource as InventorySourceContract; class InventorySource extends Model implements InventorySourceContract { - use HasFactory; protected $guarded = ['_token']; @@ -23,5 +22,4 @@ class InventorySource extends Model implements InventorySourceContract { return InventorySourceFactory::new(); } - } \ 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 8e494d75f..3b0737799 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ProductAttributeValueFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,5 +28,4 @@ class ProductAttributeValueFactory extends Factory 'channel' => 'default', ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php index 4ddcf862e..9d29062b1 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ProductDownloadableLinkFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,7 +28,7 @@ class ProductDownloadableLinkFactory extends Factory return [ 'url' => '', - 'file' => $filepath.$filename, + 'file' => $filepath . $filename, 'file_name' => $filename, 'type' => 'file', 'price' => 0.0000, @@ -39,5 +38,4 @@ class ProductDownloadableLinkFactory extends Factory 'updated_at' => $now, ]; } - } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php index bb1b71c83..c42c64a29 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php @@ -8,7 +8,6 @@ use Webkul\Product\Models\ProductDownloadableLinkTranslation; class ProductDownloadableLinkTranslationFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,5 +28,4 @@ class ProductDownloadableLinkTranslationFactory extends Factory 'product_downloadable_link_id' => ProductDownloadableLink::factory(), ]; } - } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php index 51a355564..fde6b3bcb 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ProductFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -73,5 +72,4 @@ class ProductFactory extends Factory ]; }); } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php index d6dfd4a88..b39a2c7c2 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ProductInventoryFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -30,5 +29,4 @@ class ProductInventoryFactory extends Factory 'inventory_source_id' => InventorySource::factory(), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php index 7be9cd047..c19bf3844 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ProductReviewFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -31,5 +30,4 @@ class ProductReviewFactory extends Factory 'product_id' => Product::factory(), ]; } - } diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index ecfaf48eb..640aa0e1f 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -21,7 +21,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Product extends Model implements ProductContract { - use HasFactory; /** @@ -301,7 +300,7 @@ class Product extends Model implements ProductContract return $this->typeInstance; } - $this->typeInstance = app(config('product_types.'.$this->type.'.class')); + $this->typeInstance = app(config('product_types.' . $this->type . '.class')); if (!$this->typeInstance instanceof AbstractType) { throw new Exception("Please ensure the product type '{$this->type}' is configured in your application."); @@ -540,5 +539,4 @@ class Product extends Model implements ProductContract { return ProductFactory::new(); } - } diff --git a/packages/Webkul/Product/src/Models/ProductAttributeValue.php b/packages/Webkul/Product/src/Models/ProductAttributeValue.php index 67ec1cb2b..417c503dd 100755 --- a/packages/Webkul/Product/src/Models/ProductAttributeValue.php +++ b/packages/Webkul/Product/src/Models/ProductAttributeValue.php @@ -11,7 +11,6 @@ use Webkul\Product\Contracts\ProductAttributeValue as ProductAttributeValueContr class ProductAttributeValue extends Model implements ProductAttributeValueContract { - use HasFactory; /** @@ -84,5 +83,4 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra { return ProductAttributeValueFactory::new(); } - } diff --git a/packages/Webkul/Product/src/Models/ProductDownloadableLink.php b/packages/Webkul/Product/src/Models/ProductDownloadableLink.php index ce1ae4e85..c02abc644 100644 --- a/packages/Webkul/Product/src/Models/ProductDownloadableLink.php +++ b/packages/Webkul/Product/src/Models/ProductDownloadableLink.php @@ -10,7 +10,6 @@ use Webkul\Product\Contracts\ProductDownloadableLink as ProductDownloadableLinkC class ProductDownloadableLink extends TranslatableModel implements ProductDownloadableLinkContract { - use HasFactory; public $translatedAttributes = ['title']; @@ -100,5 +99,4 @@ class ProductDownloadableLink extends TranslatableModel implements ProductDownlo { return ProductDownloadableLinkFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php b/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php index e4fa4f764..f630413dd 100644 --- a/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php +++ b/packages/Webkul/Product/src/Models/ProductDownloadableLinkTranslation.php @@ -9,7 +9,6 @@ use Webkul\Product\Contracts\ProductDownloadableLinkTranslation as ProductDownlo class ProductDownloadableLinkTranslation extends Model implements ProductDownloadableLinkTranslationContract { - use HasFactory; public $timestamps = false; @@ -25,5 +24,4 @@ class ProductDownloadableLinkTranslation extends Model implements ProductDownloa { return ProductDownloadableLinkTranslationFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductInventory.php b/packages/Webkul/Product/src/Models/ProductInventory.php index faa86ffeb..9ab93a449 100755 --- a/packages/Webkul/Product/src/Models/ProductInventory.php +++ b/packages/Webkul/Product/src/Models/ProductInventory.php @@ -11,7 +11,6 @@ use Webkul\Product\Contracts\ProductInventory as ProductInventoryContract; class ProductInventory extends Model implements ProductInventoryContract { - use HasFactory; public $timestamps = false; @@ -48,5 +47,4 @@ class ProductInventory extends Model implements ProductInventoryContract { return ProductInventoryFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductReview.php b/packages/Webkul/Product/src/Models/ProductReview.php index becccc86b..70ee1b239 100755 --- a/packages/Webkul/Product/src/Models/ProductReview.php +++ b/packages/Webkul/Product/src/Models/ProductReview.php @@ -4,7 +4,6 @@ namespace Webkul\Product\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Customer\Models\CustomerProxy; -use Webkul\Product\Models\Product; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -13,7 +12,6 @@ use Webkul\Product\Contracts\ProductReview as ProductReviewContract; class ProductReview extends Model implements ProductReviewContract { - use HasFactory; protected $fillable = [ @@ -59,5 +57,4 @@ class ProductReview extends Model implements ProductReviewContract { return ProductReviewFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php index 1dbb3fbcb..d37f6ef59 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class InvoiceFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -92,5 +91,4 @@ class InvoiceFactory extends Factory ]; }); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php index 8895d6e33..608e9d533 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class InvoiceItemFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -50,5 +49,4 @@ class InvoiceItemFactory extends Factory 'invoice_id' => Invoice::factory(), ]; } - } diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php index e2e91c02e..905343cec 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class OrderAddressFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -60,5 +59,4 @@ class OrderAddressFactory extends Factory ]; }); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php index 5956bbabc..26dbf6ef2 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class OrderFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -105,5 +104,4 @@ class OrderFactory extends Factory ]; }); } - } diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php index 4520630c3..129106ac9 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class OrderItemFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -59,5 +58,4 @@ class OrderItemFactory extends Factory 'product_type' => Product::class, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php index a0be980ef..cd462a993 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderPaymentFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class OrderPaymentFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -26,6 +25,5 @@ class OrderPaymentFactory extends Factory 'method' => 'cashondelivery', ]; } - } diff --git a/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php index 4dfd66300..aebee283a 100644 --- a/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class RefundFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -27,6 +26,5 @@ class RefundFactory extends Factory 'order_id' => Order::factory(), ]; } - } diff --git a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php index 339e7b99a..d59b66c40 100644 --- a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ShipmentFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -34,6 +33,5 @@ class ShipmentFactory extends Factory 'inventory_source_id' => InventorySource::factory(), ]; } - } diff --git a/packages/Webkul/Sales/src/Models/Invoice.php b/packages/Webkul/Sales/src/Models/Invoice.php index 7e71f59ed..98c6226ab 100755 --- a/packages/Webkul/Sales/src/Models/Invoice.php +++ b/packages/Webkul/Sales/src/Models/Invoice.php @@ -13,7 +13,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Invoice extends Model implements InvoiceContract { - use PaymentTerm, HasFactory; /** @@ -97,5 +96,4 @@ class Invoice extends Model implements InvoiceContract { return InvoiceFactory::new(); } - } diff --git a/packages/Webkul/Sales/src/Models/InvoiceItem.php b/packages/Webkul/Sales/src/Models/InvoiceItem.php index de39941f0..9d7c26ff0 100755 --- a/packages/Webkul/Sales/src/Models/InvoiceItem.php +++ b/packages/Webkul/Sales/src/Models/InvoiceItem.php @@ -14,7 +14,6 @@ use Webkul\Sales\Contracts\InvoiceItem as InvoiceItemContract; class InvoiceItem extends Model implements InvoiceItemContract { - use HasFactory; protected $guarded = [ @@ -94,5 +93,4 @@ class InvoiceItem extends Model implements InvoiceItemContract { return InvoiceItemFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Order.php b/packages/Webkul/Sales/src/Models/Order.php index 21687144b..13b58b7b3 100755 --- a/packages/Webkul/Sales/src/Models/Order.php +++ b/packages/Webkul/Sales/src/Models/Order.php @@ -10,7 +10,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Order extends Model implements OrderContract { - use HasFactory; public const STATUS_PENDING = 'pending'; @@ -54,7 +53,7 @@ class Order extends Model implements OrderContract */ public function getCustomerFullNameAttribute(): string { - return $this->customer_first_name.' '.$this->customer_last_name; + return $this->customer_first_name . ' ' . $this->customer_last_name; } /** @@ -345,5 +344,4 @@ class Order extends Model implements OrderContract { return OrderFactory::new(); } - } diff --git a/packages/Webkul/Sales/src/Models/OrderAddress.php b/packages/Webkul/Sales/src/Models/OrderAddress.php index 4358a764d..6ba8197d5 100755 --- a/packages/Webkul/Sales/src/Models/OrderAddress.php +++ b/packages/Webkul/Sales/src/Models/OrderAddress.php @@ -21,7 +21,6 @@ use Illuminate\Database\Eloquent\Builder; */ class OrderAddress extends Address implements OrderAddressContract { - use HasFactory; public const ADDRESS_TYPE_SHIPPING = 'order_shipping'; @@ -80,5 +79,4 @@ class OrderAddress extends Address implements OrderAddressContract { return OrderAddressFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/OrderItem.php b/packages/Webkul/Sales/src/Models/OrderItem.php index 5c43f37cb..8593d738a 100755 --- a/packages/Webkul/Sales/src/Models/OrderItem.php +++ b/packages/Webkul/Sales/src/Models/OrderItem.php @@ -14,7 +14,6 @@ use Webkul\Sales\Contracts\OrderItem as OrderItemContract; class OrderItem extends Model implements OrderItemContract { - use HasFactory; protected $guarded = [ @@ -233,5 +232,4 @@ class OrderItem extends Model implements OrderItemContract { return OrderItemFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/OrderPayment.php b/packages/Webkul/Sales/src/Models/OrderPayment.php index 34eedb442..495013e1e 100755 --- a/packages/Webkul/Sales/src/Models/OrderPayment.php +++ b/packages/Webkul/Sales/src/Models/OrderPayment.php @@ -9,7 +9,6 @@ use Webkul\Sales\Contracts\OrderPayment as OrderPaymentContract; class OrderPayment extends Model implements OrderPaymentContract { - use HasFactory; protected $table = 'order_payment'; @@ -33,5 +32,4 @@ class OrderPayment extends Model implements OrderPaymentContract { return OrderPaymentFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Refund.php b/packages/Webkul/Sales/src/Models/Refund.php index 645cc60ef..d40142607 100644 --- a/packages/Webkul/Sales/src/Models/Refund.php +++ b/packages/Webkul/Sales/src/Models/Refund.php @@ -12,7 +12,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Refund extends Model implements RefundContract { - use HasFactory; protected $guarded = [ @@ -81,5 +80,4 @@ class Refund extends Model implements RefundContract { return RefundFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Shipment.php b/packages/Webkul/Sales/src/Models/Shipment.php index 942060a3d..cf8233ec6 100755 --- a/packages/Webkul/Sales/src/Models/Shipment.php +++ b/packages/Webkul/Sales/src/Models/Shipment.php @@ -13,7 +13,6 @@ use Webkul\Sales\Contracts\Shipment as ShipmentContract; class Shipment extends Model implements ShipmentContract { - use HasFactory; protected $guarded = [ @@ -72,5 +71,4 @@ class Shipment extends Model implements ShipmentContract { return ShipmentFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php index 2078f7398..d185fc25d 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class TaxCategoryFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -28,5 +27,4 @@ class TaxCategoryFactory extends Factory 'description' => $this->faker->sentence(10), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php index bd90e0300..de5de85e4 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class TaxMapFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -29,6 +28,5 @@ class TaxMapFactory extends Factory 'tax_rate_id' => TaxRate::factory(), ]; } - } diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php index 0008f14a4..5231cdae3 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class TaxRateFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -33,5 +32,4 @@ class TaxRateFactory extends Factory 'tax_rate' => $this->faker->randomFloat(2, 3, 25), ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxCategory.php b/packages/Webkul/Tax/src/Models/TaxCategory.php index e2984ecf9..7ef065252 100755 --- a/packages/Webkul/Tax/src/Models/TaxCategory.php +++ b/packages/Webkul/Tax/src/Models/TaxCategory.php @@ -10,7 +10,6 @@ use Webkul\Tax\Contracts\TaxCategory as TaxCategoryContract; class TaxCategory extends Model implements TaxCategoryContract { - use HasFactory; /** @@ -43,5 +42,4 @@ class TaxCategory extends Model implements TaxCategoryContract { return TaxCategoryFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxMap.php b/packages/Webkul/Tax/src/Models/TaxMap.php index f1aeda2f9..650e6c07b 100755 --- a/packages/Webkul/Tax/src/Models/TaxMap.php +++ b/packages/Webkul/Tax/src/Models/TaxMap.php @@ -3,8 +3,6 @@ namespace Webkul\Tax\Models; use Illuminate\Database\Eloquent\Model; -use Webkul\Tax\Models\TaxCategory; -use Webkul\Tax\Models\TaxRate; use Webkul\Tax\Database\Factories\TaxMapFactory; use Webkul\Tax\Contracts\TaxMap as TaxMapContract; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -35,5 +33,4 @@ class TaxMap extends Model implements TaxMapContract { return TaxMapFactory::new(); } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Models/TaxRate.php b/packages/Webkul/Tax/src/Models/TaxRate.php index b3a8fdb0d..4e4b34b41 100755 --- a/packages/Webkul/Tax/src/Models/TaxRate.php +++ b/packages/Webkul/Tax/src/Models/TaxRate.php @@ -3,7 +3,6 @@ namespace Webkul\Tax\Models; use Illuminate\Database\Eloquent\Model; -use Webkul\Tax\Models\TaxCategory; use Webkul\Tax\Database\Factories\TaxRateFactory; use Webkul\Tax\Contracts\TaxRate as TaxRateContract; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -12,6 +11,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; class TaxRate extends Model implements TaxRateContract { use HasFactory; + /** * The attributes that are mass assignable. * @@ -45,5 +45,4 @@ class TaxRate extends Model implements TaxRateContract { return TaxRateFactory::new(); } - } \ No newline at end of file From 7b612ecc6759804e46846d30749ceac5f6fdc5b4 Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Tue, 5 Oct 2021 12:37:21 +0300 Subject: [PATCH 05/18] - Fix trigger yaml file to user laravel instead of larave5. - Remove codeception/module-laravel5 as it was causing trigger testing to fail since it's outdated and we already upgraded factories to laravel 8. --- composer.json | 1 - composer.lock | 55 +---- .../Database/Seeders/ProductTableSeeder.php | 2 +- tests/trigger.suite.yml | 2 +- tests/trigger/Shop/DatabaseLogicCest.php | 45 ++-- tests/trigger/Shop/TriggerCest.php | 208 +++++++++--------- 6 files changed, 138 insertions(+), 175 deletions(-) diff --git a/composer.json b/composer.json index f7cd87193..cad0c2a67 100755 --- a/composer.json +++ b/composer.json @@ -43,7 +43,6 @@ "codeception/module-asserts": "^1.1", "codeception/module-filesystem": "^1.0", "codeception/module-laravel": "^2.0", - "codeception/module-laravel5": "^1.1", "codeception/module-webdriver": "^1.0", "filp/whoops": "^2.0", "mockery/mockery": "^1.3.1", diff --git a/composer.lock b/composer.lock index 20612125b..199bce18a 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": "b8c13c4e3310a5c05c64b4137d4d314b", + "content-hash": "46b4c37f75642ba14f3a2913f0f345cd", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -9080,59 +9080,6 @@ }, "time": "2021-09-10T04:19:09+00:00" }, - { - "name": "codeception/module-laravel5", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/Codeception/module-laravel5.git", - "reference": "1d8a82f78a6e8c26f49af65d9001fa311785d54b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-laravel5/zipball/1d8a82f78a6e8c26f49af65d9001fa311785d54b", - "reference": "1d8a82f78a6e8c26f49af65d9001fa311785d54b", - "shasum": "" - }, - "require": { - "codeception/codeception": "^4.0", - "codeception/lib-innerbrowser": "^1.0", - "php": ">=5.6.0 <9.0" - }, - "require-dev": { - "codeception/module-asserts": "^1.0", - "codeception/module-rest": "^1.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan-Henk Gerritsen" - }, - { - "name": "Michael Bodnarchuk" - } - ], - "description": "Codeception module for Laravel 5 framework", - "homepage": "http://codeception.com/", - "keywords": [ - "codeception", - "laravel5" - ], - "support": { - "issues": "https://github.com/Codeception/module-laravel5/issues", - "source": "https://github.com/Codeception/module-laravel5/tree/1.1.1" - }, - "time": "2020-10-28T07:00:17+00:00" - }, { "name": "codeception/module-webdriver", "version": "1.4.0", diff --git a/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php b/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php index 88f26ae8a..147530b74 100755 --- a/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php +++ b/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php @@ -9,6 +9,6 @@ class ProductTableSeeder extends Seeder { public function run() { - dd('running'); + //dd('running'); } } \ No newline at end of file diff --git a/tests/trigger.suite.yml b/tests/trigger.suite.yml index c87ec0a96..77d44fee3 100644 --- a/tests/trigger.suite.yml +++ b/tests/trigger.suite.yml @@ -8,7 +8,7 @@ modules: - Asserts - Filesystem - \Helper\Unit - - Laravel5: + - Laravel: environment_file: .env.testing run_database_migrations: true run_database_seeder: true diff --git a/tests/trigger/Shop/DatabaseLogicCest.php b/tests/trigger/Shop/DatabaseLogicCest.php index 4b640e127..d2e96dab9 100644 --- a/tests/trigger/Shop/DatabaseLogicCest.php +++ b/tests/trigger/Shop/DatabaseLogicCest.php @@ -15,6 +15,7 @@ class DatabaseLogicCest /** @var Locale $localeEn */ private $localeEn; + /** @var Locale $localeDe */ private $localeDe; @@ -37,9 +38,10 @@ class DatabaseLogicCest public function testGetUrlPathOfCategory(UnitTester $I) { $rootCategoryTranslation = $I->grabRecord(CategoryTranslation::class, [ - 'slug' => 'root', + 'slug' => 'root', 'locale' => 'en', ]); + $rootCategory = $I->grabRecord(Category::class, [ 'id' => $rootCategoryTranslation->category_id, ]); @@ -51,43 +53,45 @@ class DatabaseLogicCest 'position' => 1, 'status' => 1, $this->localeEn->code => [ - 'name' => $parentCategoryName, - 'slug' => strtolower($parentCategoryName), + 'name' => $parentCategoryName, + 'slug' => strtolower($parentCategoryName), 'description' => $parentCategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $parentCategoryName, - 'slug' => strtolower($parentCategoryName), + 'name' => $parentCategoryName, + 'slug' => strtolower($parentCategoryName), 'description' => $parentCategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $parentCategory = $I->make(Category::class, $parentCategoryAttributes)->first(); + $parentCategory = $I->make(Category::class, $parentCategoryAttributes) + ->first(); $rootCategory->prependNode($parentCategory); $I->assertNotNull($parentCategory); - $categoryName = $this->faker->word; + $categoryName = $this->faker->word; $categoryAttributes = [ 'position' => 1, 'status' => 1, 'parent_id' => $parentCategory->id, $this->localeEn->code => [ - 'name' => $categoryName, - 'slug' => strtolower($categoryName), + 'name' => $categoryName, + 'slug' => strtolower($categoryName), 'description' => $categoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $categoryName, - 'slug' => strtolower($categoryName), + 'name' => $categoryName, + 'slug' => strtolower($categoryName), 'description' => $categoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $category = $I->make(Category::class, $categoryAttributes)->first(); + $category = $I->make(Category::class, $categoryAttributes) + ->first(); $parentCategory->prependNode($category); $I->assertNotNull($category); @@ -114,12 +118,13 @@ class DatabaseLogicCest 'status' => 1, 'parent_id' => null, $this->localeEn->code => [ - 'name' => $this->faker->word, - 'slug' => strtolower($this->faker->word), + 'name' => $this->faker->word, + 'slug' => strtolower($this->faker->word), 'description' => $this->faker->word, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], - ])->first(); + ]) + ->first(); $root2Category->save(); $I->assertNull($root2Category->refresh()->parent_id); diff --git a/tests/trigger/Shop/TriggerCest.php b/tests/trigger/Shop/TriggerCest.php index 704a08fb6..503ff9625 100644 --- a/tests/trigger/Shop/TriggerCest.php +++ b/tests/trigger/Shop/TriggerCest.php @@ -13,23 +13,33 @@ class TriggerCest private $faker; private $parentCategory; + private $category; + private $root2Category; + private $childOfRoot2Category; private $parentCategoryAttributes; + private $categoryAttributes; + private $root2CategoryAttributes; + private $childOfRoot2CategoryAttributes; private $parentCategoryName; + private $categoryName; + private $root2CategoryName; + private $childOfRoot2CategoryName; /** @var Locale $localeEn */ private $localeEn; + /** @var Locale $localeDe */ private $localeDe; @@ -38,16 +48,16 @@ class TriggerCest $this->faker = Factory::create(); $rootCategoryTranslation = $I->grabRecord(CategoryTranslation::class, [ - 'slug' => 'root', + 'slug' => 'root', 'locale' => 'en', ]); - $rootCategory = $I->grabRecord(Category::class, [ + $rootCategory = $I->grabRecord(Category::class, [ 'id' => $rootCategoryTranslation->category_id, ]); - $this->parentCategoryName = $this->faker->word; - $this->categoryName = $this->faker->word . $this->faker->randomDigit; - $this->root2CategoryName = $this->faker->word . $this->faker->randomDigit; + $this->parentCategoryName = $this->faker->word; + $this->categoryName = $this->faker->word . $this->faker->randomDigit; + $this->root2CategoryName = $this->faker->word . $this->faker->randomDigit; $this->childOfRoot2CategoryName = $this->faker->word . $this->faker->randomDigit; $this->localeEn = $I->grabRecord(Locale::class, [ @@ -63,20 +73,21 @@ class TriggerCest 'position' => 1, 'status' => 1, $this->localeEn->code => [ - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), 'description' => $this->parentCategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), 'description' => $this->parentCategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $this->parentCategory = $I->make(Category::class, $this->parentCategoryAttributes)->first(); + $this->parentCategory = $I->make(Category::class, $this->parentCategoryAttributes) + ->first(); $rootCategory->appendNode($this->parentCategory); $I->assertNotNull($this->parentCategory); @@ -85,20 +96,21 @@ class TriggerCest 'status' => 1, 'parent_id' => $this->parentCategory->id, $this->localeEn->code => [ - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), 'description' => $this->categoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), 'description' => $this->categoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $this->category = $I->make(Category::class, $this->categoryAttributes)->first(); + $this->category = $I->make(Category::class, $this->categoryAttributes) + ->first(); $this->parentCategory->appendNode($this->category); $I->assertNotNull($this->category); @@ -108,20 +120,21 @@ class TriggerCest 'status' => 1, 'parent_id' => null, $this->localeEn->code => [ - 'name' => $this->root2CategoryName, - 'slug' => strtolower($this->root2CategoryName), + 'name' => $this->root2CategoryName, + 'slug' => strtolower($this->root2CategoryName), 'description' => $this->root2CategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->root2CategoryName, - 'slug' => strtolower($this->root2CategoryName), + 'name' => $this->root2CategoryName, + 'slug' => strtolower($this->root2CategoryName), 'description' => $this->root2CategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $this->root2Category = $I->make(Category::class, $this->root2CategoryAttributes)->first(); + $this->root2Category = $I->make(Category::class, $this->root2CategoryAttributes) + ->first(); $this->root2Category->save(); $I->assertNotNull($this->root2Category); @@ -133,20 +146,21 @@ class TriggerCest 'status' => 1, 'parent_id' => $this->root2Category->id, $this->localeEn->code => [ - 'name' => $this->childOfRoot2CategoryName, - 'slug' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'slug' => strtolower($this->childOfRoot2CategoryName), 'description' => $this->childOfRoot2CategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->childOfRoot2CategoryName, - 'slug' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'slug' => strtolower($this->childOfRoot2CategoryName), 'description' => $this->childOfRoot2CategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; - $this->childOfRoot2Category = $I->make(Category::class, $this->childOfRoot2CategoryAttributes)->first(); + $this->childOfRoot2Category = $I->make(Category::class, $this->childOfRoot2CategoryAttributes) + ->first(); $this->root2Category->appendNode($this->childOfRoot2Category); $I->assertNotNull($this->childOfRoot2Category); @@ -156,47 +170,47 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) + 'name' => $this->parentCategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) + 'name' => $this->parentCategoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName) + 'name' => $this->categoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName) + 'name' => $this->categoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->root2Category->id, - 'name' => $this->root2CategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => '', + 'name' => $this->root2CategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => '', ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->childOfRoot2Category->id, - 'name' => $this->childOfRoot2CategoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->childOfRoot2CategoryName) + 'name' => $this->childOfRoot2CategoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->childOfRoot2CategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->childOfRoot2Category->id, - 'name' => $this->childOfRoot2CategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->childOfRoot2CategoryName) + 'name' => $this->childOfRoot2CategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->childOfRoot2CategoryName), ]); } @@ -204,21 +218,21 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); - $newCategoryName = $this->faker->word; + $newCategoryName = $this->faker->word; $this->categoryAttributes[$this->localeDe->code]['name'] = $newCategoryName; $this->categoryAttributes[$this->localeDe->code]['slug'] = strtolower($newCategoryName); $I->assertTrue($this->category->update($this->categoryAttributes)); @@ -226,18 +240,18 @@ class TriggerCest $I->dontSeeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $newCategoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $newCategoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $newCategoryName, - 'slug' => strtolower($newCategoryName), - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($newCategoryName), + 'name' => $newCategoryName, + 'slug' => strtolower($newCategoryName), + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($newCategoryName), ]); } @@ -245,46 +259,46 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . $this->categoryName, + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . $this->categoryName, ]); } public function testUpdateTriggersOnCategoriesTable(UnitTester $I) { $I->seeRecord(Category::class, [ - 'id' => $this->category->id, + 'id' => $this->category->id, 'parent_id' => $this->parentCategory->id, ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); - $category2Name = $this->faker->word; + $category2Name = $this->faker->word; $category2Attributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => $this->parentCategory->id, + 'position' => 1, + 'status' => 1, + 'parent_id' => $this->parentCategory->id, $this->localeEn->code => [ - 'name' => $category2Name, - 'slug' => strtolower($category2Name), + 'name' => $category2Name, + 'slug' => strtolower($category2Name), 'description' => $category2Name, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], ]; @@ -295,15 +309,13 @@ class TriggerCest $I->assertTrue($this->category->update($this->categoryAttributes)); $this->category->refresh(); - $expectedUrlPath = strtolower($this->parentCategoryName) . '/' - . strtolower($category2Name) . '/' - . strtolower($this->categoryName); + $expectedUrlPath = strtolower($this->parentCategoryName) . '/' . strtolower($category2Name) . '/' . strtolower($this->categoryName); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => $expectedUrlPath, + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => $expectedUrlPath, ]); } } From 8e3c43bd19bd8d0a6cf065621c6112014eb70c68 Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Wed, 6 Oct 2021 15:26:08 +0300 Subject: [PATCH 06/18] - Fixing coding style. - Fixing typo. --- database/factories/UserFactory.php | 6 +- .../API/Http/Resources/Catalog/Attribute.php | 5 +- .../Resources/Catalog/AttributeOption.php | 5 +- .../Attribute/src/Models/AttributeOption.php | 2 +- .../Providers/AttributeServiceProvider.php | 2 - .../BookingProductServiceProvider.php | 2 - .../Database/Factories/CategoryFactory.php | 4 +- .../src/Models/CategoryTranslation.php | 2 - .../Database/Factories/CartAddressFactory.php | 6 +- .../src/Database/Factories/CartFactory.php | 30 +- .../Database/Factories/CartItemFactory.php | 14 +- .../src/Providers/CheckoutServiceProvider.php | 6 +- packages/Webkul/Core/src/Core.php | 2 +- .../Factories/CartRuleCouponFactory.php | 10 +- .../Database/Factories/CartRuleFactory.php | 36 +- .../src/Database/Factories/ChannelFactory.php | 18 +- .../ChannelInventorySourceFactory.php | 2 +- .../src/Database/Factories/LocaleFactory.php | 4 +- .../Factories/SubscriberListFactory.php | 4 +- .../Core/src/Helpers/Laravel5Helper.php | 14 +- packages/Webkul/Core/src/Models/Address.php | 7 +- .../Providers/CoreModuleServiceProvider.php | 2 +- .../src/Providers/CoreServiceProvider.php | 14 +- .../Factories/CustomerAddressFactory.php | 24 +- .../Database/Factories/CustomerFactory.php | 22 +- .../Factories/CustomerGroupFactory.php | 4 +- .../Customer/src/Models/CustomerGroup.php | 3 +- .../src/Providers/CustomerServiceProvider.php | 13 +- .../Factories/InventorySourceFactory.php | 30 +- .../Providers/InventoryServiceProvider.php | 4 +- .../ProductAttributeValueFactory.php | 4 +- .../ProductDownloadableLinkFactory.php | 14 +- ...ductDownloadableLinkTranslationFactory.php | 4 +- .../src/Database/Factories/ProductFactory.php | 2 +- .../Factories/ProductInventoryFactory.php | 4 +- .../Factories/ProductReviewFactory.php | 8 +- .../Database/Seeders/ProductTableSeeder.php | 4 +- .../Product/src/Helpers/GenerateProduct.php | 8 +- .../Webkul/Product/src/Models/Product.php | 2 +- .../src/Models/ProductAttributeValue.php | 20 +- .../src/Providers/ProductServiceProvider.php | 10 +- .../src/Database/Factories/InvoiceFactory.php | 36 +- .../Database/Factories/InvoiceItemFactory.php | 26 +- .../Factories/OrderAddressFactory.php | 24 +- .../src/Database/Factories/OrderFactory.php | 60 +-- .../Database/Factories/OrderItemFactory.php | 28 +- .../Database/Factories/ShipmentFactory.php | 6 +- packages/Webkul/Sales/src/Models/Invoice.php | 4 +- packages/Webkul/Sales/src/Models/Order.php | 42 +- .../Webkul/Sales/src/Models/OrderItem.php | 2 +- .../src/Providers/SalesServiceProvider.php | 6 +- .../Database/Factories/TaxCategoryFactory.php | 4 +- .../src/Database/Factories/TaxMapFactory.php | 2 +- .../src/Database/Factories/TaxRateFactory.php | 14 +- tests/trigger/Shop/DatabaseLogicCest.php | 52 +-- tests/trigger/Shop/TriggerCest.php | 206 ++++----- tests/unit/CartRule/CartRuleCest.php | 429 +++++++++--------- 57 files changed, 641 insertions(+), 677 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 5ac28a244..9279a5d40 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -13,12 +13,12 @@ namespace Database\Factories; | */ -class UserFactory extends \Illuminate\Database\Eloquent\Factories\Factory -{ +use Illuminate\Database\Eloquent\Factories\Factory; +class UserFactory extends Factory +{ public function definition(): array { return []; } - } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Resources/Catalog/Attribute.php b/packages/Webkul/API/Http/Resources/Catalog/Attribute.php index 7fb536782..06ba80f5a 100644 --- a/packages/Webkul/API/Http/Resources/Catalog/Attribute.php +++ b/packages/Webkul/API/Http/Resources/Catalog/Attribute.php @@ -6,15 +6,13 @@ use Illuminate\Http\Resources\Json\JsonResource; class Attribute extends JsonResource { - /** * Transform the resource into an array. * * @param \Illuminate\Http\Request - * * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, @@ -27,5 +25,4 @@ class Attribute extends JsonResource 'updated_at' => $this->updated_at, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php b/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php index 791e955f0..15c7cca43 100644 --- a/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php +++ b/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php @@ -6,15 +6,13 @@ use Illuminate\Http\Resources\Json\JsonResource; class AttributeOption extends JsonResource { - /** * Transform the resource into an array. * * @param \Illuminate\Http\Request - * * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, @@ -23,5 +21,4 @@ class AttributeOption extends JsonResource 'swatch_value' => $this->swatch_value, ]; } - } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Models/AttributeOption.php b/packages/Webkul/Attribute/src/Models/AttributeOption.php index e57d231c2..d99cc8181 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeOption.php +++ b/packages/Webkul/Attribute/src/Models/AttributeOption.php @@ -40,7 +40,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra return url('cache/small/' . $this->swatch_value); } - return; + return null; } /** diff --git a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php index 17a639e61..cc37ac69b 100755 --- a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php +++ b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; class AttributeServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -16,5 +15,4 @@ class AttributeServiceProvider extends ServiceProvider { $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); } - } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php index cf53b167b..56d23a577 100644 --- a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php +++ b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; class BookingProductServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -38,5 +37,4 @@ class BookingProductServiceProvider extends ServiceProvider { $this->mergeConfigFrom(dirname(__DIR__) . '/Config/product_types.php', 'product_types'); } - } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php index 6b8612e99..3c8e36917 100644 --- a/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php +++ b/packages/Webkul/Category/src/Database/Factories/CategoryFactory.php @@ -30,8 +30,8 @@ class CategoryFactory extends Factory public function definition(): array { return [ - 'status' => 1, - 'position' => $this->faker->randomDigit(), + 'status' => 1, + 'position' => $this->faker->randomDigit(), 'parent_id' => 1, ]; } diff --git a/packages/Webkul/Category/src/Models/CategoryTranslation.php b/packages/Webkul/Category/src/Models/CategoryTranslation.php index 621cb3fcb..71ccee2fa 100755 --- a/packages/Webkul/Category/src/Models/CategoryTranslation.php +++ b/packages/Webkul/Category/src/Models/CategoryTranslation.php @@ -14,7 +14,6 @@ use Webkul\Category\Contracts\CategoryTranslation as CategoryTranslationContract */ class CategoryTranslation extends Model implements CategoryTranslationContract { - public $timestamps = false; protected $fillable = [ @@ -26,5 +25,4 @@ class CategoryTranslation extends Model implements CategoryTranslationContract 'meta_keywords', 'locale_id', ]; - } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php index cb179e9b0..aa2e68423 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartAddressFactory.php @@ -22,9 +22,9 @@ class CartAddressFactory extends Factory public function definition(): array { return [ - 'first_name' => $this->faker->firstName(), - 'last_name' => $this->faker->lastName, - 'email' => $this->faker->email, + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName, + 'email' => $this->faker->email, 'address_type' => CartAddress::ADDRESS_TYPE_BILLING, ]; } diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php index 65e5f46b9..3de690a15 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartFactory.php @@ -35,22 +35,22 @@ class CartFactory extends Factory ->create(); return [ - 'is_guest' => 0, - 'is_active' => 1, - 'customer_id' => $customer->id, - 'customer_email' => $customer->email, - 'customer_first_name' => $customer->first_name, - 'customer_last_name' => $customer->last_name, - 'is_gift' => 0, - 'base_currency_code' => 'EUR', + 'is_guest' => 0, + 'is_active' => 1, + 'customer_id' => $customer->id, + 'customer_email' => $customer->email, + 'customer_first_name' => $customer->first_name, + 'customer_last_name' => $customer->last_name, + 'is_gift' => 0, + 'base_currency_code' => 'EUR', 'channel_currency_code' => 'EUR', - 'grand_total' => 0.0000, - 'base_grand_total' => 0.0000, - 'sub_total' => 0.0000, - 'base_sub_total' => 0.0000, - 'channel_id' => 1, - 'created_at' => $now, - 'updated_at' => $now, + 'grand_total' => 0.0000, + 'base_grand_total' => 0.0000, + 'sub_total' => 0.0000, + 'base_sub_total' => 0.0000, + 'channel_id' => 1, + 'created_at' => $now, + 'updated_at' => $now, ]; } } diff --git a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php index 0ead5b1c4..dbb884c49 100644 --- a/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php +++ b/packages/Webkul/Checkout/src/Database/Factories/CartItemFactory.php @@ -38,16 +38,16 @@ class CartItemFactory extends Factory $fallbackPrice = $this->faker->randomFloat(4, 0, 1000); return [ - 'quantity' => 1, - 'sku' => $product->sku, - 'type' => $product->type, - 'name' => $product->name, - 'price' => $product->price ?? $fallbackPrice, + 'quantity' => 1, + 'sku' => $product->sku, + 'type' => $product->type, + 'name' => $product->name, + 'price' => $product->price ?? $fallbackPrice, 'base_price' => $product->price ?? $fallbackPrice, - 'total' => $product->price ?? $fallbackPrice, + 'total' => $product->price ?? $fallbackPrice, 'base_total' => $product->price ?? $fallbackPrice, 'product_id' => $product->id, - 'cart_id' => Cart::factory(), + 'cart_id' => Cart::factory(), 'created_at' => $now, 'updated_at' => $now, ]; diff --git a/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php b/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php index dd4326c0b..011765ec6 100755 --- a/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php +++ b/packages/Webkul/Checkout/src/Providers/CheckoutServiceProvider.php @@ -8,12 +8,11 @@ use Webkul\Checkout\Facades\Cart; class CheckoutServiceProvider extends ServiceProvider { - public function boot(): void { - include __DIR__.'/../Http/helpers.php'; + include __DIR__ . '/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); $this->app->register(ModuleServiceProvider::class); @@ -49,5 +48,4 @@ class CheckoutServiceProvider extends ServiceProvider $this->app->bind('cart', 'Webkul\Checkout\Cart'); } - } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 49d616478..41f8b0062 100755 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -145,7 +145,7 @@ class Core } /** - * Returns currenct channel models. + * Returns current channel models. * * @return \Webkul\Core\Contracts\Channel */ diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php index cbe42b6a1..003106a00 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleCouponFactory.php @@ -24,12 +24,12 @@ class CartRuleCouponFactory extends Factory public function definition(): array { return [ - 'code' => Str::uuid(), - 'usage_limit' => 100, + 'code' => Str::uuid(), + 'usage_limit' => 100, 'usage_per_customer' => 100, - 'type' => 0, - 'is_primary' => 1, - 'cart_rule_id' => CartRule::factory(), + 'type' => 0, + 'is_primary' => 1, + 'cart_rule_id' => CartRule::factory(), ]; } } diff --git a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php index 403654acf..371d5a666 100644 --- a/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/CartRuleFactory.php @@ -23,25 +23,25 @@ class CartRuleFactory extends Factory public function definition(): array { return [ - 'name' => Str::uuid(), - 'description' => $this->faker->sentence(), - 'starts_from' => null, - 'ends_till' => null, - 'coupon_type' => '1', - 'use_auto_generation' => '0', - 'usage_per_customer' => '100', - 'uses_per_coupon' => '100', - 'times_used' => '0', - 'condition_type' => '2', - 'end_other_rules' => '0', + 'name' => Str::uuid(), + 'description' => $this->faker->sentence(), + 'starts_from' => null, + 'ends_till' => null, + 'coupon_type' => '1', + 'use_auto_generation' => '0', + 'usage_per_customer' => '100', + 'uses_per_coupon' => '100', + 'times_used' => '0', + 'condition_type' => '2', + 'end_other_rules' => '0', 'uses_attribute_conditions' => '0', - 'discount_quantity' => '0', - 'discount_step' => '0', - 'apply_to_shipping' => '0', - 'free_shipping' => '0', - 'sort_order' => '0', - 'status' => '1', - 'conditions' => null, + 'discount_quantity' => '0', + 'discount_step' => '0', + 'apply_to_shipping' => '0', + 'free_shipping' => '0', + 'sort_order' => '0', + 'status' => '1', + 'conditions' => null, ]; } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php index ab6ab1574..8df7f7b72 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelFactory.php @@ -26,23 +26,23 @@ class ChannelFactory extends Factory */ public function definition(): array { - $seoTitle = $this->faker->word; + $seoTitle = $this->faker->word; $seoDescription = $this->faker->words(10, true); - $seoKeywords = $this->faker->words(3, true); + $seoKeywords = $this->faker->words(3, true); $seoData = [ - 'meta_title' => $seoTitle, + 'meta_title' => $seoTitle, 'meta_description' => $seoDescription, - 'meta_keywords' => $seoKeywords, + 'meta_keywords' => $seoKeywords, ]; return [ - 'code' => $this->faker->unique()->word, - 'name' => $this->faker->word, + 'code' => $this->faker->unique()->word, + 'name' => $this->faker->word, 'default_locale_id' => Locale::factory(), - 'base_currency_id' => Currency::factory(), - 'root_category_id' => Category::factory(), - 'home_seo' => json_encode($seoData, JSON_THROW_ON_ERROR), + 'base_currency_id' => Currency::factory(), + 'root_category_id' => Category::factory(), + 'home_seo' => json_encode($seoData, JSON_THROW_ON_ERROR), ]; } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php index 0ddce3c49..c8e8e0f57 100644 --- a/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/ChannelInventorySourceFactory.php @@ -21,7 +21,7 @@ class ChannelInventorySourceFactory extends Factory public function definition(): array { return [ - 'channel_id' => core()->getCurrentChannel()->id, + 'channel_id' => core()->getCurrentChannel()->id, 'inventory_source_id' => 1, ]; } diff --git a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php index 251632861..c612d6054 100644 --- a/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/LocaleFactory.php @@ -35,8 +35,8 @@ class LocaleFactory extends Factory ->exists()); return [ - 'code' => $languageCode, - 'name' => $this->faker->country, + 'code' => $languageCode, + 'name' => $this->faker->country, 'direction' => 'ltr', ]; } diff --git a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php index 8d13426a1..5aab67eb7 100644 --- a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php +++ b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php @@ -22,9 +22,9 @@ class SubscriberListFactory extends Factory public function definition(): array { return [ - 'email' => $this->faker->safeEmail, + 'email' => $this->faker->safeEmail, 'is_subscribed' => $this->faker->boolean, - 'channel_id' => 1, + 'channel_id' => 1, ]; } } diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index 7770da7f5..d8d57d5c5 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -32,7 +32,6 @@ use Webkul\Product\Models\ProductDownloadableLinkTranslation; */ class Laravel5Helper extends Laravel { - public const SIMPLE_PRODUCT = 1; public const VIRTUAL_PRODUCT = 2; @@ -89,10 +88,10 @@ class Laravel5Helper extends Laravel if (isset($options['payment_method']) && $options['payment_method'] === 'free_of_charge') { - $grand_total = '0.0000'; + $grand_total = '0.0000'; $base_grand_total = '0.0000'; } else { - $grand_total = (string) $faker->numberBetween(1, 666); + $grand_total = (string)$faker->numberBetween(1, 666); $base_grand_total = $grand_total; } @@ -133,7 +132,7 @@ class Laravel5Helper extends Laravel // actually set the cart to the user's session // when in an functional test: - $stub = new StdClass(); + $stub = new StdClass(); $stub->id = $cart->id; $I->setSession(['cart' => $stub]); @@ -295,7 +294,7 @@ class Laravel5Helper extends Laravel private function createDownloadableLink(int $productId): void { - $I = $this; + $I = $this; $link = $I->have(ProductDownloadableLink::class, [ 'product_id' => $productId, ]); @@ -307,7 +306,7 @@ class Laravel5Helper extends Laravel private function createBookingEventProduct(int $productId): void { - $I = $this; + $I = $this; $bookingProduct = $I->have(BookingProduct::class, [ 'product_id' => $productId, ]); @@ -392,7 +391,7 @@ class Laravel5Helper extends Laravel */ private function appendAttributeDependencies(string $attributeCode, array $data): array { - $locale = core()->getCurrentLocale()->code; + $locale = core()->getCurrentLocale()->code; $channel = core()->getCurrentChannelCode(); $attributeSetDependencies = [ @@ -451,5 +450,4 @@ class Laravel5Helper extends Laravel return $data; } - } diff --git a/packages/Webkul/Core/src/Models/Address.php b/packages/Webkul/Core/src/Models/Address.php index d47a5ce85..d0bb8e5e3 100644 --- a/packages/Webkul/Core/src/Models/Address.php +++ b/packages/Webkul/Core/src/Models/Address.php @@ -1,9 +1,7 @@ first_name.' '.$this->last_name; + return $this->first_name . ' ' . $this->last_name; } /** @@ -92,5 +88,4 @@ abstract class Address extends Model implements AddressContract { return $this->belongsTo(Customer::class); } - } diff --git a/packages/Webkul/Core/src/Providers/CoreModuleServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreModuleServiceProvider.php index fa30ba040..a366f4b29 100644 --- a/packages/Webkul/Core/src/Providers/CoreModuleServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreModuleServiceProvider.php @@ -6,7 +6,7 @@ use Konekt\Concord\BaseModuleServiceProvider; class CoreModuleServiceProvider extends BaseModuleServiceProvider { - public function boot() + public function boot(): void { if ($this->areMigrationsEnabled()) { $this->registerMigrations(); diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index 53307552f..f6c961d3a 100755 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -17,7 +17,6 @@ use Webkul\Theme\ViewRenderEventManager; class CoreServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -25,11 +24,11 @@ class CoreServiceProvider extends ServiceProvider */ public function boot(): void { - include __DIR__.'/../Http/helpers.php'; + include __DIR__ . '/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'core'); + $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core'); Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes'); @@ -38,15 +37,15 @@ class CoreServiceProvider extends ServiceProvider Validator::extend('decimal', 'Webkul\Core\Contracts\Validations\Decimal@passes'); $this->publishes([ - dirname(__DIR__).'/Config/concord.php' => config_path('concord.php'), - dirname(__DIR__).'/Config/scout.php' => config_path('scout.php'), + dirname(__DIR__) . '/Config/concord.php' => config_path('concord.php'), + dirname(__DIR__) . '/Config/scout.php' => config_path('scout.php'), ]); $this->app->bind(ExceptionHandler::class, Handler::class); SliderProxy::observe(SliderObserver::class); - $this->loadViewsFrom(__DIR__.'/../Resources/views', 'core'); + $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'core'); Event::listen('bagisto.shop.layout.body.after', static function (ViewRenderEventManager $viewRenderEventManager) { $viewRenderEventManager->addTemplate('core::blade.tracer.style'); @@ -127,5 +126,4 @@ class CoreServiceProvider extends ServiceProvider return new BladeCompiler($app['files'], $app['config']['view.compiled']); }); } - } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index 5b2e0e487..4c0f3875c 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -27,22 +27,22 @@ class CustomerAddressFactory extends Factory $fakerIt = \Faker\Factory::create('it_IT'); return [ - 'customer_id' => Customer::factory(), - 'company_name' => $this->faker->company, - 'vat_id' => $fakerIt->vatId(), - 'first_name' => $this->faker->firstName, - 'last_name' => $this->faker->lastName, - 'address1' => $this->faker->streetAddress, - 'country' => $this->faker->countryCode, - 'state' => $this->faker->state, - 'city' => $this->faker->city, - 'postcode' => $this->faker->postcode, - 'phone' => $this->faker->e164PhoneNumber, + 'customer_id' => Customer::factory(), + 'company_name' => $this->faker->company, + 'vat_id' => $fakerIt->vatId(), + 'first_name' => $this->faker->firstName, + 'last_name' => $this->faker->lastName, + 'address1' => $this->faker->streetAddress, + 'country' => $this->faker->countryCode, + 'state' => $this->faker->state, + 'city' => $this->faker->city, + 'postcode' => $this->faker->postcode, + 'phone' => $this->faker->e164PhoneNumber, 'default_address' => Arr::random([ 0, 1, ]), - 'address_type' => CustomerAddress::ADDRESS_TYPE, + 'address_type' => CustomerAddress::ADDRESS_TYPE, ]; } } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php index cccfc9002..626889829 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php @@ -32,25 +32,25 @@ class CustomerFactory extends Factory */ public function definition(): array { - $now = date("Y-m-d H:i:s"); + $now = date("Y-m-d H:i:s"); $password = $this->faker->password; return [ - 'first_name' => $this->faker->firstName(), - 'last_name' => $this->faker->lastName, - 'gender' => Arr::random([ + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName, + 'gender' => Arr::random([ 'male', 'female', 'other', ]), - 'email' => $this->faker->email, - 'status' => 1, - 'password' => Hash::make($password), + 'email' => $this->faker->email, + 'status' => 1, + 'password' => Hash::make($password), 'customer_group_id' => 2, - 'is_verified' => 1, - 'created_at' => $now, - 'updated_at' => $now, - 'notes' => json_encode(['plain_password' => $password], JSON_THROW_ON_ERROR), + 'is_verified' => 1, + 'created_at' => $now, + 'updated_at' => $now, + 'notes' => json_encode(['plain_password' => $password], JSON_THROW_ON_ERROR), ]; } diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php index 5fc1bf625..f0c0eb1b9 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php @@ -25,9 +25,9 @@ class CustomerGroupFactory extends Factory $name = ucfirst($this->faker->word); return [ - 'name' => $name, + 'name' => $name, 'is_user_defined' => $this->faker->boolean, - 'code' => lcfirst($name), + 'code' => lcfirst($name), ]; } } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Models/CustomerGroup.php b/packages/Webkul/Customer/src/Models/CustomerGroup.php index 87a0ef940..421e72dcd 100755 --- a/packages/Webkul/Customer/src/Models/CustomerGroup.php +++ b/packages/Webkul/Customer/src/Models/CustomerGroup.php @@ -3,6 +3,7 @@ namespace Webkul\Customer\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Factories\HasFactory; use Webkul\Customer\Database\Factories\CustomerGroupFactory; use Webkul\Customer\Contracts\CustomerGroup as CustomerGroupContract; @@ -22,7 +23,7 @@ class CustomerGroup extends Model implements CustomerGroupContract /** * Get the customers for this group. */ - public function customers(): \Illuminate\Database\Eloquent\Relations\HasMany + public function customers(): HasMany { return $this->hasMany(CustomerProxy::modelClass()); } diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index b95331374..28c31b549 100755 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -10,21 +10,21 @@ use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer; class CustomerServiceProvider extends ServiceProvider { - /** * Bootstrap application services. * + * @param \Illuminate\Routing\Router $router * @return void */ - public function boot(Router $router) + public function boot(Router $router): void { $router->aliasMiddleware('customer', RedirectIfNotCustomer::class); - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - $this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'customer'); + $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customer'); - $this->loadViewsFrom(__DIR__.'/../Resources/views', 'customer'); + $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer'); $this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) { return $this->app['captcha']->validateResponse($value); @@ -52,7 +52,6 @@ class CustomerServiceProvider extends ServiceProvider */ protected function registerConfig(): void { - $this->mergeConfigFrom(dirname(__DIR__).'/Config/system.php', 'core'); + $this->mergeConfigFrom(dirname(__DIR__) . '/Config/system.php', 'core'); } - } diff --git a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php index 74d5ee111..0143ab020 100644 --- a/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php +++ b/packages/Webkul/Inventory/src/Database/Factories/InventorySourceFactory.php @@ -21,24 +21,24 @@ class InventorySourceFactory extends Factory */ public function definition(): array { - $now = date("Y-m-d H:i:s"); + $now = date("Y-m-d H:i:s"); $code = $this->faker->unique()->word; return [ - 'code' => $this->faker->unique()->word, - 'name' => $code, - 'description' => $this->faker->sentence, - 'contact_name' => $this->faker->name, - 'contact_email' => $this->faker->safeEmail, + 'code' => $this->faker->unique()->word, + 'name' => $code, + 'description' => $this->faker->sentence, + 'contact_name' => $this->faker->name, + 'contact_email' => $this->faker->safeEmail, 'contact_number' => $this->faker->phoneNumber, - 'country' => $this->faker->countryCode, - 'state' => $this->faker->state, - 'city' => $this->faker->city, - 'street' => $this->faker->streetAddress, - 'postcode' => $this->faker->postcode, - 'priority' => 0, - 'status' => 1, - 'created_at' => $now, - 'updated_at' => $now, + 'country' => $this->faker->countryCode, + 'state' => $this->faker->state, + 'city' => $this->faker->city, + 'street' => $this->faker->streetAddress, + 'postcode' => $this->faker->postcode, + 'priority' => 0, + 'status' => 1, + 'created_at' => $now, + 'updated_at' => $now, ]; } } diff --git a/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php b/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php index 2e10fed18..035fc1476 100755 --- a/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php +++ b/packages/Webkul/Inventory/src/Providers/InventoryServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; class InventoryServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -14,7 +13,7 @@ class InventoryServiceProvider extends ServiceProvider */ public function boot(): void { - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); } /** @@ -25,5 +24,4 @@ class InventoryServiceProvider extends ServiceProvider public function register(): void { } - } \ 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 3b0737799..67e4d0f0b 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductAttributeValueFactory.php @@ -24,8 +24,8 @@ class ProductAttributeValueFactory extends Factory { return [ //'product_id' => Product::factory(), - 'locale' => 'en', - 'channel' => 'default', + 'locale' => 'en', + 'channel' => 'default', ]; } } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php index 9d29062b1..d088ef3fd 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkFactory.php @@ -22,17 +22,17 @@ class ProductDownloadableLinkFactory extends Factory */ public function definition(): array { - $now = date("Y-m-d H:i:s"); + $now = date("Y-m-d H:i:s"); $filename = 'ProductImageExampleForUpload.jpg'; $filepath = '/tests/_data/'; return [ - 'url' => '', - 'file' => $filepath . $filename, - 'file_name' => $filename, - 'type' => 'file', - 'price' => 0.0000, - 'downloads' => $this->faker->randomNumber(1), + 'url' => '', + 'file' => $filepath . $filename, + 'file_name' => $filename, + 'type' => 'file', + 'price' => 0.0000, + 'downloads' => $this->faker->randomNumber(1), 'product_id' => Product::factory(), 'created_at' => $now, 'updated_at' => $now, diff --git a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php index c42c64a29..7a01705b4 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductDownloadableLinkTranslationFactory.php @@ -23,8 +23,8 @@ class ProductDownloadableLinkTranslationFactory extends Factory public function definition(): array { return [ - 'locale' => 'en', - 'title' => $this->faker->word, + 'locale' => 'en', + 'title' => $this->faker->word, 'product_downloadable_link_id' => ProductDownloadableLink::factory(), ]; } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php index fde6b3bcb..207434b30 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductFactory.php @@ -32,7 +32,7 @@ class ProductFactory extends Factory public function definition(): array { return [ - 'sku' => $this->faker->uuid, + 'sku' => $this->faker->uuid, 'attribute_family_id' => 1, ]; } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php index b39a2c7c2..d2fce80d9 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductInventoryFactory.php @@ -24,8 +24,8 @@ class ProductInventoryFactory extends Factory public function definition(): array { return [ - 'qty' => $this->faker->numberBetween(100, 200), - 'product_id' => Product::factory(), + 'qty' => $this->faker->numberBetween(100, 200), + 'product_id' => Product::factory(), 'inventory_source_id' => InventorySource::factory(), ]; } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php index c19bf3844..b23f76856 100644 --- a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php +++ b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php @@ -23,10 +23,10 @@ class ProductReviewFactory extends Factory public function definition(): array { return [ - 'title' => $this->faker->words(5, true), - 'rating' => $this->faker->numberBetween(0, 10), - 'status' => 1, - 'comment' => $this->faker->sentence(20), + 'title' => $this->faker->words(5, true), + 'rating' => $this->faker->numberBetween(0, 10), + 'status' => 1, + 'comment' => $this->faker->sentence(20), 'product_id' => Product::factory(), ]; } diff --git a/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php b/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php index 147530b74..198852bf8 100755 --- a/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php +++ b/packages/Webkul/Product/src/Database/Seeders/ProductTableSeeder.php @@ -1,13 +1,13 @@ checkRequestedLocaleCodeInRequestedChannel(); + $locale = core()->checkRequestedLocaleCodeInRequestedChannel(); $channel = core()->getRequestedChannelCode(); if (array_key_exists($this->id, self::$loadedAttributeValues) diff --git a/packages/Webkul/Product/src/Models/ProductAttributeValue.php b/packages/Webkul/Product/src/Models/ProductAttributeValue.php index 417c503dd..f9ba4b709 100755 --- a/packages/Webkul/Product/src/Models/ProductAttributeValue.php +++ b/packages/Webkul/Product/src/Models/ProductAttributeValue.php @@ -26,17 +26,17 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra * @var array */ public static $attributeTypeFields = [ - 'text' => 'text_value', - 'textarea' => 'text_value', - 'price' => 'float_value', - 'boolean' => 'boolean_value', - 'select' => 'integer_value', + 'text' => 'text_value', + 'textarea' => 'text_value', + 'price' => 'float_value', + 'boolean' => 'boolean_value', + 'select' => 'integer_value', 'multiselect' => 'text_value', - 'datetime' => 'datetime_value', - 'date' => 'date_value', - 'file' => 'text_value', - 'image' => 'text_value', - 'checkbox' => 'text_value', + 'datetime' => 'datetime_value', + 'date' => 'date_value', + 'file' => 'text_value', + 'image' => 'text_value', + 'checkbox' => 'text_value', ]; /** diff --git a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php index 745a683eb..dea148022 100755 --- a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php +++ b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php @@ -15,7 +15,6 @@ use Webkul\Product\ProductVideo; class ProductServiceProvider extends ServiceProvider { - /** * Bootstrap services. * @@ -23,14 +22,14 @@ class ProductServiceProvider extends ServiceProvider */ public function boot(): void { - include __DIR__.'/../Http/helpers.php'; + include __DIR__ . '/../Http/helpers.php'; - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); $this->app->register(EventServiceProvider::class); $this->publishes([ - dirname(__DIR__).'/Config/imagecache.php' => config_path('imagecache.php'), + dirname(__DIR__) . '/Config/imagecache.php' => config_path('imagecache.php'), ]); ProductProxy::observe(ProductObserver::class); @@ -57,7 +56,7 @@ class ProductServiceProvider extends ServiceProvider */ public function registerConfig(): void { - $this->mergeConfigFrom(dirname(__DIR__).'/Config/product_types.php', 'product_types'); + $this->mergeConfigFrom(dirname(__DIR__) . '/Config/product_types.php', 'product_types'); } /** @@ -97,5 +96,4 @@ class ProductServiceProvider extends ServiceProvider return app()->make(ProductVideo::class); }); } - } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php index d37f6ef59..1c6634336 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php @@ -32,9 +32,9 @@ class InvoiceFactory extends Factory */ public function definition(): array { - $subTotal = $this->faker->randomFloat(2); + $subTotal = $this->faker->randomFloat(2); $shippingAmount = $this->faker->randomFloat(2); - $taxAmount = $this->faker->randomFloat(2); + $taxAmount = $this->faker->randomFloat(2); if (!isset($attributes['order_id'])) { $attributes['order_id'] = Order::factory(); @@ -45,23 +45,23 @@ class InvoiceFactory extends Factory } return [ - 'email_sent' => 0, - 'total_qty' => $this->faker->randomNumber(), - 'base_currency_code' => 'EUR', + 'email_sent' => 0, + 'total_qty' => $this->faker->randomNumber(), + 'base_currency_code' => 'EUR', 'channel_currency_code' => 'EUR', - 'order_currency_code' => 'EUR', - 'sub_total' => $subTotal, - 'base_sub_total' => $subTotal, - 'grand_total' => $subTotal, - 'base_grand_total' => $subTotal, - 'shipping_amount' => $shippingAmount, - 'base_shipping_amount' => $shippingAmount, - 'tax_amount' => $taxAmount, - 'base_tax_amount' => $taxAmount, - 'discount_amount' => 0, - 'base_discount_amount' => 0, - 'order_id' => $attributes['order_id'], - 'order_address_id' => $attributes['order_address_id'], + 'order_currency_code' => 'EUR', + 'sub_total' => $subTotal, + 'base_sub_total' => $subTotal, + 'grand_total' => $subTotal, + 'base_grand_total' => $subTotal, + 'shipping_amount' => $shippingAmount, + 'base_shipping_amount' => $shippingAmount, + 'tax_amount' => $taxAmount, + 'base_tax_amount' => $taxAmount, + 'discount_amount' => 0, + 'base_discount_amount' => 0, + 'order_id' => $attributes['order_id'], + 'order_address_id' => $attributes['order_address_id'], ]; } diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php index 608e9d533..36267a4e5 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceItemFactory.php @@ -24,7 +24,7 @@ class InvoiceItemFactory extends Factory public function definition(): array { $basePrice = $this->faker->randomFloat(2); - $quantity = $this->faker->randomNumber(); + $quantity = $this->faker->randomNumber(); if (!isset($attributes['order_item_id'])) { $attributes['order_item_id'] = OrderItem::factory(); @@ -34,19 +34,19 @@ class InvoiceItemFactory extends Factory ->find($attributes['order_item_id']); return [ - 'name' => $this->faker->word, - 'sku' => $this->faker->unique()->ean13, - 'qty' => $quantity, - 'price' => $basePrice, - 'base_price' => $basePrice, - 'total' => $quantity * $basePrice, - 'base_total' => $quantity * $basePrice, - 'tax_amount' => 0, + 'name' => $this->faker->word, + 'sku' => $this->faker->unique()->ean13, + 'qty' => $quantity, + 'price' => $basePrice, + 'base_price' => $basePrice, + 'total' => $quantity * $basePrice, + 'base_total' => $quantity * $basePrice, + 'tax_amount' => 0, 'base_tax_amount' => 0, - 'product_id' => $orderItem->product_id, - 'product_type' => $orderItem->product_type, - 'order_item_id' => $attributes['order_item_id'], - 'invoice_id' => Invoice::factory(), + 'product_id' => $orderItem->product_id, + 'product_type' => $orderItem->product_type, + 'order_item_id' => $attributes['order_item_id'], + 'invoice_id' => Invoice::factory(), ]; } } diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php index 905343cec..87c3b3375 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php @@ -31,23 +31,23 @@ class OrderAddressFactory extends Factory */ public function definition(): array { - $customer = Customer::factory() - ->create(); + $customer = Customer::factory() + ->create(); $customerAddress = CustomerAddress::factory() ->make(); return [ - 'first_name' => $customer->first_name, - 'last_name' => $customer->last_name, - 'email' => $customer->email, - 'address1' => $customerAddress->address1, - 'country' => $customerAddress->country, - 'state' => $customerAddress->state, - 'city' => $customerAddress->city, - 'postcode' => $customerAddress->postcode, - 'phone' => $customerAddress->phone, + 'first_name' => $customer->first_name, + 'last_name' => $customer->last_name, + 'email' => $customer->email, + 'address1' => $customerAddress->address1, + 'country' => $customerAddress->country, + 'state' => $customerAddress->state, + 'city' => $customerAddress->city, + 'postcode' => $customerAddress->postcode, + 'phone' => $customerAddress->phone, 'address_type' => OrderAddress::ADDRESS_TYPE_BILLING, - 'order_id' => Order::factory(), + 'order_id' => Order::factory(), ]; } diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php index 26dbf6ef2..93b57407b 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php @@ -43,38 +43,38 @@ class OrderFactory extends Factory ->create(); return [ - 'increment_id' => $lastOrder + 1, - 'status' => 'pending', - 'channel_name' => 'Default', - 'is_guest' => 0, - 'customer_id' => $customer->id, - 'customer_email' => $customer->email, - 'customer_first_name' => $customer->first_name, - 'customer_last_name' => $customer->last_name, - 'is_gift' => 0, - 'total_item_count' => 1, - 'total_qty_ordered' => 1, - 'base_currency_code' => 'EUR', - 'channel_currency_code' => 'EUR', - 'order_currency_code' => 'EUR', - 'grand_total' => 0.0000, - 'base_grand_total' => 0.0000, - 'grand_total_invoiced' => 0.0000, + 'increment_id' => $lastOrder + 1, + 'status' => 'pending', + 'channel_name' => 'Default', + 'is_guest' => 0, + 'customer_id' => $customer->id, + 'customer_email' => $customer->email, + 'customer_first_name' => $customer->first_name, + 'customer_last_name' => $customer->last_name, + 'is_gift' => 0, + 'total_item_count' => 1, + 'total_qty_ordered' => 1, + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'order_currency_code' => 'EUR', + 'grand_total' => 0.0000, + 'base_grand_total' => 0.0000, + 'grand_total_invoiced' => 0.0000, 'base_grand_total_invoiced' => 0.0000, - 'grand_total_refunded' => 0.0000, + 'grand_total_refunded' => 0.0000, 'base_grand_total_refunded' => 0.0000, - 'sub_total' => 0.0000, - 'base_sub_total' => 0.0000, - 'sub_total_invoiced' => 0.0000, - 'base_sub_total_invoiced' => 0.0000, - 'sub_total_refunded' => 0.0000, - 'base_sub_total_refunded' => 0.0000, - 'customer_type' => Customer::class, - 'channel_id' => 1, - 'channel_type' => Channel::class, - 'cart_id' => 0, - 'shipping_method' => 'free_free', - 'shipping_title' => 'Free Shipping', + 'sub_total' => 0.0000, + 'base_sub_total' => 0.0000, + 'sub_total_invoiced' => 0.0000, + 'base_sub_total_invoiced' => 0.0000, + 'sub_total_refunded' => 0.0000, + 'base_sub_total_refunded' => 0.0000, + 'customer_type' => Customer::class, + 'channel_id' => 1, + 'channel_type' => Channel::class, + 'cart_id' => 0, + 'shipping_method' => 'free_free', + 'shipping_title' => 'Free Shipping', ]; } diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php index 129106ac9..1920eb584 100644 --- a/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/OrderItemFactory.php @@ -38,23 +38,23 @@ class OrderItemFactory extends Factory $fallbackPrice = $this->faker->randomFloat(4, 0, 1000); return [ - 'sku' => $product->sku, - 'type' => $product->type, - 'name' => $product->name, - 'price' => $product->price ?? $fallbackPrice, - 'base_price' => $product->price ?? $fallbackPrice, - 'total' => $product->price ?? $fallbackPrice, - 'base_total' => $product->price ?? $fallbackPrice, - 'product_id' => $product->id, - 'qty_ordered' => 1, - 'qty_shipped' => 0, + 'sku' => $product->sku, + 'type' => $product->type, + 'name' => $product->name, + 'price' => $product->price ?? $fallbackPrice, + 'base_price' => $product->price ?? $fallbackPrice, + 'total' => $product->price ?? $fallbackPrice, + 'base_total' => $product->price ?? $fallbackPrice, + 'product_id' => $product->id, + 'qty_ordered' => 1, + 'qty_shipped' => 0, 'qty_invoiced' => 0, 'qty_canceled' => 0, 'qty_refunded' => 0, - 'additional' => [], - 'order_id' => Order::factory(), - 'created_at' => $now, - 'updated_at' => $now, + 'additional' => [], + 'order_id' => Order::factory(), + 'created_at' => $now, + 'updated_at' => $now, 'product_type' => Product::class, ]; } diff --git a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php index d59b66c40..81b00d53c 100644 --- a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php @@ -27,9 +27,9 @@ class ShipmentFactory extends Factory ->create(); return [ - 'total_qty' => $this->faker->numberBetween(1, 20), - 'order_id' => $address->order_id, - 'order_address_id' => $address->id, + 'total_qty' => $this->faker->numberBetween(1, 20), + 'order_id' => $address->order_id, + 'order_address_id' => $address->id, 'inventory_source_id' => InventorySource::factory(), ]; } diff --git a/packages/Webkul/Sales/src/Models/Invoice.php b/packages/Webkul/Sales/src/Models/Invoice.php index 98c6226ab..0303aafb0 100755 --- a/packages/Webkul/Sales/src/Models/Invoice.php +++ b/packages/Webkul/Sales/src/Models/Invoice.php @@ -32,8 +32,8 @@ class Invoice extends Model implements InvoiceContract * @var array */ protected $statusLabel = [ - 'pending' => 'Pending', - 'paid' => 'Paid', + 'pending' => 'Pending', + 'paid' => 'Paid', 'refunded' => 'Refunded', ]; diff --git a/packages/Webkul/Sales/src/Models/Order.php b/packages/Webkul/Sales/src/Models/Order.php index 13b58b7b3..2b21ba4f4 100755 --- a/packages/Webkul/Sales/src/Models/Order.php +++ b/packages/Webkul/Sales/src/Models/Order.php @@ -6,6 +6,10 @@ use Webkul\Checkout\Models\CartProxy; use Illuminate\Database\Eloquent\Model; use Webkul\Sales\Contracts\Order as OrderContract; use Webkul\Sales\Database\Factories\OrderFactory; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; class Order extends Model implements OrderContract @@ -39,13 +43,13 @@ class Order extends Model implements OrderContract ]; protected $statusLabel = [ - self::STATUS_PENDING => 'Pending', + self::STATUS_PENDING => 'Pending', self::STATUS_PENDING_PAYMENT => 'Pending Payment', - self::STATUS_PROCESSING => 'Processing', - self::STATUS_COMPLETED => 'Completed', - self::STATUS_CANCELED => 'Canceled', - self::STATUS_CLOSED => 'Closed', - self::STATUS_FRAUD => 'Fraud', + self::STATUS_PROCESSING => 'Processing', + self::STATUS_COMPLETED => 'Completed', + self::STATUS_CANCELED => 'Canceled', + self::STATUS_CLOSED => 'Closed', + self::STATUS_FRAUD => 'Fraud', ]; /** @@ -83,7 +87,7 @@ class Order extends Model implements OrderContract /** * Get the associated cart that was used to create this order. */ - public function cart(): \Illuminate\Database\Eloquent\Relations\BelongsTo + public function cart(): BelongsTo { return $this->belongsTo(CartProxy::modelClass()); } @@ -91,7 +95,7 @@ class Order extends Model implements OrderContract /** * Get the order items record associated with the order. */ - public function items(): \Illuminate\Database\Eloquent\Relations\HasMany + public function items(): HasMany { return $this->hasMany(OrderItemProxy::modelClass()) ->whereNull('parent_id'); @@ -100,7 +104,7 @@ class Order extends Model implements OrderContract /** * Get the comments record associated with the order. */ - public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany + public function comments(): HasMany { return $this->hasMany(OrderCommentProxy::modelClass()); } @@ -108,7 +112,7 @@ class Order extends Model implements OrderContract /** * Get the order items record associated with the order. */ - public function all_items(): \Illuminate\Database\Eloquent\Relations\HasMany + public function all_items(): HasMany { return $this->hasMany(OrderItemProxy::modelClass()); } @@ -116,7 +120,7 @@ class Order extends Model implements OrderContract /** * Get the order shipments record associated with the order. */ - public function shipments(): \Illuminate\Database\Eloquent\Relations\HasMany + public function shipments(): HasMany { return $this->hasMany(ShipmentProxy::modelClass()); } @@ -124,7 +128,7 @@ class Order extends Model implements OrderContract /** * Get the order invoices record associated with the order. */ - public function invoices(): \Illuminate\Database\Eloquent\Relations\HasMany + public function invoices(): HasMany { return $this->hasMany(InvoiceProxy::modelClass()); } @@ -132,7 +136,7 @@ class Order extends Model implements OrderContract /** * Get the order refunds record associated with the order. */ - public function refunds(): \Illuminate\Database\Eloquent\Relations\HasMany + public function refunds(): HasMany { return $this->hasMany(RefundProxy::modelClass()); } @@ -140,7 +144,7 @@ class Order extends Model implements OrderContract /** * Get the order transactions record associated with the order. */ - public function transactions(): \Illuminate\Database\Eloquent\Relations\HasMany + public function transactions(): HasMany { return $this->hasMany(OrderTransactionProxy::modelClass()); } @@ -148,7 +152,7 @@ class Order extends Model implements OrderContract /** * Get the customer record associated with the order. */ - public function customer(): \Illuminate\Database\Eloquent\Relations\MorphTo + public function customer(): MorphTo { return $this->morphTo(); } @@ -156,7 +160,7 @@ class Order extends Model implements OrderContract /** * Get the addresses for the order. */ - public function addresses(): \Illuminate\Database\Eloquent\Relations\HasMany + public function addresses(): HasMany { return $this->hasMany(OrderAddressProxy::modelClass()); } @@ -164,7 +168,7 @@ class Order extends Model implements OrderContract /** * Get the payment for the order. */ - public function payment(): \Illuminate\Database\Eloquent\Relations\HasOne + public function payment(): HasOne { return $this->hasOne(OrderPaymentProxy::modelClass()); } @@ -172,7 +176,7 @@ class Order extends Model implements OrderContract /** * Get the billing address for the order. */ - public function billing_address(): \Illuminate\Database\Eloquent\Relations\HasMany + public function billing_address(): HasMany { return $this->addresses() ->where('address_type', OrderAddress::ADDRESS_TYPE_BILLING); @@ -190,7 +194,7 @@ class Order extends Model implements OrderContract /** * Get the shipping address for the order. */ - public function shipping_address(): \Illuminate\Database\Eloquent\Relations\HasMany + public function shipping_address(): HasMany { return $this->addresses() ->where('address_type', OrderAddress::ADDRESS_TYPE_SHIPPING); diff --git a/packages/Webkul/Sales/src/Models/OrderItem.php b/packages/Webkul/Sales/src/Models/OrderItem.php index 8593d738a..9feaaed6e 100755 --- a/packages/Webkul/Sales/src/Models/OrderItem.php +++ b/packages/Webkul/Sales/src/Models/OrderItem.php @@ -41,7 +41,7 @@ class OrderItem extends Model implements OrderItemContract return $this->typeInstance; } - $this->typeInstance = app(config('product_types.'.$this->type.'.class')); + $this->typeInstance = app(config('product_types.' . $this->type . '.class')); if ($this->product) { $this->typeInstance->setProduct($this); diff --git a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php index f966f91ac..25faf9ba5 100755 --- a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php +++ b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php @@ -6,10 +6,9 @@ use Illuminate\Support\ServiceProvider; class SalesServiceProvider extends ServiceProvider { - public function boot(): void { - $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); } /** @@ -19,7 +18,6 @@ class SalesServiceProvider extends ServiceProvider */ public function register(): void { - $this->mergeConfigFrom(dirname(__DIR__).'/Config/system.php', 'core'); + $this->mergeConfigFrom(dirname(__DIR__) . '/Config/system.php', 'core'); } - } \ No newline at end of file diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php index d185fc25d..21fd80b27 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxCategoryFactory.php @@ -22,8 +22,8 @@ class TaxCategoryFactory extends Factory public function definition(): array { return [ - 'code' => $this->faker->uuid, - 'name' => $this->faker->words(2, true), + 'code' => $this->faker->uuid, + 'name' => $this->faker->words(2, true), 'description' => $this->faker->sentence(10), ]; } diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php index de5de85e4..a8cb272ee 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxMapFactory.php @@ -25,7 +25,7 @@ class TaxMapFactory extends Factory { return [ 'tax_category_id' => TaxCategory::factory(), - 'tax_rate_id' => TaxRate::factory(), + 'tax_rate_id' => TaxRate::factory(), ]; } } diff --git a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php index 5231cdae3..a37c9eaa1 100644 --- a/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php +++ b/packages/Webkul/Tax/src/Database/Factories/TaxRateFactory.php @@ -23,13 +23,13 @@ class TaxRateFactory extends Factory { return [ 'identifier' => $this->faker->uuid, - 'is_zip' => 0, - 'zip_code' => '*', - 'zip_from' => null, - 'zip_to' => null, - 'state' => '', - 'country' => $this->faker->countryCode, - 'tax_rate' => $this->faker->randomFloat(2, 3, 25), + 'is_zip' => 0, + 'zip_code' => '*', + 'zip_from' => null, + 'zip_to' => null, + 'state' => '', + 'country' => $this->faker->countryCode, + 'tax_rate' => $this->faker->randomFloat(2, 3, 25), ]; } } \ No newline at end of file diff --git a/tests/trigger/Shop/DatabaseLogicCest.php b/tests/trigger/Shop/DatabaseLogicCest.php index d2e96dab9..b325f13f1 100644 --- a/tests/trigger/Shop/DatabaseLogicCest.php +++ b/tests/trigger/Shop/DatabaseLogicCest.php @@ -38,7 +38,7 @@ class DatabaseLogicCest public function testGetUrlPathOfCategory(UnitTester $I) { $rootCategoryTranslation = $I->grabRecord(CategoryTranslation::class, [ - 'slug' => 'root', + 'slug' => 'root', 'locale' => 'en', ]); @@ -49,20 +49,20 @@ class DatabaseLogicCest $parentCategoryName = $this->faker->word; $parentCategoryAttributes = [ - 'parent_id' => $rootCategory->id, - 'position' => 1, - 'status' => 1, + 'parent_id' => $rootCategory->id, + 'position' => 1, + 'status' => 1, $this->localeEn->code => [ - 'name' => $parentCategoryName, - 'slug' => strtolower($parentCategoryName), + 'name' => $parentCategoryName, + 'slug' => strtolower($parentCategoryName), 'description' => $parentCategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $parentCategoryName, - 'slug' => strtolower($parentCategoryName), + 'name' => $parentCategoryName, + 'slug' => strtolower($parentCategoryName), 'description' => $parentCategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -71,22 +71,22 @@ class DatabaseLogicCest $rootCategory->prependNode($parentCategory); $I->assertNotNull($parentCategory); - $categoryName = $this->faker->word; + $categoryName = $this->faker->word; $categoryAttributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => $parentCategory->id, + 'position' => 1, + 'status' => 1, + 'parent_id' => $parentCategory->id, $this->localeEn->code => [ - 'name' => $categoryName, - 'slug' => strtolower($categoryName), + 'name' => $categoryName, + 'slug' => strtolower($categoryName), 'description' => $categoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $categoryName, - 'slug' => strtolower($categoryName), + 'name' => $categoryName, + 'slug' => strtolower($categoryName), 'description' => $categoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -114,14 +114,14 @@ class DatabaseLogicCest $I->assertEquals($expectedUrlPath, $urlPathQueryResult->url_path); $root2Category = $I->make(Category::class, [ - 'position' => 1, - 'status' => 1, - 'parent_id' => null, + 'position' => 1, + 'status' => 1, + 'parent_id' => null, $this->localeEn->code => [ - 'name' => $this->faker->word, - 'slug' => strtolower($this->faker->word), + 'name' => $this->faker->word, + 'slug' => strtolower($this->faker->word), 'description' => $this->faker->word, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], ]) ->first(); diff --git a/tests/trigger/Shop/TriggerCest.php b/tests/trigger/Shop/TriggerCest.php index 503ff9625..d60505071 100644 --- a/tests/trigger/Shop/TriggerCest.php +++ b/tests/trigger/Shop/TriggerCest.php @@ -48,16 +48,16 @@ class TriggerCest $this->faker = Factory::create(); $rootCategoryTranslation = $I->grabRecord(CategoryTranslation::class, [ - 'slug' => 'root', + 'slug' => 'root', 'locale' => 'en', ]); - $rootCategory = $I->grabRecord(Category::class, [ + $rootCategory = $I->grabRecord(Category::class, [ 'id' => $rootCategoryTranslation->category_id, ]); - $this->parentCategoryName = $this->faker->word; - $this->categoryName = $this->faker->word . $this->faker->randomDigit; - $this->root2CategoryName = $this->faker->word . $this->faker->randomDigit; + $this->parentCategoryName = $this->faker->word; + $this->categoryName = $this->faker->word . $this->faker->randomDigit; + $this->root2CategoryName = $this->faker->word . $this->faker->randomDigit; $this->childOfRoot2CategoryName = $this->faker->word . $this->faker->randomDigit; $this->localeEn = $I->grabRecord(Locale::class, [ @@ -69,20 +69,20 @@ class TriggerCest ]); $this->parentCategoryAttributes = [ - 'parent_id' => $rootCategory->id, - 'position' => 1, - 'status' => 1, + 'parent_id' => $rootCategory->id, + 'position' => 1, + 'status' => 1, $this->localeEn->code => [ - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), 'description' => $this->parentCategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), 'description' => $this->parentCategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -92,20 +92,20 @@ class TriggerCest $I->assertNotNull($this->parentCategory); $this->categoryAttributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => $this->parentCategory->id, + 'position' => 1, + 'status' => 1, + 'parent_id' => $this->parentCategory->id, $this->localeEn->code => [ - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), 'description' => $this->categoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), 'description' => $this->categoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -116,20 +116,20 @@ class TriggerCest $this->root2CategoryAttributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => null, + 'position' => 1, + 'status' => 1, + 'parent_id' => null, $this->localeEn->code => [ - 'name' => $this->root2CategoryName, - 'slug' => strtolower($this->root2CategoryName), + 'name' => $this->root2CategoryName, + 'slug' => strtolower($this->root2CategoryName), 'description' => $this->root2CategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->root2CategoryName, - 'slug' => strtolower($this->root2CategoryName), + 'name' => $this->root2CategoryName, + 'slug' => strtolower($this->root2CategoryName), 'description' => $this->root2CategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -142,20 +142,20 @@ class TriggerCest $I->assertGreaterThan($rootCategory->_rgt, $this->root2Category->_lft); $this->childOfRoot2CategoryAttributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => $this->root2Category->id, + 'position' => 1, + 'status' => 1, + 'parent_id' => $this->root2Category->id, $this->localeEn->code => [ - 'name' => $this->childOfRoot2CategoryName, - 'slug' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'slug' => strtolower($this->childOfRoot2CategoryName), 'description' => $this->childOfRoot2CategoryName, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], $this->localeDe->code => [ - 'name' => $this->childOfRoot2CategoryName, - 'slug' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'slug' => strtolower($this->childOfRoot2CategoryName), 'description' => $this->childOfRoot2CategoryName, - 'locale_id' => $this->localeDe->id, + 'locale_id' => $this->localeDe->id, ], ]; @@ -170,47 +170,47 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->root2Category->id, - 'name' => $this->root2CategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => '', + 'name' => $this->root2CategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => '', ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->childOfRoot2Category->id, - 'name' => $this->childOfRoot2CategoryName, - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->childOfRoot2CategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->childOfRoot2Category->id, - 'name' => $this->childOfRoot2CategoryName, - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->childOfRoot2CategoryName), + 'name' => $this->childOfRoot2CategoryName, + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->childOfRoot2CategoryName), ]); } @@ -218,21 +218,21 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); - $newCategoryName = $this->faker->word; + $newCategoryName = $this->faker->word; $this->categoryAttributes[$this->localeDe->code]['name'] = $newCategoryName; $this->categoryAttributes[$this->localeDe->code]['slug'] = strtolower($newCategoryName); $I->assertTrue($this->category->update($this->categoryAttributes)); @@ -240,18 +240,18 @@ class TriggerCest $I->dontSeeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $newCategoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $newCategoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $newCategoryName, - 'slug' => strtolower($newCategoryName), - 'locale' => $this->localeDe->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($newCategoryName), + 'name' => $newCategoryName, + 'slug' => strtolower($newCategoryName), + 'locale' => $this->localeDe->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($newCategoryName), ]); } @@ -259,46 +259,46 @@ class TriggerCest { $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->parentCategory->id, - 'name' => $this->parentCategoryName, - 'slug' => strtolower($this->parentCategoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName), + 'name' => $this->parentCategoryName, + 'slug' => strtolower($this->parentCategoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName), ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . $this->categoryName, + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . $this->categoryName, ]); } public function testUpdateTriggersOnCategoriesTable(UnitTester $I) { $I->seeRecord(Category::class, [ - 'id' => $this->category->id, + 'id' => $this->category->id, 'parent_id' => $this->parentCategory->id, ]); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => strtolower($this->parentCategoryName) . '/' . strtolower($this->categoryName), ]); - $category2Name = $this->faker->word; + $category2Name = $this->faker->word; $category2Attributes = [ - 'position' => 1, - 'status' => 1, - 'parent_id' => $this->parentCategory->id, + 'position' => 1, + 'status' => 1, + 'parent_id' => $this->parentCategory->id, $this->localeEn->code => [ - 'name' => $category2Name, - 'slug' => strtolower($category2Name), + 'name' => $category2Name, + 'slug' => strtolower($category2Name), 'description' => $category2Name, - 'locale_id' => $this->localeEn->id, + 'locale_id' => $this->localeEn->id, ], ]; @@ -312,10 +312,10 @@ class TriggerCest $expectedUrlPath = strtolower($this->parentCategoryName) . '/' . strtolower($category2Name) . '/' . strtolower($this->categoryName); $I->seeRecord(CategoryTranslation::class, [ 'category_id' => $this->category->id, - 'name' => $this->categoryName, - 'slug' => strtolower($this->categoryName), - 'locale' => $this->localeEn->code, - 'url_path' => $expectedUrlPath, + 'name' => $this->categoryName, + 'slug' => strtolower($this->categoryName), + 'locale' => $this->localeEn->code, + 'url_path' => $expectedUrlPath, ]); } } diff --git a/tests/unit/CartRule/CartRuleCest.php b/tests/unit/CartRule/CartRuleCest.php index d38908e08..57a77d961 100644 --- a/tests/unit/CartRule/CartRuleCest.php +++ b/tests/unit/CartRule/CartRuleCest.php @@ -25,7 +25,6 @@ use Cart; class cartRuleWithCoupon { - public $cartRule; public $coupon; @@ -33,14 +32,12 @@ class cartRuleWithCoupon public function __construct(CartRule $cartRule, CartRuleCoupon $coupon) { $this->cartRule = $cartRule; - $this->coupon = $coupon; + $this->coupon = $coupon; } - } class expectedCartItem implements Arrayable { - public const ITEM_DISCOUNT_AMOUNT_PRECISION = 4; public const ITEM_TAX_AMOUNT_PRECISION = 4; @@ -77,65 +74,63 @@ class expectedCartItem implements Arrayable public function __construct(int $cartId, int $productId) { - $this->cart_id = $cartId; + $this->cart_id = $cartId; $this->product_id = $productId; } public function calcTotals(): void { - $this->total = $this->quantity * $this->price; + $this->total = $this->quantity * $this->price; $this->base_total = $this->quantity * $this->price; } public function calcTaxAmounts(): void { - $this->tax_amount = round($this->quantity * $this->price * $this->tax_percent / 100, self::ITEM_TAX_AMOUNT_PRECISION); + $this->tax_amount = round($this->quantity * $this->price * $this->tax_percent / 100, self::ITEM_TAX_AMOUNT_PRECISION); $this->base_tax_amount = round($this->quantity * $this->price * $this->tax_percent / 100, self::ITEM_TAX_AMOUNT_PRECISION); } public function calcFixedDiscountAmounts(float $discount, float $baseDiscount, string $code, int $cartRuleId): void { - $this->discount_amount = $this->quantity * $discount; - $this->base_discount_amount = $this->quantity * $baseDiscount; - $this->coupon_code = $code; - $this->applied_cart_rule_ids = (string) $cartRuleId; + $this->discount_amount = $this->quantity * $discount; + $this->base_discount_amount = $this->quantity * $baseDiscount; + $this->coupon_code = $code; + $this->applied_cart_rule_ids = (string)$cartRuleId; } public function calcPercentageDiscountAmounts(float $discount, string $code, int $cartRuleId): void { - $this->discount_percent = $discount; - $this->discount_amount = round(($this->total + $this->tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); - $this->base_discount_amount = round(($this->base_total + $this->base_tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); - $this->coupon_code = $code; - $this->applied_cart_rule_ids = (string) $cartRuleId; + $this->discount_percent = $discount; + $this->discount_amount = round(($this->total + $this->tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); + $this->base_discount_amount = round(($this->base_total + $this->base_tax_amount) * $this->discount_percent / 100, self::ITEM_DISCOUNT_AMOUNT_PRECISION); + $this->coupon_code = $code; + $this->applied_cart_rule_ids = (string)$cartRuleId; } public function toArray(): array { return [ - 'cart_id' => $this->cart_id, - 'product_id' => $this->product_id, - 'quantity' => $this->quantity, - 'price' => $this->price, - 'base_price' => $this->base_price, - 'total' => $this->total, - 'base_total' => $this->base_total, - 'tax_percent' => $this->tax_percent, - 'tax_amount' => $this->tax_amount, - 'base_tax_amount' => $this->base_tax_amount, - 'coupon_code' => $this->coupon_code, - 'discount_percent' => $this->discount_percent, - 'discount_amount' => $this->discount_amount, - 'base_discount_amount' => $this->base_discount_amount, + 'cart_id' => $this->cart_id, + 'product_id' => $this->product_id, + 'quantity' => $this->quantity, + 'price' => $this->price, + 'base_price' => $this->base_price, + 'total' => $this->total, + 'base_total' => $this->base_total, + 'tax_percent' => $this->tax_percent, + 'tax_amount' => $this->tax_amount, + 'base_tax_amount' => $this->base_tax_amount, + 'coupon_code' => $this->coupon_code, + 'discount_percent' => $this->discount_percent, + 'discount_amount' => $this->discount_amount, + 'base_discount_amount' => $this->base_discount_amount, 'applied_cart_rule_ids' => $this->applied_cart_rule_ids, ]; } - } class expectedCart { - public const CART_TOTAL_PRECISION = 2; public $customer_id; @@ -168,39 +163,37 @@ class expectedCart public function __construct(int $cartId, int $customerId) { - $this->id = $cartId; + $this->id = $cartId; $this->customer_id = $customerId; } public function applyCoupon(int $cartRuleId, string $couponCode): void { - $this->coupon_code = $couponCode; - $this->applied_cart_rule_ids = (string) $cartRuleId; + $this->coupon_code = $couponCode; + $this->applied_cart_rule_ids = (string)$cartRuleId; } public function finalizeTotals(): void { - $this->sub_total = round($this->sub_total, self::CART_TOTAL_PRECISION); - $this->tax_total = round($this->tax_total, self::CART_TOTAL_PRECISION); + $this->sub_total = round($this->sub_total, self::CART_TOTAL_PRECISION); + $this->tax_total = round($this->tax_total, self::CART_TOTAL_PRECISION); $this->discount_amount = round($this->discount_amount, self::CART_TOTAL_PRECISION); - $this->grand_total = round($this->sub_total + $this->tax_total - $this->discount_amount, self::CART_TOTAL_PRECISION); + $this->grand_total = round($this->sub_total + $this->tax_total - $this->discount_amount, self::CART_TOTAL_PRECISION); - $this->base_sub_total = round($this->base_sub_total, self::CART_TOTAL_PRECISION); - $this->base_tax_total = round($this->base_tax_total, self::CART_TOTAL_PRECISION); + $this->base_sub_total = round($this->base_sub_total, self::CART_TOTAL_PRECISION); + $this->base_tax_total = round($this->base_tax_total, self::CART_TOTAL_PRECISION); $this->base_discount_amount = round($this->base_discount_amount, self::CART_TOTAL_PRECISION); - $this->base_grand_total = round($this->base_sub_total + $this->base_tax_total - $this->base_discount_amount, self::CART_TOTAL_PRECISION); + $this->base_grand_total = round($this->base_sub_total + $this->base_tax_total - $this->base_discount_amount, self::CART_TOTAL_PRECISION); } public function toArray(): array { - return (array) $this; + return (array)$this; } - } class expectedOrder implements Arrayable { - public $status; public $customer_email; @@ -247,63 +240,61 @@ class expectedOrder implements Arrayable public function __construct(expectedCart $expectedCart, Customer $customer, int $cartId) { - $this->status = 'pending'; - $this->customer_email = $customer->email; - $this->customer_first_name = $customer->first_name; - $this->customer_vat_id = $customer->vat_id; - $this->coupon_code = $expectedCart->coupon_code; - $this->total_item_count = $expectedCart->items_count; - $this->total_qty_ordered = $expectedCart->items_qty; - $this->grand_total = $expectedCart->grand_total; - $this->base_grand_total = $expectedCart->base_grand_total; - $this->sub_total = $expectedCart->sub_total; - $this->base_sub_total = $expectedCart->base_sub_total; - $this->discount_amount = $expectedCart->discount_amount; - $this->base_discount_amount = $expectedCart->base_discount_amount; - $this->tax_amount = $expectedCart->tax_total; - $this->base_tax_amount = $expectedCart->base_tax_total; - $this->customer_id = $customer->id; - $this->cart_id = $cartId; - $this->applied_cart_rule_ids = $expectedCart->applied_cart_rule_ids; - $this->shipping_method = null; - $this->shipping_amount = null; - $this->base_shipping_amount = null; + $this->status = 'pending'; + $this->customer_email = $customer->email; + $this->customer_first_name = $customer->first_name; + $this->customer_vat_id = $customer->vat_id; + $this->coupon_code = $expectedCart->coupon_code; + $this->total_item_count = $expectedCart->items_count; + $this->total_qty_ordered = $expectedCart->items_qty; + $this->grand_total = $expectedCart->grand_total; + $this->base_grand_total = $expectedCart->base_grand_total; + $this->sub_total = $expectedCart->sub_total; + $this->base_sub_total = $expectedCart->base_sub_total; + $this->discount_amount = $expectedCart->discount_amount; + $this->base_discount_amount = $expectedCart->base_discount_amount; + $this->tax_amount = $expectedCart->tax_total; + $this->base_tax_amount = $expectedCart->base_tax_total; + $this->customer_id = $customer->id; + $this->cart_id = $cartId; + $this->applied_cart_rule_ids = $expectedCart->applied_cart_rule_ids; + $this->shipping_method = null; + $this->shipping_amount = null; + $this->base_shipping_amount = null; $this->shipping_discount_amount = null; } public function toArray(): array { return [ - 'status' => $this->status, - 'customer_email' => $this->customer_email, - 'customer_first_name' => $this->customer_first_name, - 'customer_vat_id' => $this->customer_vat_id, - 'coupon_code' => $this->coupon_code, - 'total_item_count' => $this->total_item_count, - 'total_qty_ordered' => $this->total_qty_ordered, - 'grand_total' => $this->grand_total, - 'base_grand_total' => $this->base_grand_total, - 'sub_total' => $this->sub_total, - 'base_sub_total' => $this->base_sub_total, - 'discount_amount' => $this->discount_amount, - 'base_discount_amount' => $this->base_discount_amount, - 'tax_amount' => $this->tax_amount, - 'base_tax_amount' => $this->base_tax_amount, - 'customer_id' => $this->customer_id, - 'cart_id' => $this->cart_id, - 'applied_cart_rule_ids' => $this->applied_cart_rule_ids, - 'shipping_method' => $this->shipping_method, - 'shipping_amount' => $this->shipping_amount, - 'base_shipping_amount' => $this->base_shipping_amount, + 'status' => $this->status, + 'customer_email' => $this->customer_email, + 'customer_first_name' => $this->customer_first_name, + 'customer_vat_id' => $this->customer_vat_id, + 'coupon_code' => $this->coupon_code, + 'total_item_count' => $this->total_item_count, + 'total_qty_ordered' => $this->total_qty_ordered, + 'grand_total' => $this->grand_total, + 'base_grand_total' => $this->base_grand_total, + 'sub_total' => $this->sub_total, + 'base_sub_total' => $this->base_sub_total, + 'discount_amount' => $this->discount_amount, + 'base_discount_amount' => $this->base_discount_amount, + 'tax_amount' => $this->tax_amount, + 'base_tax_amount' => $this->base_tax_amount, + 'customer_id' => $this->customer_id, + 'cart_id' => $this->cart_id, + 'applied_cart_rule_ids' => $this->applied_cart_rule_ids, + 'shipping_method' => $this->shipping_method, + 'shipping_amount' => $this->shipping_amount, + 'base_shipping_amount' => $this->base_shipping_amount, 'shipping_discount_amount' => $this->shipping_discount_amount, ]; } - } class CartRuleCest { - private $products; private $sessionToken; @@ -371,51 +362,51 @@ class CartRuleCest // ], // ohne coupon [ - 'name' => 'PRODUCT_FREE no coupon', + 'name' => 'PRODUCT_FREE no coupon', 'productSequence' => [ self::PRODUCT_FREE, ], - 'withCoupon' => false, - 'checkOrder' => false, + 'withCoupon' => false, + 'checkOrder' => false, ], [ - 'name' => 'PRODUCT_NOT_FREE no coupon', + 'name' => 'PRODUCT_NOT_FREE no coupon', 'productSequence' => [ self::PRODUCT_NOT_FREE, ], - 'withCoupon' => false, - 'checkOrder' => false, + 'withCoupon' => false, + 'checkOrder' => false, ], // fixer Coupon für ein Produkt (Warenkorb wird nicht 0) [ - 'name' => 'PRODUCT_NOT_FREE fix coupon', + 'name' => 'PRODUCT_NOT_FREE fix coupon', 'productSequence' => [ self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_FIXED, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], [ - 'name' => 'check fix coupon on product with quantity=2', + 'name' => 'check fix coupon on product with quantity=2', 'productSequence' => [ self::PRODUCT_NOT_FREE, self::PRODUCT_NOT_FREE_REDUCED_TAX, self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_FIXED, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], // [ // 'name' => 'check fix coupon applied to two products', @@ -436,34 +427,34 @@ class CartRuleCest // ], // prozenturaler Coupon für ein Produkt (Warenkorb wird nicht 0) [ - 'name' => 'PRODUCT_NOT_FREE percentage coupon', + 'name' => 'PRODUCT_NOT_FREE percentage coupon', 'productSequence' => [ self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_PERCENTAGE, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], [ - 'name' => 'check percentage coupon on product with quantity=2', + 'name' => 'check percentage coupon on product with quantity=2', 'productSequence' => [ self::PRODUCT_NOT_FREE, self::PRODUCT_NOT_FREE_REDUCED_TAX, self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_PERCENTAGE, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], // [ // 'name' => 'check percentage coupon applied to two products', @@ -484,34 +475,34 @@ class CartRuleCest // ], // fixer Coupon für ein Produkt (Warenkorb wird 0) [ - 'name' => 'PRODUCT_NON_SUB_NOT_FREE fix coupon to zero', + 'name' => 'PRODUCT_NON_SUB_NOT_FREE fix coupon to zero', 'productSequence' => [ self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_FIXED_FULL, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], [ - 'name' => 'check fix coupon to zero on product with quantity=2', + 'name' => 'check fix coupon to zero on product with quantity=2', 'productSequence' => [ self::PRODUCT_NOT_FREE, self::PRODUCT_NOT_FREE_REDUCED_TAX, self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_FIXED_FULL, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], // [ // 'name' => 'check fix coupon to zero applied to two products', @@ -532,34 +523,34 @@ class CartRuleCest // ], // prozenturaler Coupon für ein Produkt (Warenkorb wird 0) [ - 'name' => 'PRODUCT_NOT_FREE percentage coupon to zero', + 'name' => 'PRODUCT_NOT_FREE percentage coupon to zero', 'productSequence' => [ self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_PERCENTAGE_FULL, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], [ - 'name' => 'check percentage coupon to zero on product with quantity=2', + 'name' => 'check percentage coupon to zero on product with quantity=2', 'productSequence' => [ self::PRODUCT_NOT_FREE, self::PRODUCT_NOT_FREE_REDUCED_TAX, self::PRODUCT_NOT_FREE, ], - 'withCoupon' => true, - 'couponScenario' => [ + 'withCoupon' => true, + 'couponScenario' => [ 'scenario' => self::COUPON_PERCENTAGE_FULL, 'products' => [ self::PRODUCT_NOT_FREE, ], ], - 'checkOrder' => false, + 'checkOrder' => false, ], // [ // 'name' => 'check percentage coupon to zero applied to two products', @@ -604,7 +595,7 @@ class CartRuleCest $this->sessionToken = $faker->uuid; session(['_token' => $this->sessionToken]); - $taxCategories = $this->generateTaxCategories($I); + $taxCategories = $this->generateTaxCategories($I); $this->products = $this->generateProducts($I, $scenario['productSequence'], $taxCategories); $cartRuleWithCoupon = null; @@ -614,9 +605,9 @@ class CartRuleCest foreach ($scenario['productSequence'] as $productIndex) { $data = [ - '_token' => session('_token'), + '_token' => session('_token'), 'product_id' => $this->products[$productIndex]->id, - 'quantity' => 1, + 'quantity' => 1, ]; cart()->addProduct($this->products[$productIndex]->id, $data); @@ -624,7 +615,7 @@ class CartRuleCest if ($scenario['withCoupon']) { $expectedCartCoupon = $cartRuleWithCoupon->coupon->code; - $I->comment('I try to use coupon code '.$expectedCartCoupon); + $I->comment('I try to use coupon code ' . $expectedCartCoupon); cart() ->setCouponCode($expectedCartCoupon) ->collectTotals(); @@ -655,43 +646,43 @@ class CartRuleCest $customerAddress = $I->have(CustomerAddress::class, [ 'first_name' => $customer->first_name, - 'last_name' => $customer->last_name, - 'country' => 'DE', + 'last_name' => $customer->last_name, + 'country' => 'DE', ]); $billing = [ - 'address1' => $customerAddress->address1, + 'address1' => $customerAddress->address1, 'use_for_shipping' => true, - 'first_name' => $customerAddress->first_name, - 'last_name' => $customerAddress->last_name, - 'email' => $customer->email, - 'company_name' => $customerAddress->company_name, - 'city' => $customerAddress->city, - 'postcode' => $customerAddress->postcode, - 'country' => $customerAddress->country, - 'state' => $customerAddress->state, - 'phone' => $customerAddress->phone, + 'first_name' => $customerAddress->first_name, + 'last_name' => $customerAddress->last_name, + 'email' => $customer->email, + 'company_name' => $customerAddress->company_name, + 'city' => $customerAddress->city, + 'postcode' => $customerAddress->postcode, + 'country' => $customerAddress->country, + 'state' => $customerAddress->state, + 'phone' => $customerAddress->phone, ]; $shipping = [ - 'address1' => '', + 'address1' => '', 'first_name' => $customerAddress->first_name, - 'last_name' => $customerAddress->last_name, - 'email' => $customer->email, + 'last_name' => $customerAddress->last_name, + 'email' => $customer->email, ]; cart()->saveCustomerAddress([ - 'billing' => $billing, + 'billing' => $billing, 'shipping' => $shipping, ]); cart()->saveShippingMethod('free_free'); cart()->savePaymentMethod(['method' => 'mollie_creditcard']); $I->assertFalse(cart()->hasError()); - $orderItemRepository = new OrderItemRepository(app()); - $downloadableLinkRepository = new ProductDownloadableLinkRepository(app()); + $orderItemRepository = new OrderItemRepository(app()); + $downloadableLinkRepository = new ProductDownloadableLinkRepository(app()); $downloadableLinkPurchasedRepository = new DownloadableLinkPurchasedRepository($downloadableLinkRepository, app()); - $orderRepository = new OrderRepository($orderItemRepository, $downloadableLinkPurchasedRepository, app()); + $orderRepository = new OrderRepository($orderItemRepository, $downloadableLinkPurchasedRepository, app()); $orderRepository->create(cart()->prepareDataForOrder()); $expectedOrder = new expectedOrder($expectedCart, $customer, $cart->id); @@ -720,76 +711,76 @@ class CartRuleCest session(['_token' => $this->sessionToken]); $tax = $I->have(TaxRate::class, [ - 'country' => 'DE', + 'country' => 'DE', 'tax_rate' => 19.0, ]); $taxCategorie = $I->have(TaxCategory::class); $I->have(TaxMap::class, [ - 'tax_rate_id' => $tax->id, + 'tax_rate_id' => $tax->id, 'tax_category_id' => $taxCategorie->id, ]); $productConfig = [ 'attributeValues' => [ - 'price' => 23.92, + 'price' => 23.92, 'tax_category_id' => $taxCategorie->id, ], ]; - $product = $I->haveProduct(Laravel5Helper::SIMPLE_PRODUCT, $productConfig); + $product = $I->haveProduct(Laravel5Helper::SIMPLE_PRODUCT, $productConfig); $ruleConfig = [ - 'action_type' => self::ACTION_TYPE_PERCENTAGE, + 'action_type' => self::ACTION_TYPE_PERCENTAGE, 'discount_amount' => 100, - 'conditions' => [ + 'conditions' => [ [ - 'attribute' => 'product|sku', - 'value' => $product->sku, - 'operator' => '==', + 'attribute' => 'product|sku', + 'value' => $product->sku, + 'operator' => '==', 'attribute_type' => 'text', ], ], ]; - $cartRule = $I->have(CartRule::class, $ruleConfig); + $cartRule = $I->have(CartRule::class, $ruleConfig); DB::table('cart_rule_channels') ->insert([ 'cart_rule_id' => $cartRule->id, - 'channel_id' => core()->getCurrentChannel()->id, + 'channel_id' => core()->getCurrentChannel()->id, ]); $guestCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'guest']); DB::table('cart_rule_customer_groups') ->insert([ - 'cart_rule_id' => $cartRule->id, + 'cart_rule_id' => $cartRule->id, 'customer_group_id' => $guestCustomerGroup['id'], ]); $generalCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'general']); DB::table('cart_rule_customer_groups') ->insert([ - 'cart_rule_id' => $cartRule->id, + 'cart_rule_id' => $cartRule->id, 'customer_group_id' => $generalCustomerGroup['id'], ]); $coupon = $I->have(CartRuleCoupon::class, [ - 'code' => 'AWESOME', + 'code' => 'AWESOME', 'cart_rule_id' => $cartRule->id, ]); $data = [ - '_token' => session('_token'), + '_token' => session('_token'), 'product_id' => $product->id, - 'quantity' => 1, + 'quantity' => 1, ]; cart()->addProduct($product->id, $data); cart() ->setCouponCode('AWESOME') ->collectTotals(); - $cart = cart()->getCart(); + $cart = cart()->getCart(); $cartItem = $cart->items() ->first(); @@ -834,8 +825,8 @@ class CartRuleCest break; case self::PRODUCT_NOT_FREE: - $cartItem->price = self::PRODUCT_PRICE; - $cartItem->base_price = self::PRODUCT_PRICE; + $cartItem->price = self::PRODUCT_PRICE; + $cartItem->base_price = self::PRODUCT_PRICE; $cartItem->tax_percent = self::TAX_RATE; $cartItem->calcTotals(); @@ -843,8 +834,8 @@ class CartRuleCest break; case self::PRODUCT_NOT_FREE_REDUCED_TAX: - $cartItem->price = self::REDUCED_PRODUCT_PRICE; - $cartItem->base_price = self::REDUCED_PRODUCT_PRICE; + $cartItem->price = self::REDUCED_PRODUCT_PRICE; + $cartItem->base_price = self::REDUCED_PRODUCT_PRICE; $cartItem->tax_percent = self::REDUCED_TAX_RATE; $cartItem->calcTotals(); @@ -900,7 +891,7 @@ class CartRuleCest } if ($scenario['withCoupon'] && $scenario['couponScenario']['scenario'] === self::COUPON_FIXED_CART) { - $totals = $this->calcTotals($cartItems); + $totals = $this->calcTotals($cartItems); $cartItems = $this->splitDiscountToItems($cartItems, $cartRuleWithCoupon, $totals); } @@ -910,14 +901,14 @@ class CartRuleCest private function calcTotals(array $cartItems): array { $result = [ - 'subTotal' => 0.0, + 'subTotal' => 0.0, 'baseSubTotal' => 0.0, ]; foreach ($cartItems as $expectedCartItem) { - $result['subTotal'] += $expectedCartItem->total; + $result['subTotal'] += $expectedCartItem->total; $result['baseSubTotal'] += $expectedCartItem->base_total; } - $result['subTotal'] = round($result['subTotal'], expectedCart::CART_TOTAL_PRECISION); + $result['subTotal'] = round($result['subTotal'], expectedCart::CART_TOTAL_PRECISION); $result['baseSubTotal'] = round($result['baseSubTotal'], expectedCart::CART_TOTAL_PRECISION); return $result; @@ -928,26 +919,26 @@ class CartRuleCest cartRuleWithCoupon $cartRuleWithCoupon, array $totals ): array { - $discountAmount = self::DISCOUNT_AMOUNT_CART; + $discountAmount = self::DISCOUNT_AMOUNT_CART; $baseDiscountAmount = self::DISCOUNT_AMOUNT_CART; // split coupon amount to cart items $length = count($cartItems) - 1; for ($i = 0; $i < $length; $i++) { $cartItems[$i]->discount_amount = round(self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->total / $totals['subTotal'], expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); - $discountAmount -= $cartItems[$i]->discount_amount; + $discountAmount -= $cartItems[$i]->discount_amount; $cartItems[$i]->base_discount_amount = round(self::DISCOUNT_AMOUNT_CART * $cartItems[$i]->base_total / $totals['baseSubTotal'], expectedCartItem::ITEM_DISCOUNT_AMOUNT_PRECISION); - $baseDiscountAmount -= $cartItems[$i]->discount_amount; + $baseDiscountAmount -= $cartItems[$i]->discount_amount; - $cartItems[$i]->coupon_code = $cartRuleWithCoupon->coupon->code; - $cartItems[$i]->applied_cart_rule_ids = (string) $cartRuleWithCoupon->cartRule->id; + $cartItems[$i]->coupon_code = $cartRuleWithCoupon->coupon->code; + $cartItems[$i]->applied_cart_rule_ids = (string)$cartRuleWithCoupon->cartRule->id; } - $cartItems[$length]->discount_amount = $discountAmount; + $cartItems[$length]->discount_amount = $discountAmount; $cartItems[$length]->base_discount_amount = $baseDiscountAmount; - $cartItems[$length]->coupon_code = $cartRuleWithCoupon->coupon->code; - $cartItems[$length]->applied_cart_rule_ids = (string) $cartRuleWithCoupon->cartRule->id; + $cartItems[$length]->coupon_code = $cartRuleWithCoupon->coupon->code; + $cartItems[$length]->applied_cart_rule_ids = (string)$cartRuleWithCoupon->cartRule->id; return $cartItems; } @@ -996,12 +987,12 @@ class CartRuleCest $cart->items_count++; $cart->items_qty += $cartItem->quantity; - $cart->sub_total += $cartItem->total; - $cart->tax_total += $cartItem->tax_amount; + $cart->sub_total += $cartItem->total; + $cart->tax_total += $cartItem->tax_amount; $cart->discount_amount += $cartItem->discount_amount; - $cart->base_sub_total += $cartItem->base_total; - $cart->base_tax_total += $cartItem->base_tax_amount; + $cart->base_sub_total += $cartItem->base_total; + $cart->base_tax_total += $cartItem->base_tax_amount; $cart->base_discount_amount += $cartItem->base_discount_amount; } @@ -1017,18 +1008,18 @@ class CartRuleCest */ private function generateTaxCategories(UnitTester $I): array { - $result = []; + $result = []; $country = strtoupper(Config::get('app.default_country')) ?? 'DE'; foreach ($this->getTaxRateSpecifications() as $taxSpec => $taxRate) { $tax = $I->have(TaxRate::class, [ - 'country' => $country, + 'country' => $country, 'tax_rate' => $taxRate, ]); $taxCategorie = $I->have(TaxCategory::class); $I->have(TaxMap::class, [ - 'tax_rate_id' => $tax->id, + 'tax_rate_id' => $tax->id, 'tax_category_id' => $taxCategorie->id, ]); @@ -1048,11 +1039,11 @@ class CartRuleCest */ private function generateProducts(UnitTester $I, array $scenario, array $taxCategories): array { - $products = []; + $products = []; $productSpecs = $this->getProductSpecifications(); foreach ($scenario as $item) { - $productConfig = $this->makeProductConfig($productSpecs[$item], $taxCategories); + $productConfig = $this->makeProductConfig($productSpecs[$item], $taxCategories); $products[$item] = $I->haveProduct($productSpecs[$item]['productType'], $productConfig); } @@ -1070,26 +1061,26 @@ class CartRuleCest $faker = Factory::create(); $couponSpecifications = $this->getCouponSpecifications(); - $ruleConfig = $this->makeRuleConfig($couponSpecifications[$couponConfig['scenario']], $this->products, $couponConfig['products']); - $cartRule = $I->have(CartRule::class, $ruleConfig); + $ruleConfig = $this->makeRuleConfig($couponSpecifications[$couponConfig['scenario']], $this->products, $couponConfig['products']); + $cartRule = $I->have(CartRule::class, $ruleConfig); DB::table('cart_rule_channels') ->insert([ 'cart_rule_id' => $cartRule->id, - 'channel_id' => core()->getCurrentChannel()->id, + 'channel_id' => core()->getCurrentChannel()->id, ]); $guestCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'guest']); DB::table('cart_rule_customer_groups') ->insert([ - 'cart_rule_id' => $cartRule->id, + 'cart_rule_id' => $cartRule->id, 'customer_group_id' => $guestCustomerGroup['id'], ]); $generalCustomerGroup = $I->grabRecord('customer_groups', ['code' => 'general']); DB::table('cart_rule_customer_groups') ->insert([ - 'cart_rule_id' => $cartRule->id, + 'cart_rule_id' => $cartRule->id, 'customer_group_id' => $generalCustomerGroup['id'], ]); @@ -1112,8 +1103,8 @@ class CartRuleCest 'productInventory' => [ 'qty' => 100, ], - 'attributeValues' => [ - 'price' => 0.0, + 'attributeValues' => [ + 'price' => 0.0, 'tax_category_id' => $taxCategories[self::TAX_CATEGORY], ], ]; @@ -1146,17 +1137,17 @@ class CartRuleCest { foreach ($couponableProducts as $item) { $conditions[] = [ - 'value' => $products[$item]->sku, - 'operator' => '==', - 'attribute' => 'product|sku', + 'value' => $products[$item]->sku, + 'operator' => '==', + 'attribute' => 'product|sku', 'attribute_type' => 'text', ]; } $result = [ - 'action_type' => $ruleSpec['actionType'], + 'action_type' => $ruleSpec['actionType'], 'discount_amount' => $ruleSpec['discountAmount'], - 'conditions' => $conditions ?? null, + 'conditions' => $conditions ?? null, ]; return $result; @@ -1170,21 +1161,21 @@ class CartRuleCest return [ [ 'productScenario' => self::PRODUCT_FREE, - 'productType' => Laravel5Helper::SIMPLE_PRODUCT, - 'freeOfCharge' => true, - 'reducedTax' => false, + 'productType' => Laravel5Helper::SIMPLE_PRODUCT, + 'freeOfCharge' => true, + 'reducedTax' => false, ], [ 'productScenario' => self::PRODUCT_NOT_FREE, - 'productType' => Laravel5Helper::SIMPLE_PRODUCT, - 'freeOfCharge' => false, - 'reducedTax' => false, + 'productType' => Laravel5Helper::SIMPLE_PRODUCT, + 'freeOfCharge' => false, + 'reducedTax' => false, ], [ 'productScenario' => self::PRODUCT_NOT_FREE_REDUCED_TAX, - 'productType' => Laravel5Helper::SIMPLE_PRODUCT, - 'freeOfCharge' => false, - 'reducedTax' => true, + 'productType' => Laravel5Helper::SIMPLE_PRODUCT, + 'freeOfCharge' => false, + 'reducedTax' => true, ], ]; } @@ -1197,27 +1188,27 @@ class CartRuleCest return [ [ 'couponScenario' => self::COUPON_FIXED, - 'actionType' => self::ACTION_TYPE_FIXED, + 'actionType' => self::ACTION_TYPE_FIXED, 'discountAmount' => self::DISCOUNT_AMOUNT_FIX, ], [ 'couponScenario' => self::COUPON_FIXED_FULL, - 'actionType' => self::ACTION_TYPE_FIXED, + 'actionType' => self::ACTION_TYPE_FIXED, 'discountAmount' => self::DISCOUNT_AMOUNT_FIX_FULL, ], [ 'couponScenario' => self::COUPON_PERCENTAGE, - 'actionType' => self::ACTION_TYPE_PERCENTAGE, + 'actionType' => self::ACTION_TYPE_PERCENTAGE, 'discountAmount' => self::DISCOUNT_AMOUNT_PERCENT, ], [ 'couponScenario' => self::COUPON_PERCENTAGE_FULL, - 'actionType' => self::ACTION_TYPE_PERCENTAGE, + 'actionType' => self::ACTION_TYPE_PERCENTAGE, 'discountAmount' => 100.0, ], [ 'couponScenario' => self::COUPON_FIXED_CART, - 'actionType' => self::ACTION_TYPE_CART_FIXED, + 'actionType' => self::ACTION_TYPE_CART_FIXED, 'discountAmount' => self::DISCOUNT_AMOUNT_CART, ], ]; @@ -1229,7 +1220,7 @@ class CartRuleCest private function getTaxRateSpecifications(): array { return [ - self::TAX_CATEGORY => self::TAX_RATE, + self::TAX_CATEGORY => self::TAX_RATE, self::TAX_REDUCED_CATEGORY => self::REDUCED_TAX_RATE, ]; } @@ -1251,6 +1242,4 @@ class CartRuleCest return null; } - - } \ No newline at end of file From 865d0736d403998e2db31be9ea612fa27bb0f3de Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Wed, 6 Oct 2021 16:52:20 +0300 Subject: [PATCH 07/18] - Final CS fixes. --- .../Webkul/Core/src/Helpers/Laravel5Helper.php | 2 +- packages/Webkul/Core/src/Models/Channel.php | 18 ++++++++++-------- packages/Webkul/Product/src/Models/Product.php | 10 +++++----- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index d8d57d5c5..a9b0934d6 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -259,7 +259,7 @@ class Laravel5Helper extends Laravel private function haveBookingEventProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (!in_array('booking', $productStates)) { + if (! in_array('booking', $productStates)) { $productStates = array_merge($productStates, ['booking']); } diff --git a/packages/Webkul/Core/src/Models/Channel.php b/packages/Webkul/Core/src/Models/Channel.php index a3fd16e01..8a7217955 100755 --- a/packages/Webkul/Core/src/Models/Channel.php +++ b/packages/Webkul/Core/src/Models/Channel.php @@ -8,7 +8,9 @@ use Webkul\Core\Eloquent\TranslatableModel; use Webkul\Inventory\Models\InventorySourceProxy; use Webkul\Core\Database\Factories\ChannelFactory; use Webkul\Core\Contracts\Channel as ChannelContract; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Channel extends TranslatableModel implements ChannelContract { @@ -43,7 +45,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel locales. */ - public function locales(): \Illuminate\Database\Eloquent\Relations\BelongsToMany + public function locales(): BelongsToMany { return $this->belongsToMany(LocaleProxy::modelClass(), 'channel_locales'); } @@ -51,7 +53,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the default locale */ - public function default_locale(): \Illuminate\Database\Eloquent\Relations\BelongsTo + public function default_locale(): BelongsTo { return $this->belongsTo(LocaleProxy::modelClass()); } @@ -59,7 +61,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel locales. */ - public function currencies(): \Illuminate\Database\Eloquent\Relations\BelongsToMany + public function currencies(): BelongsToMany { return $this->belongsToMany(CurrencyProxy::modelClass(), 'channel_currencies'); } @@ -67,7 +69,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the channel inventory sources. */ - public function inventory_sources(): \Illuminate\Database\Eloquent\Relations\BelongsToMany + public function inventory_sources(): BelongsToMany { return $this->belongsToMany(InventorySourceProxy::modelClass(), 'channel_inventory_sources'); } @@ -75,7 +77,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the base currency */ - public function base_currency(): \Illuminate\Database\Eloquent\Relations\BelongsTo + public function base_currency(): BelongsTo { return $this->belongsTo(CurrencyProxy::modelClass()); } @@ -83,7 +85,7 @@ class Channel extends TranslatableModel implements ChannelContract /** * Get the base currency */ - public function root_category(): \Illuminate\Database\Eloquent\Relations\BelongsTo + public function root_category(): BelongsTo { return $this->belongsTo(CategoryProxy::modelClass(), 'root_category_id'); } @@ -93,7 +95,7 @@ class Channel extends TranslatableModel implements ChannelContract */ public function logo_url() { - if (!$this->logo) { + if (! $this->logo) { return; } @@ -113,7 +115,7 @@ class Channel extends TranslatableModel implements ChannelContract */ public function favicon_url() { - if (!$this->favicon) { + if (! $this->favicon) { return; } diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index ce34f2bcb..d78363575 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -302,7 +302,7 @@ class Product extends Model implements ProductContract $this->typeInstance = app(config('product_types.' . $this->type . '.class')); - if (!$this->typeInstance instanceof AbstractType) { + if (! $this->typeInstance instanceof AbstractType) { throw new Exception("Please ensure the product type '{$this->type}' is configured in your application."); } @@ -372,13 +372,13 @@ class Product extends Model implements ProductContract */ public function getAttribute($key) { - if (!method_exists(static::class, $key) - && !in_array($key, [ + if (! method_exists(static::class, $key) + && ! in_array($key, [ 'pivot', 'parent_id', 'attribute_family_id', ]) - && !isset($this->attributes[$key])) { + && ! isset($this->attributes[$key])) { if (isset($this->id)) { $this->attributes[$key] = ''; @@ -417,7 +417,7 @@ class Product extends Model implements ProductContract */ public function getCustomAttributeValue($attribute) { - if (!$attribute) { + if (! $attribute) { return; } From d0adff2058cd6fbc297390fcb310b751f7c12666 Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Wed, 6 Oct 2021 16:57:52 +0300 Subject: [PATCH 08/18] - Use laravel default UserFactory file. --- database/factories/UserFactory.php | 49 ++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 9279a5d40..3afecc955 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,23 +2,46 @@ namespace Database\Factories; -/* -|-------------------------------------------------------------------------- -| Model Factories -|-------------------------------------------------------------------------- -| -| This directory should contain each of the model factory definitions for -| your application. Factories provide a convenient way to generate new -| model instances for testing / seeding your application's database. -| -*/ - +use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; +use Illuminate\Support\Str; class UserFactory extends Factory { - public function definition(): array + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = User::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition() { - return []; + return [ + 'name' => $this->faker->name(), + 'email' => $this->faker->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'remember_token' => Str::random(10), + ]; + } + + /** + * Indicate that the model's email address should be unverified. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function unverified() + { + return $this->state(function (array $attributes) { + return [ + 'email_verified_at' => null, + ]; + }); } } \ No newline at end of file From 86caeff97c36f14c226581a163fcf2555b3cc9ae Mon Sep 17 00:00:00 2001 From: Abdullah Al-Faqeir Date: Thu, 7 Oct 2021 12:00:48 +0300 Subject: [PATCH 09/18] - Fix CS. - Fix conflict. --- packages/Webkul/Core/src/Helpers/Laravel5Helper.php | 6 +++--- .../Webkul/Product/src/Providers/ProductServiceProvider.php | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php index a9b0934d6..ad80203e9 100644 --- a/packages/Webkul/Core/src/Helpers/Laravel5Helper.php +++ b/packages/Webkul/Core/src/Helpers/Laravel5Helper.php @@ -211,7 +211,7 @@ class Laravel5Helper extends Laravel private function haveSimpleProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (!in_array('simple', $productStates)) { + if (! in_array('simple', $productStates)) { $productStates = array_merge($productStates, ['simple']); } @@ -227,7 +227,7 @@ class Laravel5Helper extends Laravel private function haveVirtualProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (!in_array('virtual', $productStates)) { + if (! in_array('virtual', $productStates)) { $productStates = array_merge($productStates, ['virtual']); } @@ -243,7 +243,7 @@ class Laravel5Helper extends Laravel private function haveDownloadableProduct(array $configs = [], array $productStates = []): Product { $I = $this; - if (!in_array('downloadable', $productStates)) { + if (! in_array('downloadable', $productStates)) { $productStates = array_merge($productStates, ['downloadable']); } diff --git a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php index dea148022..d9a1a3adb 100755 --- a/packages/Webkul/Product/src/Providers/ProductServiceProvider.php +++ b/packages/Webkul/Product/src/Providers/ProductServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; use Webkul\Product\Models\ProductProxy; use Webkul\Product\Observers\ProductObserver; use Webkul\Product\Console\Commands\PriceUpdate; -use Webkul\Product\Console\Commands\GenerateProducts; use Illuminate\Foundation\AliasLoader; use Webkul\Product\Facades\ProductImage as ProductImageFacade; use Webkul\Product\Facades\ProductVideo as ProductVideoFacade; @@ -67,10 +66,7 @@ class ProductServiceProvider extends ServiceProvider protected function registerCommands(): void { if ($this->app->runningInConsole()) { - $this->commands([ - PriceUpdate::class, - GenerateProducts::class, - ]); + $this->commands([PriceUpdate::class]); } } From 7e960bf97e61b9a3597a02517215de4c166fb479 Mon Sep 17 00:00:00 2001 From: Apoorv Pal Date: Thu, 7 Oct 2021 14:48:51 +0530 Subject: [PATCH 10/18] added new laravel 8 style routes to all packages --- packages/Webkul/API/Http/routes.php | 319 +++++++----- packages/Webkul/Admin/src/Http/routes.php | 477 ++++++++++-------- .../BookingProduct/src/Http/front-routes.php | 5 +- packages/Webkul/Paypal/src/Http/routes.php | 16 +- packages/Webkul/Shop/src/Http/routes.php | 157 +++--- .../Webkul/SocialLogin/src/Http/routes.php | 7 +- .../Webkul/Velocity/src/Http/admin-routes.php | 60 +-- .../Webkul/Velocity/src/Http/front-routes.php | 139 ++--- 8 files changed, 656 insertions(+), 524 deletions(-) diff --git a/packages/Webkul/API/Http/routes.php b/packages/Webkul/API/Http/routes.php index a8a9b0b67..e66ded520 100755 --- a/packages/Webkul/API/Http/routes.php +++ b/packages/Webkul/API/Http/routes.php @@ -1,295 +1,348 @@ 'api'], function ($router) { Route::group(['namespace' => 'Webkul\API\Http\Controllers\Shop', 'middleware' => ['locale', 'theme', 'currency']], function ($router) { //Currency and Locale switcher - Route::get('switch-currency', 'CoreController@switchCurrency'); + Route::get('switch-currency', [CoreController::class, 'switchCurrency']); - Route::get('switch-locale', 'CoreController@switchLocale'); + Route::get('switch-locale', [CoreController::class, 'switchLocale']); //Category routes - Route::get('categories', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Category\Repositories\CategoryRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\Category' + Route::get('categories', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => CategoryRepository::class, + 'resource' => Category::class, ]); - Route::get('descendant-categories', 'CategoryController@index'); + Route::get('descendant-categories', [CategoryController::class, 'index']); - Route::get('categories/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Category\Repositories\CategoryRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\Category' + Route::get('categories/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => CategoryRepository::class, + 'resource' => Category::class, ]); //Attribute routes - Route::get('attributes', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Attribute\Repositories\AttributeRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\Attribute' + Route::get('attributes', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => AttributeRepository::class, + 'resource' => Attribute::class, ]); - Route::get('attributes/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Attribute\Repositories\AttributeRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\Attribute' + Route::get('attributes/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => AttributeRepository::class, + 'resource' => Attribute::class, ]); //AttributeFamily routes - Route::get('families', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Attribute\Repositories\AttributeFamilyRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\AttributeFamily' + Route::get('families', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => AttributeFamilyRepository::class, + 'resource' => AttributeFamily::class, ]); - Route::get('families/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Attribute\Repositories\AttributeFamilyRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\AttributeFamily' + Route::get('families/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => AttributeFamilyRepository::class, + 'resource' => AttributeFamily::class, ]); //Product routes - Route::get('products', 'ProductController@index'); + Route::get('products', [ProductController::class, 'index']); - Route::get('products/{id}', 'ProductController@get'); + Route::get('products/{id}', [ProductController::class, 'get']); - Route::get('product-additional-information/{id}', 'ProductController@additionalInformation'); + Route::get('product-additional-information/{id}', [ProductController::class, 'additionalInformation']); - Route::get('product-configurable-config/{id}', 'ProductController@configurableConfig'); + Route::get('product-configurable-config/{id}', [ProductController::class, 'configurableConfig']); //Product Review routes - Route::get('reviews', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Product\Repositories\ProductReviewRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\ProductReview' + Route::get('reviews', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => ProductReviewRepository::class, + 'resource' => ProductReview::class, ]); - Route::get('reviews/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Product\Repositories\ProductReviewRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\ProductReview' + Route::get('reviews/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => ProductReviewRepository::class, + 'resource' => ProductReview::class, ]); - Route::post('reviews/{id}/create', 'ReviewController@store'); + Route::post('reviews/{id}/create', [ReviewController::class, 'store']); - Route::delete('reviews/{id}', 'ResourceController@destroy')->defaults('_config', [ - 'repository' => 'Webkul\Product\Repositories\ProductReviewRepository', - 'resource' => 'Webkul\API\Http\Resources\Catalog\ProductReview', + Route::delete('reviews/{id}', [ResourceController::class, 'destroy'])->defaults('_config', [ + 'repository' => ProductReviewRepository::class, + 'resource' => ProductReview::class, 'authorization_required' => true ]); //Channel routes - Route::get('channels', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\ChannelRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Channel' + Route::get('channels', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => ChannelRepository::class, + 'resource' => Channel::class, ]); - Route::get('channels/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\ChannelRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Channel' + Route::get('channels/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => ChannelRepository::class, + 'resource' => Channel::class, ]); //Locale routes - Route::get('locales', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\LocaleRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Locale' + Route::get('locales', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => LocaleRepository::class, + 'resource' => Locale::class, ]); - Route::get('locales/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\LocaleRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Locale' + Route::get('locales/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => LocaleRepository::class, + 'resource' => Locale::class, ]); //Country routes - Route::get('countries', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\CountryRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Country' + Route::get('countries', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => CountryRepository::class, + 'resource' => Country::class, ]); - Route::get('countries/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\CountryRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Country' + Route::get('countries/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => CountryRepository::class, + 'resource' => Country::class, ]); - Route::get('country-states', 'CoreController@getCountryStateGroup'); + Route::get('country-states', [CoreController::class, 'getCountryStateGroup']); //Slider routes - Route::get('sliders', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\SliderRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Slider' + Route::get('sliders', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => SliderRepository::class, + 'resource' => Slider::class, ]); - Route::get('sliders/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\SliderRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Slider' + Route::get('sliders/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => SliderRepository::class, + 'resource' => Slider::class, ]); //Currency routes - Route::get('currencies', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\CurrencyRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Currency' + Route::get('currencies', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => CurrencyRepository::class, + 'resource' => Currency::class, ]); - Route::get('currencies/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Core\Repositories\CurrencyRepository', - 'resource' => 'Webkul\API\Http\Resources\Core\Currency' + Route::get('currencies/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => CurrencyRepository::class, + 'resource' => Currency::class, ]); - Route::get('config', 'CoreController@getConfig'); + Route::get('config', [CoreController::class, 'getConfig']); //Customer routes - Route::post('customer/login', 'SessionController@create'); + Route::post('customer/login', [SessionController::class, 'create']); - Route::post('customer/forgot-password', 'ForgotPasswordController@store'); + Route::post('customer/forgot-password', [ForgotPasswordController::class, 'store']); - Route::get('customer/logout', 'SessionController@destroy'); + Route::get('customer/logout', [SessionController::class, 'destroy']); - Route::get('customer/get', 'SessionController@get'); + Route::get('customer/get', [SessionController::class, 'get']); - Route::put('customer/profile', 'SessionController@update'); + Route::put('customer/profile', [SessionController::class, 'update']); - Route::post('customer/register', 'CustomerController@create'); + Route::post('customer/register', [CustomerController::class, 'create']); - Route::get('customers/{id}', 'CustomerController@get')->defaults('_config', [ - 'repository' => 'Webkul\Customer\Repositories\CustomerRepository', - 'resource' => 'Webkul\API\Http\Resources\Customer\Customer', + Route::get('customers/{id}', [CustomerController::class, 'get'])->defaults('_config', [ + 'repository' => CustomerRepository::class, + 'resource' => Customer::class, 'authorization_required' => true ]); //Customer Address routes - Route::get('addresses', 'AddressController@get')->defaults('_config', [ + Route::get('addresses', [AddressController::class, 'get'])->defaults('_config', [ 'authorization_required' => true ]); - Route::get('addresses/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Customer\Repositories\CustomerAddressRepository', - 'resource' => 'Webkul\API\Http\Resources\Customer\CustomerAddress', + Route::get('addresses/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => CustomerAddressRepository::class, + 'resource' => CustomerAddress::class, 'authorization_required' => true ]); - Route::delete('addresses/{id}', 'ResourceController@destroy')->defaults('_config', [ - 'repository' => 'Webkul\Customer\Repositories\CustomerAddressRepository', - 'resource' => 'Webkul\API\Http\Resources\Customer\CustomerAddress', + Route::delete('addresses/{id}', [ResourceController::class, 'destroy'])->defaults('_config', [ + 'repository' => CustomerAddressRepository::class, + 'resource' => CustomerAddress::class, 'authorization_required' => true ]); - Route::put('addresses/{id}', 'AddressController@update')->defaults('_config', [ + Route::put('addresses/{id}', [AddressController::class, 'update'])->defaults('_config', [ 'authorization_required' => true ]); - Route::post('addresses/create', 'AddressController@store')->defaults('_config', [ + Route::post('addresses/create', [AddressController::class, 'store'])->defaults('_config', [ 'authorization_required' => true ]); //Order routes - Route::get('orders', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\OrderRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Order', + Route::get('orders', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => OrderRepository::class, + 'resource' => Order::class, 'authorization_required' => true ]); - Route::get('orders/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\OrderRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Order', + Route::get('orders/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => OrderRepository::class, + 'resource' => Order::class, 'authorization_required' => true ]); - Route::post('orders/{id}/cancel', 'OrderController@cancel')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\OrderRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Order', + Route::post('orders/{id}/cancel', [OrderController::class, 'cancel'])->defaults('_config', [ + 'repository' => OrderRepository::class, + 'resource' => Order::class, 'authorization_required' => true ]); //Invoice routes - Route::get('invoices', 'InvoiceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\InvoiceRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Invoice', + Route::get('invoices', [InvoiceController::class, 'index'])->defaults('_config', [ + 'repository' => InvoiceRepository::class, + 'resource' => Invoice::class, 'authorization_required' => true ]); - Route::get('invoices/{id}', 'InvoiceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\InvoiceRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Invoice', + Route::get('invoices/{id}', [InvoiceController::class, 'get'])->defaults('_config', [ + 'repository' => InvoiceRepository::class, + 'resource' => Invoice::class, 'authorization_required' => true ]); //Shipment routes - Route::get('shipments', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\ShipmentRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Shipment', + Route::get('shipments', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => ShipmentRepository::class, + 'resource' => Shipment::class, 'authorization_required' => true ]); - Route::get('shipments/{id}', 'ResourceController@get')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\ShipmentRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\Shipment', + Route::get('shipments/{id}', [ResourceController::class, 'get'])->defaults('_config', [ + 'repository' => ShipmentRepository::class, + 'resource' => Shipment::class, 'authorization_required' => true ]); //Transaction routes - Route::get('transactions', 'TransactionController@index')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\OrderTransactionRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\OrderTransaction', + Route::get('transactions', [TransactionController::class, 'index'])->defaults('_config', [ + 'repository' => OrderTransactionRepository::class, + 'resource' => OrderTransaction::class, 'authorization_required' => true ]); - Route::get('transactions/{id}', 'TransactionController@get')->defaults('_config', [ - 'repository' => 'Webkul\Sales\Repositories\OrderTransactionRepository', - 'resource' => 'Webkul\API\Http\Resources\Sales\OrderTransaction', + Route::get('transactions/{id}', [TransactionController::class, 'get'])->defaults('_config', [ + 'repository' => OrderTransactionRepository::class, + 'resource' => OrderTransaction::class, 'authorization_required' => true ]); //Wishlist routes - Route::get('wishlist', 'ResourceController@index')->defaults('_config', [ - 'repository' => 'Webkul\Customer\Repositories\WishlistRepository', - 'resource' => 'Webkul\API\Http\Resources\Customer\Wishlist', + Route::get('wishlist', [ResourceController::class, 'index'])->defaults('_config', [ + 'repository' => WishlistRepository::class, + 'resource' => Wishlist::class, 'authorization_required' => true ]); - Route::delete('wishlist/{id}', 'ResourceController@destroy')->defaults('_config', [ - 'repository' => 'Webkul\Customer\Repositories\WishlistRepository', - 'resource' => 'Webkul\API\Http\Resources\Customer\Wishlist', + Route::delete('wishlist/{id}', [ResourceController::class, 'destroy'])->defaults('_config', [ + 'repository' => WishlistRepository::class, + 'resource' => Wishlist::class, 'authorization_required' => true ]); - Route::get('move-to-cart/{id}', 'WishlistController@moveToCart'); + Route::get('move-to-cart/{id}', [WishlistController::class, 'moveToCart']); - Route::get('wishlist/add/{id}', 'WishlistController@create'); + Route::get('wishlist/add/{id}', [WishlistController::class, 'create']); //Checkout routes Route::group(['prefix' => 'checkout'], function ($router) { - Route::post('cart/add/{id}', 'CartController@store'); + Route::post('cart/add/{id}', [CartController::class, 'store']); - Route::get('cart', 'CartController@get'); + Route::get('cart', [CartController::class, 'get']); - Route::get('cart/empty', 'CartController@destroy'); + Route::get('cart/empty', [CartController::class, 'destroy']); - Route::put('cart/update', 'CartController@update'); + Route::put('cart/update', [CartController::class, 'update']); - Route::get('cart/remove-item/{id}', 'CartController@destroyItem'); + Route::get('cart/remove-item/{id}', [CartController::class, 'destroyItem']); - Route::post('cart/coupon', 'CartController@applyCoupon'); + Route::post('cart/coupon', [CartController::class, 'applyCoupon']); - Route::delete('cart/coupon', 'CartController@removeCoupon'); + Route::delete('cart/coupon', [CartController::class, 'removeCoupon']); - Route::get('cart/move-to-wishlist/{id}', 'CartController@moveToWishlist'); + Route::get('cart/move-to-wishlist/{id}', [CartController::class, 'moveToWishlist']); - Route::post('save-address', 'CheckoutController@saveAddress'); + Route::post('save-address', [CheckoutController::class, 'saveAddress']); - Route::post('save-shipping', 'CheckoutController@saveShipping'); + Route::post('save-shipping', [CheckoutController::class, 'saveShipping']); - Route::post('save-payment', 'CheckoutController@savePayment'); + Route::post('save-payment', [CheckoutController::class, 'savePayment']); - Route::post('check-minimum-order', 'CheckoutController@checkMinimumOrder'); + Route::post('check-minimum-order', [CheckoutController::class, 'checkMinimumOrder']); - Route::post('save-order', 'CheckoutController@saveOrder'); + Route::post('save-order', [CheckoutController::class, 'saveOrder']); }); }); }); \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index 0a878650f..a36afae90 100755 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -1,883 +1,926 @@ ['web', 'admin_locale']], function () { Route::prefix(config('app.admin_url'))->group(function () { - Route::get('/', 'Webkul\Admin\Http\Controllers\Controller@redirectToLogin'); + Route::get('/', [Controller::class, 'redirectToLogin']); // Login Routes - Route::get('/login', 'Webkul\User\Http\Controllers\SessionController@create')->defaults('_config', [ + Route::get('/login', [SessionController::class, 'create'])->defaults('_config', [ 'view' => 'admin::users.sessions.create', ])->name('admin.session.create'); //login post route to admin auth controller - Route::post('/login', 'Webkul\User\Http\Controllers\SessionController@store')->defaults('_config', [ + Route::post('/login', [SessionController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.dashboard.index', ])->name('admin.session.store'); // Forget Password Routes - Route::get('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@create')->defaults('_config', [ + Route::get('/forget-password', [ForgetPasswordController::class, 'create'])->defaults('_config', [ 'view' => 'admin::users.forget-password.create', ])->name('admin.forget-password.create'); - Route::post('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@store')->name('admin.forget-password.store'); + Route::post('/forget-password', [ForgetPasswordController::class, 'store'])->name('admin.forget-password.store'); // Reset Password Routes - Route::get('/reset-password/{token}', 'Webkul\User\Http\Controllers\ResetPasswordController@create')->defaults('_config', [ + Route::get('/reset-password/{token}', [ResetPasswordController::class, 'create'])->defaults('_config', [ 'view' => 'admin::users.reset-password.create', ])->name('admin.reset-password.create'); - Route::post('/reset-password', 'Webkul\User\Http\Controllers\ResetPasswordController@store')->defaults('_config', [ + Route::post('/reset-password', [ResetPasswordController::clss, 'store'])->defaults('_config', [ 'redirect' => 'admin.dashboard.index', ])->name('admin.reset-password.store'); // Admin Routes Route::group(['middleware' => ['admin']], function () { - Route::get('/logout', 'Webkul\User\Http\Controllers\SessionController@destroy')->defaults('_config', [ + Route::get('/logout', [SessionController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'admin.session.create', ])->name('admin.session.destroy'); /** * Tinymce file upload handler. */ - Route::post('tinymce/upload', 'Webkul\Admin\Http\Controllers\TinyMCEController@upload') + Route::post('tinymce/upload', [TinyMCEController::class, 'upload']) ->name('admin.tinymce.upload'); // Dashboard Route - Route::get('dashboard', 'Webkul\Admin\Http\Controllers\DashboardController@index')->defaults('_config', [ + Route::get('dashboard', [DashboardController::class, 'index'])->defaults('_config', [ 'view' => 'admin::dashboard.index', ])->name('admin.dashboard.index'); // Customer Management Routes - Route::get('customers', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@index')->defaults('_config', [ + Route::get('customers', [CustomerController::class, 'index'])->defaults('_config', [ 'view' => 'admin::customers.index', ])->name('admin.customer.index'); - Route::get('customers/create', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@create')->defaults('_config', [ + Route::get('customers/create', [CustomerController::class, 'create'])->defaults('_config', [ 'view' => 'admin::customers.create', ])->name('admin.customer.create'); - Route::post('customers/create', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@store')->defaults('_config', [ + Route::post('customers/create', [CustomerController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.customer.index', ])->name('admin.customer.store'); - Route::get('customers/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@edit')->defaults('_config', [ + Route::get('customers/edit/{id}', [CustomerController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::customers.edit', ])->name('admin.customer.edit'); - Route::get('customers/note/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@createNote')->defaults('_config', [ + Route::get('customers/note/{id}', [CustomerController::class, 'createNote'])->defaults('_config', [ 'view' => 'admin::customers.note', ])->name('admin.customer.note.create'); - Route::put('customers/note/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@storeNote')->defaults('_config', [ + Route::put('customers/note/{id}', [CustomerController::class, 'storeNote'])->defaults('_config', [ 'redirect' => 'admin.customer.index', ])->name('admin.customer.note.store'); - Route::put('customers/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@update')->defaults('_config', [ + Route::put('customers/edit/{id}', [CustomerController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.customer.index', ])->name('admin.customer.update'); - Route::post('customers/delete/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@destroy')->name('admin.customer.delete'); + Route::post('customers/delete/{id}', [CustomerController::class, 'destroy'])->name('admin.customer.delete'); - Route::post('customers/masssdelete', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@massDestroy')->name('admin.customer.mass-delete'); + Route::post('customers/masssdelete', [CustomerController::class, 'massDestroy'])->name('admin.customer.mass-delete'); - Route::post('customers/masssupdate', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@massUpdate')->name('admin.customer.mass-update'); + Route::post('customers/masssupdate', [CustomerController::class, 'massUpdate'])->name('admin.customer.mass-update'); - Route::get('reviews', 'Webkul\Product\Http\Controllers\ReviewController@index')->defaults('_config', [ + Route::get('reviews', [ReviewController::class, 'index'])->defaults('_config', [ 'view' => 'admin::customers.reviews.index', ])->name('admin.customer.review.index'); // Customer's addresses routes - Route::get('customers/{id}/addresses', 'Webkul\Admin\Http\Controllers\Customer\AddressController@index')->defaults('_config', [ + Route::get('customers/{id}/addresses', [AddressController::class, 'index'])->defaults('_config', [ 'view' => 'admin::customers.addresses.index', ])->name('admin.customer.addresses.index'); - Route::get('customers/{id}/addresses/create', 'Webkul\Admin\Http\Controllers\Customer\AddressController@create')->defaults('_config', [ + Route::get('customers/{id}/addresses/create', [AddressController::class, 'create'])->defaults('_config', [ 'view' => 'admin::customers.addresses.create', ])->name('admin.customer.addresses.create'); - Route::post('customers/{id}/addresses/create', 'Webkul\Admin\Http\Controllers\Customer\AddressController@store')->defaults('_config', [ + Route::post('customers/{id}/addresses/create', [AddressController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.customer.addresses.index', ])->name('admin.customer.addresses.store'); - Route::get('customers/addresses/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\AddressController@edit')->defaults('_config', [ + Route::get('customers/addresses/edit/{id}', [AddressController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::customers.addresses.edit', ])->name('admin.customer.addresses.edit'); - Route::put('customers/addresses/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\AddressController@update')->defaults('_config', [ + Route::put('customers/addresses/edit/{id}', [AddressController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.customer.addresses.index', ])->name('admin.customer.addresses.update'); - Route::post('customers/addresses/delete/{id}', 'Webkul\Admin\Http\Controllers\Customer\AddressController@destroy')->defaults('_config', [ + Route::post('customers/addresses/delete/{id}', [AddressController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'admin.customer.addresses.index', ])->name('admin.customer.addresses.delete'); //mass destroy - Route::post('customers/{id}/addresses', 'Webkul\Admin\Http\Controllers\Customer\AddressController@massDestroy')->defaults('_config', [ + Route::post('customers/{id}/addresses', [AddressController::class, 'massDestroy'])->defaults('_config', [ 'redirect' => 'admin.customer.addresses.index', ])->name('admin.customer.addresses.massdelete'); // Customer's invoices route - Route::get('customers/{id}/invoices', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@invoices')->name('admin.customer.invoices.data'); + Route::get('customers/{id}/invoices', [CustomerController::class, 'invoices'])->name('admin.customer.invoices.data'); // Customer's orders route - Route::get('customers/{id}/orders', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@orders')->defaults('_config', [ + Route::get('customers/{id}/orders', [CustomerController::class, 'orders'])->defaults('_config', [ 'view' => 'admin::customers.orders.index', ])->name('admin.customer.orders.data'); // Configuration routes - Route::get('configuration/{slug?}/{slug2?}', 'Webkul\Admin\Http\Controllers\ConfigurationController@index')->defaults('_config', [ + Route::get('configuration/{slug?}/{slug2?}', [ConfigurationController::class, 'index'])->defaults('_config', [ 'view' => 'admin::configuration.index', ])->name('admin.configuration.index'); - Route::post('configuration/{slug?}/{slug2?}', 'Webkul\Admin\Http\Controllers\ConfigurationController@store')->defaults('_config', [ + Route::post('configuration/{slug?}/{slug2?}', [ConfigurationController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.configuration.index', ])->name('admin.configuration.index.store'); - Route::get('configuration/{slug?}/{slug2?}/{path}', 'Webkul\Admin\Http\Controllers\ConfigurationController@download')->defaults('_config', [ + Route::get('configuration/{slug?}/{slug2?}/{path}', [ConfigurationController::class, 'download'])->defaults('_config', [ 'redirect' => 'admin.configuration.index', ])->name('admin.configuration.download'); // Reviews Routes - Route::get('reviews/edit/{id}', 'Webkul\Product\Http\Controllers\ReviewController@edit')->defaults('_config', [ + Route::get('reviews/edit/{id}', [ReviewController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::customers.reviews.edit', ])->name('admin.customer.review.edit'); - Route::put('reviews/edit/{id}', 'Webkul\Product\Http\Controllers\ReviewController@update')->defaults('_config', [ + Route::put('reviews/edit/{id}', [ReviewController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.customer.review.index', ])->name('admin.customer.review.update'); - Route::post('reviews/delete/{id}', 'Webkul\Product\Http\Controllers\ReviewController@destroy')->defaults('_config', [ + Route::post('reviews/delete/{id}', [ReviewController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'admin.customer.review.index', ])->name('admin.customer.review.delete'); //mass destroy - Route::post('reviews/massdestroy', 'Webkul\Product\Http\Controllers\ReviewController@massDestroy')->defaults('_config', [ + Route::post('reviews/massdestroy', [ReviewController::class, 'massDestroy'])->defaults('_config', [ 'redirect' => 'admin.customer.review.index', ])->name('admin.customer.review.massdelete'); //mass update - Route::post('reviews/massupdate', 'Webkul\Product\Http\Controllers\ReviewController@massUpdate')->defaults('_config', [ + Route::post('reviews/massupdate', [ReviewController::class, 'massUpdate'])->defaults('_config', [ 'redirect' => 'admin.customer.review.index', ])->name('admin.customer.review.massupdate'); // Customer Groups Routes - Route::get('groups', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@index')->defaults('_config', [ + Route::get('groups', [CustomerGroupController::class, 'index'])->defaults('_config', [ 'view' => 'admin::customers.groups.index', ])->name('admin.groups.index'); - Route::get('groups/create', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@create')->defaults('_config', [ + Route::get('groups/create', [CustomerGroupController::class, 'create'])->defaults('_config', [ 'view' => 'admin::customers.groups.create', ])->name('admin.groups.create'); - Route::post('groups/create', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@store')->defaults('_config', [ + Route::post('groups/create', [CustomerGroupController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.groups.index', ])->name('admin.groups.store'); - Route::get('groups/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@edit')->defaults('_config', [ + Route::get('groups/edit/{id}', [CustomerGroupController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::customers.groups.edit', ])->name('admin.groups.edit'); - Route::put('groups/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@update')->defaults('_config', [ + Route::put('groups/edit/{id}', [CustomerGroupController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.groups.index', ])->name('admin.groups.update'); - Route::post('groups/delete/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerGroupController@destroy')->name('admin.groups.delete'); + Route::post('groups/delete/{id}', [CustomerGroupController::class, 'destroy'])->name('admin.groups.delete'); // Sales Routes Route::prefix('sales')->group(function () { // Sales Order Routes - Route::get('/orders', 'Webkul\Admin\Http\Controllers\Sales\OrderController@index')->defaults('_config', [ + Route::get('/orders', [OrderController::class, 'index'])->defaults('_config', [ 'view' => 'admin::sales.orders.index', ])->name('admin.sales.orders.index'); - Route::get('/orders/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@view')->defaults('_config', [ + Route::get('/orders/view/{id}', [OrderController::class, 'view'])->defaults('_config', [ 'view' => 'admin::sales.orders.view', ])->name('admin.sales.orders.view'); - Route::get('/orders/cancel/{id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@cancel')->defaults('_config', [ + Route::get('/orders/cancel/{id}', [OrderController::class, 'cancel'])->defaults('_config', [ 'view' => 'admin::sales.orders.cancel', ])->name('admin.sales.orders.cancel'); - Route::post('/orders/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@comment')->name('admin.sales.orders.comment'); + Route::post('/orders/create/{order_id}', [OrderController::class, 'comment'])->name('admin.sales.orders.comment'); // Sales Invoices Routes - Route::get('/invoices', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@index')->defaults('_config', [ + Route::get('/invoices', [InvoiceController::class, 'index'])->defaults('_config', [ 'view' => 'admin::sales.invoices.index', ])->name('admin.sales.invoices.index'); - Route::get('/invoices/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@create')->defaults('_config', [ + Route::get('/invoices/create/{order_id}', [InvoiceController::class, 'create'])->defaults('_config', [ 'view' => 'admin::sales.invoices.create', ])->name('admin.sales.invoices.create'); - Route::post('/invoices/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@store')->defaults('_config', [ + Route::post('/invoices/create/{order_id}', [InvoiceController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.sales.orders.view', ])->name('admin.sales.invoices.store'); - Route::get('/invoices/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@view')->defaults('_config', [ + Route::get('/invoices/view/{id}', [InvoiceController::class, 'view'])->defaults('_config', [ 'view' => 'admin::sales.invoices.view', ])->name('admin.sales.invoices.view'); - Route::get('/invoices/print/{id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@print')->defaults('_config', [ + Route::get('/invoices/print/{id}', [InvoiceController::class, 'print'])->defaults('_config', [ 'view' => 'admin::sales.invoices.print', ])->name('admin.sales.invoices.print'); // Sales Shipments Routes - Route::get('/shipments', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@index')->defaults('_config', [ + Route::get('/shipments', [ShipmentController::class, 'index'])->defaults('_config', [ 'view' => 'admin::sales.shipments.index', ])->name('admin.sales.shipments.index'); - Route::get('/shipments/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@create')->defaults('_config', [ + Route::get('/shipments/create/{order_id}', [ShipmentController::class, 'create'])->defaults('_config', [ 'view' => 'admin::sales.shipments.create', ])->name('admin.sales.shipments.create'); - Route::post('/shipments/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@store')->defaults('_config', [ + Route::post('/shipments/create/{order_id}', [ShipmentController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.sales.orders.view', ])->name('admin.sales.shipments.store'); - Route::get('/shipments/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@view')->defaults('_config', [ + Route::get('/shipments/view/{id}', [ShipmentController::class, 'view'])->defaults('_config', [ 'view' => 'admin::sales.shipments.view', ])->name('admin.sales.shipments.view'); // Sales Redunds Routes - Route::get('/refunds', 'Webkul\Admin\Http\Controllers\Sales\RefundController@index')->defaults('_config', [ + Route::get('/refunds', [RefundController::class, 'index'])->defaults('_config', [ 'view' => 'admin::sales.refunds.index', ])->name('admin.sales.refunds.index'); - Route::get('/refunds/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\RefundController@create')->defaults('_config', [ + Route::get('/refunds/create/{order_id}', [RefundController::class, 'create'])->defaults('_config', [ 'view' => 'admin::sales.refunds.create', ])->name('admin.sales.refunds.create'); - Route::post('/refunds/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\RefundController@store')->defaults('_config', [ + Route::post('/refunds/create/{order_id}', [RefundController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.sales.orders.view', ])->name('admin.sales.refunds.store'); - Route::post('/refunds/update-qty/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\RefundController@updateQty')->defaults('_config', [ + Route::post('/refunds/update-qty/{order_id}', [RefundController::class, 'updateQty'])->defaults('_config', [ 'redirect' => 'admin.sales.orders.view', ])->name('admin.sales.refunds.update_qty'); - Route::get('/refunds/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\RefundController@view')->defaults('_config', [ + Route::get('/refunds/view/{id}', [RefundController::class, 'view'])->defaults('_config', [ 'view' => 'admin::sales.refunds.view', ])->name('admin.sales.refunds.view'); // Sales Transactions Routes - Route::get('/transactions', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@index')->defaults('_config', [ + Route::get('/transactions', [TransactionController::class, 'index'])->defaults('_config', [ 'view' => 'admin::sales.transactions.index', ])->name('admin.sales.transactions.index'); - Route::get('/transactions/create', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@create')->defaults('_config', [ + Route::get('/transactions/create', [TransactionController::class, 'create'])->defaults('_config', [ 'view' => 'admin::sales.transactions.create', ])->name('admin.sales.transactions.create'); - Route::post('/transactions/create', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@store')->name('admin.sales.transactions.store'); + Route::post('/transactions/create', [TransactionController::class, 'store'])->name('admin.sales.transactions.store'); - Route::get('/transactions/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@view')->defaults('_config', [ + Route::get('/transactions/view/{id}', [TransactionController::class, 'view'])->defaults('_config', [ 'view' => 'admin::sales.transactions.view', ])->name('admin.sales.transactions.view'); }); // Catalog Routes Route::prefix('catalog')->group(function () { - Route::get('/sync', 'Webkul\Product\Http\Controllers\ProductController@sync'); + Route::get('/sync', [ProductController::class, 'sync']); // Catalog Product Routes - Route::get('/products', 'Webkul\Product\Http\Controllers\ProductController@index')->defaults('_config', [ + Route::get('/products', [ProductController::class, 'index'])->defaults('_config', [ 'view' => 'admin::catalog.products.index', ])->name('admin.catalog.products.index'); - Route::get('/products/create', 'Webkul\Product\Http\Controllers\ProductController@create')->defaults('_config', [ + Route::get('/products/create', [ProductController::class, 'create'])->defaults('_config', [ 'view' => 'admin::catalog.products.create', ])->name('admin.catalog.products.create'); - Route::post('/products/create', 'Webkul\Product\Http\Controllers\ProductController@store')->defaults('_config', [ + Route::post('/products/create', [ProductController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.catalog.products.edit', ])->name('admin.catalog.products.store'); - Route::get('products/copy/{id}', 'Webkul\Product\Http\Controllers\ProductController@copy')->defaults('_config', [ + Route::get('products/copy/{id}', [ProductController::class, 'copy'])->defaults('_config', [ 'view' => 'admin::catalog.products.edit', ])->name('admin.catalog.products.copy'); - Route::get('/products/edit/{id}', 'Webkul\Product\Http\Controllers\ProductController@edit')->defaults('_config', [ + Route::get('/products/edit/{id}', [ProductController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::catalog.products.edit', ])->name('admin.catalog.products.edit'); - Route::put('/products/edit/{id}', 'Webkul\Product\Http\Controllers\ProductController@update')->defaults('_config', [ + Route::put('/products/edit/{id}', [ProductController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.catalog.products.index', ])->name('admin.catalog.products.update'); - Route::put('/products/edit/{id}/inventories', 'Webkul\Product\Http\Controllers\ProductController@updateInventories')->defaults('_config', [ + Route::put('/products/edit/{id}/inventories', [ProductController::class, 'updateInventories'])->defaults('_config', [ 'redirect' => 'admin.catalog.products.index', ])->name('admin.catalog.products.update-inventories'); - Route::post('/products/upload-file/{id}', 'Webkul\Product\Http\Controllers\ProductController@uploadLink')->name('admin.catalog.products.upload_link'); + Route::post('/products/upload-file/{id}', [ProductController::class, 'uploadLink'])->name('admin.catalog.products.upload_link'); - Route::post('/products/upload-sample/{id}', 'Webkul\Product\Http\Controllers\ProductController@uploadSample')->name('admin.catalog.products.upload_sample'); + Route::post('/products/upload-sample/{id}', [ProductController::class, 'uploadSample'])->name('admin.catalog.products.upload_sample'); //product delete - Route::post('/products/delete/{id}', 'Webkul\Product\Http\Controllers\ProductController@destroy')->name('admin.catalog.products.delete'); + Route::post('/products/delete/{id}', [ProductController::class, 'destroy'])->name('admin.catalog.products.delete'); //product massaction - Route::post('products/massaction', 'Webkul\Product\Http\Controllers\ProductController@massActionHandler')->name('admin.catalog.products.massaction'); + Route::post('products/massaction', [ProductController::class, 'massActionHandler'])->name('admin.catalog.products.massaction'); //product massdelete - Route::post('products/massdelete', 'Webkul\Product\Http\Controllers\ProductController@massDestroy')->defaults('_config', [ + Route::post('products/massdelete', [ProductController::class, 'massDestroy'])->defaults('_config', [ 'redirect' => 'admin.catalog.products.index', ])->name('admin.catalog.products.massdelete'); //product massupdate - Route::post('products/massupdate', 'Webkul\Product\Http\Controllers\ProductController@massUpdate')->defaults('_config', [ + Route::post('products/massupdate', [ProductController::class, 'massUpdate'])->defaults('_config', [ 'redirect' => 'admin.catalog.products.index', ])->name('admin.catalog.products.massupdate'); //product search for linked products - Route::get('products/search', 'Webkul\Product\Http\Controllers\ProductController@productLinkSearch')->defaults('_config', [ + Route::get('products/search', [ProductController::class, 'productLinkSearch'])->defaults('_config', [ 'view' => 'admin::catalog.products.edit', ])->name('admin.catalog.products.productlinksearch'); - Route::get('products/search-simple-products', 'Webkul\Product\Http\Controllers\ProductController@searchSimpleProducts')->name('admin.catalog.products.search_simple_product'); + Route::get('products/search-simple-products', [ProductController::class, 'searchSimpleProducts'])->name('admin.catalog.products.search_simple_product'); - Route::get('/products/{id}/{attribute_id}', 'Webkul\Product\Http\Controllers\ProductController@download')->defaults('_config', [ + Route::get('/products/{id}/{attribute_id}', [ProductController::class, 'download'])->defaults('_config', [ 'view' => 'admin.catalog.products.edit', ])->name('admin.catalog.products.file.download'); // Catalog Category Routes - Route::get('/categories', 'Webkul\Category\Http\Controllers\CategoryController@index')->defaults('_config', [ + Route::get('/categories', [CategoryController::class, 'index'])->defaults('_config', [ 'view' => 'admin::catalog.categories.index', ])->name('admin.catalog.categories.index'); - Route::get('/categories/create', 'Webkul\Category\Http\Controllers\CategoryController@create')->defaults('_config', [ + Route::get('/categories/create', [CategoryController::class, 'create'])->defaults('_config', [ 'view' => 'admin::catalog.categories.create', ])->name('admin.catalog.categories.create'); - Route::post('/categories/create', 'Webkul\Category\Http\Controllers\CategoryController@store')->defaults('_config', [ + Route::post('/categories/create', [CategoryController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.catalog.categories.index', ])->name('admin.catalog.categories.store'); - Route::get('/categories/edit/{id}', 'Webkul\Category\Http\Controllers\CategoryController@edit')->defaults('_config', [ + Route::get('/categories/edit/{id}', [CategoryController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::catalog.categories.edit', ])->name('admin.catalog.categories.edit'); - Route::put('/categories/edit/{id}', 'Webkul\Category\Http\Controllers\CategoryController@update')->defaults('_config', [ + Route::put('/categories/edit/{id}', [CategoryController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.catalog.categories.index', ])->name('admin.catalog.categories.update'); - Route::post('/categories/delete/{id}', 'Webkul\Category\Http\Controllers\CategoryController@destroy')->name('admin.catalog.categories.delete'); + Route::post('/categories/delete/{id}', [CategoryController::class, 'destroy'])->name('admin.catalog.categories.delete'); //category massdelete - Route::post('categories/massdelete', 'Webkul\Category\Http\Controllers\CategoryController@massDestroy')->defaults('_config', [ + Route::post('categories/massdelete', [CategoryController::class, 'massDestroy'])->defaults('_config', [ 'redirect' => 'admin.catalog.categories.index', ])->name('admin.catalog.categories.massdelete'); - Route::post('/categories/product/count', 'Webkul\Category\Http\Controllers\CategoryController@categoryProductCount')->name('admin.catalog.categories.product.count'); + Route::post('/categories/product/count', [CategoryController::class, 'categoryProductCount'])->name('admin.catalog.categories.product.count'); // Catalog Attribute Routes - Route::get('/attributes', 'Webkul\Attribute\Http\Controllers\AttributeController@index')->defaults('_config', [ + Route::get('/attributes', [AttributeController::class, 'index'])->defaults('_config', [ 'view' => 'admin::catalog.attributes.index', ])->name('admin.catalog.attributes.index'); - Route::get('/attributes/{id}/options', 'Webkul\Attribute\Http\Controllers\AttributeController@getAttributeOptions')->defaults('_config', [ + Route::get('/attributes/{id}/options', [AttributeController::class, 'getAttributeOptions'])->defaults('_config', [ 'view' => 'admin::catalog.attributes.options', ])->name('admin.catalog.attributes.options'); - Route::get('/attributes/create', 'Webkul\Attribute\Http\Controllers\AttributeController@create')->defaults('_config', [ + Route::get('/attributes/create', [AttributeController::class, 'create'])->defaults('_config', [ 'view' => 'admin::catalog.attributes.create', ])->name('admin.catalog.attributes.create'); - Route::post('/attributes/create', 'Webkul\Attribute\Http\Controllers\AttributeController@store')->defaults('_config', [ + Route::post('/attributes/create', [AttributeController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.catalog.attributes.index', ])->name('admin.catalog.attributes.store'); - Route::get('/attributes/edit/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@edit')->defaults('_config', [ + Route::get('/attributes/edit/{id}', [AttributeController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::catalog.attributes.edit', ])->name('admin.catalog.attributes.edit'); - Route::put('/attributes/edit/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@update')->defaults('_config', [ + Route::put('/attributes/edit/{id}', [AttributeController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.catalog.attributes.index', ])->name('admin.catalog.attributes.update'); - Route::post('/attributes/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@destroy')->name('admin.catalog.attributes.delete'); + Route::post('/attributes/delete/{id}', [AttributeController::class, 'destroy'])->name('admin.catalog.attributes.delete'); - Route::post('/attributes/massdelete', 'Webkul\Attribute\Http\Controllers\AttributeController@massDestroy')->name('admin.catalog.attributes.massdelete'); + Route::post('/attributes/massdelete', [AttributeController::class, 'massDestroy'])->name('admin.catalog.attributes.massdelete'); // Catalog Family Routes - Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [ + Route::get('/families', [AttributeFamilyController::class, 'index'])->defaults('_config', [ 'view' => 'admin::catalog.families.index', ])->name('admin.catalog.families.index'); - Route::get('/families/create', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@create')->defaults('_config', [ + Route::get('/families/create', [AttributeFamilyController::class, 'create'])->defaults('_config', [ 'view' => 'admin::catalog.families.create', ])->name('admin.catalog.families.create'); - Route::post('/families/create', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@store')->defaults('_config', [ + Route::post('/families/create', [AttributeFamilyController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.catalog.families.index', ])->name('admin.catalog.families.store'); - Route::get('/families/edit/{id}', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@edit')->defaults('_config', [ + Route::get('/families/edit/{id}', [AttributeFamilyController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::catalog.families.edit', ])->name('admin.catalog.families.edit'); - Route::put('/families/edit/{id}', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@update')->defaults('_config', [ + Route::put('/families/edit/{id}', [AttributeFamilyController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.catalog.families.index', ])->name('admin.catalog.families.update'); - Route::post('/families/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@destroy')->name('admin.catalog.families.delete'); + Route::post('/families/delete/{id}', [AttributeFamilyController::class, 'destroy'])->name('admin.catalog.families.delete'); }); // User Routes //datagrid for backend users - Route::get('/users', 'Webkul\User\Http\Controllers\UserController@index')->defaults('_config', [ + Route::get('/users', [UserController::class, 'index'])->defaults('_config', [ 'view' => 'admin::users.users.index', ])->name('admin.users.index'); //create backend user get - Route::get('/users/create', 'Webkul\User\Http\Controllers\UserController@create')->defaults('_config', [ + Route::get('/users/create', [UserController::class, 'create'])->defaults('_config', [ 'view' => 'admin::users.users.create', ])->name('admin.users.create'); //create backend user post - Route::post('/users/create', 'Webkul\User\Http\Controllers\UserController@store')->defaults('_config', [ + Route::post('/users/create', [UserController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.users.index', ])->name('admin.users.store'); //delete backend user view - Route::get('/users/edit/{id}', 'Webkul\User\Http\Controllers\UserController@edit')->defaults('_config', [ + Route::get('/users/edit/{id}', [UserController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::users.users.edit', ])->name('admin.users.edit'); //edit backend user submit - Route::put('/users/edit/{id}', 'Webkul\User\Http\Controllers\UserController@update')->defaults('_config', [ + Route::put('/users/edit/{id}', [UserController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.users.index', ])->name('admin.users.update'); //delete backend user - Route::post('/users/delete/{id}', 'Webkul\User\Http\Controllers\UserController@destroy')->name('admin.users.delete'); + Route::post('/users/delete/{id}', [UserController::class, 'destroy'])->name('admin.users.delete'); - Route::get('/users/confirm/{id}', 'Webkul\User\Http\Controllers\UserController@confirm')->defaults('_config', [ + Route::get('/users/confirm/{id}', [UserController::class, 'confirm'])->defaults('_config', [ 'view' => 'admin::customers.confirm-password', ])->name('super.users.confirm'); - Route::post('/users/confirm/{id}', 'Webkul\User\Http\Controllers\UserController@destroySelf')->defaults('_config', [ + Route::post('/users/confirm/{id}', [UserController::class, 'destroySelf'])->defaults('_config', [ 'redirect' => 'admin.users.index', ])->name('admin.users.destroy'); // User Role Routes - Route::get('/roles', 'Webkul\User\Http\Controllers\RoleController@index')->defaults('_config', [ + Route::get('/roles', [RoleController::class, 'index'])->defaults('_config', [ 'view' => 'admin::users.roles.index', ])->name('admin.roles.index'); - Route::get('/roles/create', 'Webkul\User\Http\Controllers\RoleController@create')->defaults('_config', [ + Route::get('/roles/create', [RoleController::class, 'create'])->defaults('_config', [ 'view' => 'admin::users.roles.create', ])->name('admin.roles.create'); - Route::post('/roles/create', 'Webkul\User\Http\Controllers\RoleController@store')->defaults('_config', [ + Route::post('/roles/create', [RoleController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.roles.index', ])->name('admin.roles.store'); - Route::get('/roles/edit/{id}', 'Webkul\User\Http\Controllers\RoleController@edit')->defaults('_config', [ + Route::get('/roles/edit/{id}', [RoleController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::users.roles.edit', ])->name('admin.roles.edit'); - Route::put('/roles/edit/{id}', 'Webkul\User\Http\Controllers\RoleController@update')->defaults('_config', [ + Route::put('/roles/edit/{id}', [RoleController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.roles.index', ])->name('admin.roles.update'); - Route::post('/roles/delete/{id}', 'Webkul\User\Http\Controllers\RoleController@destroy')->name('admin.roles.delete'); + Route::post('/roles/delete/{id}', [RoleController::class, 'destroy'])->name('admin.roles.delete'); // Locale Routes - Route::get('/locales', 'Webkul\Core\Http\Controllers\LocaleController@index')->defaults('_config', [ + Route::get('/locales', [LocaleController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.locales.index', ])->name('admin.locales.index'); - Route::get('/locales/create', 'Webkul\Core\Http\Controllers\LocaleController@create')->defaults('_config', [ + Route::get('/locales/create', [LocaleController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.locales.create', ])->name('admin.locales.create'); - Route::post('/locales/create', 'Webkul\Core\Http\Controllers\LocaleController@store')->defaults('_config', [ + Route::post('/locales/create', [LocaleController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.locales.index', ])->name('admin.locales.store'); - Route::get('/locales/edit/{id}', 'Webkul\Core\Http\Controllers\LocaleController@edit')->defaults('_config', [ + Route::get('/locales/edit/{id}', [LocaleController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.locales.edit', ])->name('admin.locales.edit'); - Route::put('/locales/edit/{id}', 'Webkul\Core\Http\Controllers\LocaleController@update')->defaults('_config', [ + Route::put('/locales/edit/{id}', [LocaleController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.locales.index', ])->name('admin.locales.update'); - Route::post('/locales/delete/{id}', 'Webkul\Core\Http\Controllers\LocaleController@destroy')->name('admin.locales.delete'); + Route::post('/locales/delete/{id}', [LocaleController::class, 'destroy'])->name('admin.locales.delete'); // Currency Routes - Route::get('/currencies', 'Webkul\Core\Http\Controllers\CurrencyController@index')->defaults('_config', [ + Route::get('/currencies', [CurrencyController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.currencies.index', ])->name('admin.currencies.index'); - Route::get('/currencies/create', 'Webkul\Core\Http\Controllers\CurrencyController@create')->defaults('_config', [ + Route::get('/currencies/create', [CurrencyController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.currencies.create', ])->name('admin.currencies.create'); - Route::post('/currencies/create', 'Webkul\Core\Http\Controllers\CurrencyController@store')->defaults('_config', [ + Route::post('/currencies/create', [CurrencyController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.currencies.index', ])->name('admin.currencies.store'); - Route::get('/currencies/edit/{id}', 'Webkul\Core\Http\Controllers\CurrencyController@edit')->defaults('_config', [ + Route::get('/currencies/edit/{id}', [CurrencyController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.currencies.edit', ])->name('admin.currencies.edit'); - Route::put('/currencies/edit/{id}', 'Webkul\Core\Http\Controllers\CurrencyController@update')->defaults('_config', [ + Route::put('/currencies/edit/{id}', [CurrencyController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.currencies.index', ])->name('admin.currencies.update'); - Route::post('/currencies/delete/{id}', 'Webkul\Core\Http\Controllers\CurrencyController@destroy')->name('admin.currencies.delete'); + Route::post('/currencies/delete/{id}', [CurrencyController::class, 'destroy'])->name('admin.currencies.delete'); - Route::post('/currencies/massdelete', 'Webkul\Core\Http\Controllers\CurrencyController@massDestroy')->name('admin.currencies.massdelete'); + Route::post('/currencies/massdelete', [CurrencyController::class, 'massDestroy'])->name('admin.currencies.massdelete'); // Exchange Rates Routes - Route::get('/exchange_rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@index')->defaults('_config', [ + Route::get('/exchange_rates', [ExchangeRateController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.exchange_rates.index', ])->name('admin.exchange_rates.index'); - Route::get('/exchange_rates/create', 'Webkul\Core\Http\Controllers\ExchangeRateController@create')->defaults('_config', [ + Route::get('/exchange_rates/create', [ExchangeRateController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.exchange_rates.create', ])->name('admin.exchange_rates.create'); - Route::post('/exchange_rates/create', 'Webkul\Core\Http\Controllers\ExchangeRateController@store')->defaults('_config', [ + Route::post('/exchange_rates/create', [ExchangeRateController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.exchange_rates.index', ])->name('admin.exchange_rates.store'); - Route::get('/exchange_rates/edit/{id}', 'Webkul\Core\Http\Controllers\ExchangeRateController@edit')->defaults('_config', [ + Route::get('/exchange_rates/edit/{id}', [ExchangeRateController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.exchange_rates.edit', ])->name('admin.exchange_rates.edit'); - Route::get('/exchange_rates/update-rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@updateRates')->name('admin.exchange_rates.update_rates'); + Route::get('/exchange_rates/update-rates', [ExchangeRateController::class, 'updateRates'])->name('admin.exchange_rates.update_rates'); - Route::put('/exchange_rates/edit/{id}', 'Webkul\Core\Http\Controllers\ExchangeRateController@update')->defaults('_config', [ + Route::put('/exchange_rates/edit/{id}', [ExchangeRateController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.exchange_rates.index', ])->name('admin.exchange_rates.update'); - Route::post('/exchange_rates/delete/{id}', 'Webkul\Core\Http\Controllers\ExchangeRateController@destroy')->name('admin.exchange_rates.delete'); + Route::post('/exchange_rates/delete/{id}', [ExchangeRateController::class, 'destroy'])->name('admin.exchange_rates.delete'); // Inventory Source Routes - Route::get('/inventory_sources', 'Webkul\Inventory\Http\Controllers\InventorySourceController@index')->defaults('_config', [ + Route::get('/inventory_sources', [InventorySourceController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.inventory_sources.index', ])->name('admin.inventory_sources.index'); - Route::get('/inventory_sources/create', 'Webkul\Inventory\Http\Controllers\InventorySourceController@create')->defaults('_config', [ + Route::get('/inventory_sources/create', [InventorySourceController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.inventory_sources.create', ])->name('admin.inventory_sources.create'); - Route::post('/inventory_sources/create', 'Webkul\Inventory\Http\Controllers\InventorySourceController@store')->defaults('_config', [ + Route::post('/inventory_sources/create', [InventorySourceController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.inventory_sources.index', ])->name('admin.inventory_sources.store'); - Route::get('/inventory_sources/edit/{id}', 'Webkul\Inventory\Http\Controllers\InventorySourceController@edit')->defaults('_config', [ + Route::get('/inventory_sources/edit/{id}', [InventorySourceController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.inventory_sources.edit', ])->name('admin.inventory_sources.edit'); - Route::put('/inventory_sources/edit/{id}', 'Webkul\Inventory\Http\Controllers\InventorySourceController@update')->defaults('_config', [ + Route::put('/inventory_sources/edit/{id}', [InventorySourceController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.inventory_sources.index', ])->name('admin.inventory_sources.update'); - Route::post('/inventory_sources/delete/{id}', 'Webkul\Inventory\Http\Controllers\InventorySourceController@destroy')->name('admin.inventory_sources.delete'); + Route::post('/inventory_sources/delete/{id}', [InventorySourceController::class, 'destroy'])->name('admin.inventory_sources.delete'); // Channel Routes - Route::get('/channels', 'Webkul\Core\Http\Controllers\ChannelController@index')->defaults('_config', [ + Route::get('/channels', [ChannelController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.channels.index', ])->name('admin.channels.index'); - Route::get('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@create')->defaults('_config', [ + Route::get('/channels/create', [ChannelController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.channels.create', ])->name('admin.channels.create'); - Route::post('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@store')->defaults('_config', [ + Route::post('/channels/create', [ChannelController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.channels.index', ])->name('admin.channels.store'); - Route::get('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@edit')->defaults('_config', [ + Route::get('/channels/edit/{id}', [ChannelController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.channels.edit', ])->name('admin.channels.edit'); - Route::put('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@update')->defaults('_config', [ + Route::put('/channels/edit/{id}', [ChannelController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.channels.index', ])->name('admin.channels.update'); - Route::post('/channels/delete/{id}', 'Webkul\Core\Http\Controllers\ChannelController@destroy')->name('admin.channels.delete'); + Route::post('/channels/delete/{id}', [ChannelController::class, 'destroy'])->name('admin.channels.delete'); // Admin Profile route - Route::get('/account', 'Webkul\User\Http\Controllers\AccountController@edit')->defaults('_config', [ + Route::get('/account', [AccountController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::account.edit', ])->name('admin.account.edit'); - Route::put('/account', 'Webkul\User\Http\Controllers\AccountController@update')->name('admin.account.update'); + Route::put('/account', [AccountController::class, 'update'])->name('admin.account.update'); //slider index - Route::get('/slider', 'Webkul\Core\Http\Controllers\SliderController@index')->defaults('_config', [ + Route::get('/slider', [SliderController::class, 'index'])->defaults('_config', [ 'view' => 'admin::settings.sliders.index', ])->name('admin.sliders.index'); //slider create show - Route::get('slider/create', 'Webkul\Core\Http\Controllers\SliderController@create')->defaults('_config', [ + Route::get('slider/create', [SliderController::class, 'create'])->defaults('_config', [ 'view' => 'admin::settings.sliders.create', ])->name('admin.sliders.create'); //slider create show - Route::post('slider/create', 'Webkul\Core\Http\Controllers\SliderController@store')->defaults('_config', [ + Route::post('slider/create', [SliderController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.sliders.index', ])->name('admin.sliders.store'); //slider edit show - Route::get('slider/edit/{id}', 'Webkul\Core\Http\Controllers\SliderController@edit')->defaults('_config', [ + Route::get('slider/edit/{id}', [SliderController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::settings.sliders.edit', ])->name('admin.sliders.edit'); //slider edit update - Route::post('slider/edit/{id}', 'Webkul\Core\Http\Controllers\SliderController@update')->defaults('_config', [ + Route::post('slider/edit/{id}', [SliderController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.sliders.index', ])->name('admin.sliders.update'); //destroy a slider item - Route::post('slider/delete/{id}', 'Webkul\Core\Http\Controllers\SliderController@destroy')->name('admin.sliders.delete'); + Route::post('slider/delete/{id}', [SliderController::class, 'destroy'])->name('admin.sliders.delete'); //tax routes - Route::get('/tax-categories', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [ + Route::get('/tax-categories', [TaxController::class, 'index'])->defaults('_config', [ 'view' => 'admin::tax.tax-categories.index', ])->name('admin.tax-categories.index'); // tax category routes - Route::get('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [ + Route::get('/tax-categories/create', [TaxCategoryController::class, 'show'])->defaults('_config', [ 'view' => 'admin::tax.tax-categories.create', ])->name('admin.tax-categories.create'); - Route::post('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@create')->defaults('_config', [ + Route::post('/tax-categories/create', [TaxCategoryController::class, 'create'])->defaults('_config', [ 'redirect' => 'admin.tax-categories.index', ])->name('admin.tax-categories.store'); - Route::get('/tax-categories/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@edit')->defaults('_config', [ + Route::get('/tax-categories/edit/{id}', [TaxCategoryController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::tax.tax-categories.edit', ])->name('admin.tax-categories.edit'); - Route::put('/tax-categories/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@update')->defaults('_config', [ + Route::put('/tax-categories/edit/{id}', [TaxCategoryController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.tax-categories.index', ])->name('admin.tax-categories.update'); - Route::post('/tax-categories/delete/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@destroy')->name('admin.tax-categories.delete'); + Route::post('/tax-categories/delete/{id}', [TaxCategoryController::class, 'destroy'])->name('admin.tax-categories.delete'); //tax category ends //tax rate - Route::get('tax-rates', 'Webkul\Tax\Http\Controllers\TaxRateController@index')->defaults('_config', [ + Route::get('tax-rates', [TaxRateController::class, 'index'])->defaults('_config', [ 'view' => 'admin::tax.tax-rates.index', ])->name('admin.tax-rates.index'); - Route::get('tax-rates/create', 'Webkul\Tax\Http\Controllers\TaxRateController@show')->defaults('_config', [ + Route::get('tax-rates/create', [TaxRateController::class, 'show'])->defaults('_config', [ 'view' => 'admin::tax.tax-rates.create', ])->name('admin.tax-rates.create'); - Route::post('tax-rates/create', 'Webkul\Tax\Http\Controllers\TaxRateController@create')->defaults('_config', [ + Route::post('tax-rates/create', [TaxRateController::class, 'create'])->defaults('_config', [ 'redirect' => 'admin.tax-rates.index', ])->name('admin.tax-rates.store'); - Route::get('tax-rates/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@edit')->defaults('_config', [ + Route::get('tax-rates/edit/{id}', [TaxRateController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::tax.tax-rates.edit', ])->name('admin.tax-rates.edit'); - Route::put('tax-rates/update/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@update')->defaults('_config', [ + Route::put('tax-rates/update/{id}', [TaxRateController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.tax-rates.index', ])->name('admin.tax-rates.update'); - Route::post('/tax-rates/delete/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@destroy')->name('admin.tax-rates.delete'); + Route::post('/tax-rates/delete/{id}', [TaxRateController::class, 'destroy'])->name('admin.tax-rates.delete'); - Route::post('/tax-rates/import', 'Webkul\Tax\Http\Controllers\TaxRateController@import')->defaults('_config', [ + Route::post('/tax-rates/import', [TaxRateController::class, 'import'])->defaults('_config', [ 'redirect' => 'admin.tax-rates.index', ])->name('admin.tax-rates.import'); //tax rate ends //DataGrid Export - Route::post(config('app.admin_url') . '/export', 'Webkul\Admin\Http\Controllers\ExportController@export')->name('admin.datagrid.export'); + Route::post(config('app.admin_url') . '/export', [ExportController::class, 'export'])->name('admin.datagrid.export'); Route::prefix('promotions')->group(function () { - Route::get('cart-rules', 'Webkul\CartRule\Http\Controllers\CartRuleController@index')->defaults('_config', [ + Route::get('cart-rules', [CartRuleController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.cart-rules.index', ])->name('admin.cart-rules.index'); - Route::get('cart-rules/create', 'Webkul\CartRule\Http\Controllers\CartRuleController@create')->defaults('_config', [ + Route::get('cart-rules/create', [CartRuleController::class, 'create'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.cart-rules.create', ])->name('admin.cart-rules.create'); - Route::post('cart-rules/create', 'Webkul\CartRule\Http\Controllers\CartRuleController@store')->defaults('_config', [ + Route::post('cart-rules/create', [CartRuleController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.cart-rules.index', ])->name('admin.cart-rules.store'); - Route::get('cart-rules/copy/{id}', 'Webkul\CartRule\Http\Controllers\CartRuleController@copy')->defaults('_config', [ + Route::get('cart-rules/copy/{id}', [CartRuleController::class, 'copy'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.cart-rules.edit', ])->name('admin.cart-rules.copy'); - Route::get('cart-rules/edit/{id}', 'Webkul\CartRule\Http\Controllers\CartRuleController@edit')->defaults('_config', [ + Route::get('cart-rules/edit/{id}', [CartRuleController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.cart-rules.edit', ])->name('admin.cart-rules.edit'); - Route::post('cart-rules/edit/{id}', 'Webkul\CartRule\Http\Controllers\CartRuleController@update')->defaults('_config', [ + Route::post('cart-rules/edit/{id}', [CartRuleController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.cart-rules.index', ])->name('admin.cart-rules.update'); - Route::post('cart-rules/delete/{id}', 'Webkul\CartRule\Http\Controllers\CartRuleController@destroy')->name('admin.cart-rules.delete'); + Route::post('cart-rules/delete/{id}', [CartRuleController::class, 'destroy'])->name('admin.cart-rules.delete'); - Route::post('cart-rules/generate-coupons/{id?}', 'Webkul\CartRule\Http\Controllers\CartRuleController@generateCoupons')->name('admin.cart-rules.generate-coupons'); + Route::post('cart-rules/generate-coupons/{id?}', [CartRuleController::class, 'generateCoupons'])->name('admin.cart-rules.generate-coupons'); - Route::post('/massdelete', 'Webkul\CartRule\Http\Controllers\CartRuleCouponController@massDelete')->name('admin.cart-rule-coupons.mass-delete'); + Route::post('/massdelete', [CartRuleCouponController::class, 'massDelete'])->name('admin.cart-rule-coupons.mass-delete'); //Catalog rules - Route::get('catalog-rules', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@index')->defaults('_config', [ + Route::get('catalog-rules', [CatalogRuleController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.catalog-rules.index', ])->name('admin.catalog-rules.index'); - Route::get('catalog-rules/create', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@create')->defaults('_config', [ + Route::get('catalog-rules/create', [CatalogRuleController::class, 'create'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.catalog-rules.create', ])->name('admin.catalog-rules.create'); - Route::post('catalog-rules/create', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@store')->defaults('_config', [ + Route::post('catalog-rules/create', [CatalogRuleController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.catalog-rules.index', ])->name('admin.catalog-rules.store'); - Route::get('catalog-rules/edit/{id}', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@edit')->defaults('_config', [ + Route::get('catalog-rules/edit/{id}', [CatalogRuleController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.promotions.catalog-rules.edit', ])->name('admin.catalog-rules.edit'); - Route::post('catalog-rules/edit/{id}', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@update')->defaults('_config', [ + Route::post('catalog-rules/edit/{id}', [CatalogRuleController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.catalog-rules.index', ])->name('admin.catalog-rules.update'); - Route::post('catalog-rules/delete/{id}', 'Webkul\CatalogRule\Http\Controllers\CatalogRuleController@destroy')->name('admin.catalog-rules.delete'); + Route::post('catalog-rules/delete/{id}', [CatalogRuleController::class, 'destroy'])->name('admin.catalog-rules.delete'); //Marketing campaigns routes - Route::get('campaigns', 'Webkul\Marketing\Http\Controllers\CampaignController@index')->defaults('_config', [ + Route::get('campaigns', [CampaignController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.campaigns.index', ])->name('admin.campaigns.index'); - Route::get('campaigns/create', 'Webkul\Marketing\Http\Controllers\CampaignController@create')->defaults('_config', [ + Route::get('campaigns/create', [CampaignController::class, 'create'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.campaigns.create', ])->name('admin.campaigns.create'); - Route::post('campaigns/create', 'Webkul\Marketing\Http\Controllers\CampaignController@store')->defaults('_config', [ + Route::post('campaigns/create', [CampaignController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.campaigns.index', ])->name('admin.campaigns.store'); - Route::get('campaigns/edit/{id}', 'Webkul\Marketing\Http\Controllers\CampaignController@edit')->defaults('_config', [ + Route::get('campaigns/edit/{id}', [CampaignController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.campaigns.edit', ])->name('admin.campaigns.edit'); - Route::post('campaigns/edit/{id}', 'Webkul\Marketing\Http\Controllers\CampaignController@update')->defaults('_config', [ + Route::post('campaigns/edit/{id}', [CampaignController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.campaigns.index', ])->name('admin.campaigns.update'); - Route::post('campaigns/delete/{id}', 'Webkul\Marketing\Http\Controllers\CampaignController@destroy')->name('admin.campaigns.delete'); + Route::post('campaigns/delete/{id}', [CampaignController::class, 'destroy'])->name('admin.campaigns.delete'); //Marketing emails templates routes - Route::get('email-templates', 'Webkul\Marketing\Http\Controllers\TemplateController@index')->defaults('_config', [ + Route::get('email-templates', [TemplateController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.templates.index', ])->name('admin.email-templates.index'); - Route::get('email-templates/create', 'Webkul\Marketing\Http\Controllers\TemplateController@create')->defaults('_config', [ + Route::get('email-templates/create', [TemplateController::class, 'create'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.templates.create', ])->name('admin.email-templates.create'); - Route::post('email-templates/create', 'Webkul\Marketing\Http\Controllers\TemplateController@store')->defaults('_config', [ + Route::post('email-templates/create', [TemplateController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.email-templates.index', ])->name('admin.email-templates.store'); - Route::get('email-templates/edit/{id}', 'Webkul\Marketing\Http\Controllers\TemplateController@edit')->defaults('_config', [ + Route::get('email-templates/edit/{id}', [TemplateController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.templates.edit', ])->name('admin.email-templates.edit'); - Route::post('email-templates/edit/{id}', 'Webkul\Marketing\Http\Controllers\TemplateController@update')->defaults('_config', [ + Route::post('email-templates/edit/{id}', [TemplateController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.email-templates.index', ])->name('admin.email-templates.update'); - Route::post('email-templates/delete/{id}', 'Webkul\Marketing\Http\Controllers\TemplateController@destroy')->name('admin.email-templates.delete'); + Route::post('email-templates/delete/{id}', [TemplateController::class, 'destroy'])->name('admin.email-templates.delete'); //Marketing events routes - Route::get('events', 'Webkul\Marketing\Http\Controllers\EventController@index')->defaults('_config', [ + Route::get('events', [EventController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.events.index', ])->name('admin.events.index'); - Route::get('events/create', 'Webkul\Marketing\Http\Controllers\EventController@create')->defaults('_config', [ + Route::get('events/create', [EventController::class, 'create'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.events.create', ])->name('admin.events.create'); - Route::post('events/create', 'Webkul\Marketing\Http\Controllers\EventController@store')->defaults('_config', [ + Route::post('events/create', [EventController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.events.index', ])->name('admin.events.store'); - Route::get('events/edit/{id}', 'Webkul\Marketing\Http\Controllers\EventController@edit')->defaults('_config', [ + Route::get('events/edit/{id}', [EventController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.events.edit', ])->name('admin.events.edit'); - Route::post('events/edit/{id}', 'Webkul\Marketing\Http\Controllers\EventController@update')->defaults('_config', [ + Route::post('events/edit/{id}', [EventController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.events.index', ])->name('admin.events.update'); - Route::post('events/delete/{id}', 'Webkul\Marketing\Http\Controllers\EventController@destroy')->name('admin.events.delete'); + Route::post('events/delete/{id}', [EventController::class, 'destroy'])->name('admin.events.delete'); // Admin Store Front Settings Route - Route::get('/subscribers', 'Webkul\Core\Http\Controllers\SubscriptionController@index')->defaults('_config', [ + Route::get('/subscribers', [SubscriptionController::class, 'index'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.subscribers.index', ])->name('admin.customers.subscribers.index'); //destroy a newsletter subscription item - Route::post('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy')->name('admin.customers.subscribers.delete'); + Route::post('subscribers/delete/{id}', [SubscriptionController::class, 'destroy'])->name('admin.customers.subscribers.delete'); - Route::get('subscribers/edit/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@edit')->defaults('_config', [ + Route::get('subscribers/edit/{id}', [SubscriptionController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::marketing.email-marketing.subscribers.edit', ])->name('admin.customers.subscribers.edit'); - Route::put('subscribers/update/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@update')->defaults('_config', [ + Route::put('subscribers/update/{id}', [SubscriptionController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.customers.subscribers.index', ])->name('admin.customers.subscribers.update'); }); Route::prefix('cms')->group(function () { - Route::get('/', 'Webkul\CMS\Http\Controllers\Admin\PageController@index')->defaults('_config', [ + Route::get('/', [PageController::class, 'index'])->defaults('_config', [ 'view' => 'admin::cms.index', ])->name('admin.cms.index'); - Route::get('create', 'Webkul\CMS\Http\Controllers\Admin\PageController@create')->defaults('_config', [ + Route::get('create', [PageController::class, 'create'])->defaults('_config', [ 'view' => 'admin::cms.create', ])->name('admin.cms.create'); - Route::post('create', 'Webkul\CMS\Http\Controllers\Admin\PageController@store')->defaults('_config', [ + Route::post('create', [PageController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.cms.index', ])->name('admin.cms.store'); - Route::get('edit/{id}', 'Webkul\CMS\Http\Controllers\Admin\PageController@edit')->defaults('_config', [ + Route::get('edit/{id}', [PageController::class, 'edit'])->defaults('_config', [ 'view' => 'admin::cms.edit', ])->name('admin.cms.edit'); - Route::post('edit/{id}', 'Webkul\CMS\Http\Controllers\Admin\PageController@update')->defaults('_config', [ + Route::post('edit/{id}', [PageController::class, 'update'])->defaults('_config', [ 'redirect' => 'admin.cms.index', ])->name('admin.cms.update'); - Route::post('/delete/{id}', 'Webkul\CMS\Http\Controllers\Admin\PageController@delete')->defaults('_config', [ + Route::post('/delete/{id}', [PageController::class, 'delete'])->defaults('_config', [ 'redirect' => 'admin.cms.index', ])->name('admin.cms.delete'); - Route::post('/massdelete', 'Webkul\CMS\Http\Controllers\Admin\PageController@massDelete')->defaults('_config', [ + Route::post('/massdelete', [PageController::class, 'massDelete'])->defaults('_config', [ 'redirect' => 'admin.cms.index', ])->name('admin.cms.mass-delete'); diff --git a/packages/Webkul/BookingProduct/src/Http/front-routes.php b/packages/Webkul/BookingProduct/src/Http/front-routes.php index 2cb3a4186..1d130d823 100644 --- a/packages/Webkul/BookingProduct/src/Http/front-routes.php +++ b/packages/Webkul/BookingProduct/src/Http/front-routes.php @@ -1,5 +1,8 @@ ['web', 'theme', 'locale', 'currency']], function () { - Route::get('/booking-slots/{id}', 'Webkul\BookingProduct\Http\Controllers\Shop\BookingProductController@index')->name('booking_product.slots.index'); + Route::get('/booking-slots/{id}', [BookingProductController::class, 'index'])->name('booking_product.slots.index'); }); \ No newline at end of file diff --git a/packages/Webkul/Paypal/src/Http/routes.php b/packages/Webkul/Paypal/src/Http/routes.php index 03b529121..6a5a53098 100755 --- a/packages/Webkul/Paypal/src/Http/routes.php +++ b/packages/Webkul/Paypal/src/Http/routes.php @@ -1,19 +1,23 @@ ['web']], function () { Route::prefix('paypal/standard')->group(function () { - Route::get('/redirect', 'Webkul\Paypal\Http\Controllers\StandardController@redirect')->name('paypal.standard.redirect'); + Route::get('/redirect', [StandardController::class, 'redirect'])->name('paypal.standard.redirect'); - Route::get('/success', 'Webkul\Paypal\Http\Controllers\StandardController@success')->name('paypal.standard.success'); + Route::get('/success', [StandardController::class, 'success'])->name('paypal.standard.success'); - Route::get('/cancel', 'Webkul\Paypal\Http\Controllers\StandardController@cancel')->name('paypal.standard.cancel'); + Route::get('/cancel', [StandardController::class, 'cancel'])->name('paypal.standard.cancel'); }); Route::prefix('paypal/smart-button')->group(function () { - Route::get('/create-order', 'Webkul\Paypal\Http\Controllers\SmartButtonController@createOrder')->name('paypal.smart-button.create-order'); + Route::get('/create-order', [SmartButtonController::class, 'createOrder'])->name('paypal.smart-button.create-order'); - Route::post('/capture-order', 'Webkul\Paypal\Http\Controllers\SmartButtonController@captureOrder')->name('paypal.smart-button.capture-order'); + Route::post('/capture-order', [SmartButtonController::class, 'captureOrder'])->name('paypal.smart-button.capture-order'); }); }); -Route::post('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn'); +Route::post('paypal/standard/ipn', [StandardController::class, 'ipn'])->name('paypal.standard.ipn'); diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index edb29e764..7822f8f6a 100755 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -1,40 +1,61 @@ ['web', 'locale', 'theme', 'currency']], function () { /** * Store front home. */ - Route::get('/', 'Webkul\Shop\Http\Controllers\HomeController@index')->defaults('_config', [ + Route::get('/', [HomeController::class, 'index'])->defaults('_config', [ 'view' => 'shop::home.index' ])->name('shop.home.index'); /** * Store front search. */ - Route::get('/search', 'Webkul\Shop\Http\Controllers\SearchController@index')->defaults('_config', [ + Route::get('/search', [SearchController::class, 'index'])->defaults('_config', [ 'view' => 'shop::search.search' ])->name('shop.search.index'); - Route::post('/upload-search-image', 'Webkul\Shop\Http\Controllers\HomeController@upload')->name('shop.image.search.upload'); + Route::post('/upload-search-image', [HomeController::class, 'upload'])->name('shop.image.search.upload'); /** * Subscription. */ - Route::get('/subscribe', 'Webkul\Shop\Http\Controllers\SubscriptionController@subscribe')->name('shop.subscribe'); + Route::get('/subscribe', [SubscriptionController::class, 'subscribe'])->name('shop.subscribe'); - Route::get('/unsubscribe/{token}', 'Webkul\Shop\Http\Controllers\SubscriptionController@unsubscribe')->name('shop.unsubscribe'); + Route::get('/unsubscribe/{token}', [SubscriptionController::class, 'unsubscribe'])->name('shop.unsubscribe'); /** * Country-State selector. */ - Route::get('get/countries', 'Webkul\Core\Http\Controllers\CountryStateController@getCountries')->defaults('_config', [ + Route::get('get/countries', [CountryStateController::class, 'getCountries'])->defaults('_config', [ 'view' => 'shop::test' ])->name('get.countries'); /** * Get States when Country is passed. */ - Route::get('get/states/{country}', 'Webkul\Core\Http\Controllers\CountryStateController@getStates')->defaults('_config', [ + Route::get('get/states/{country}', [CountryStateController::class, 'getStates'])->defaults('_config', [ 'view' => 'shop::test' ])->name('get.states'); @@ -42,62 +63,62 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function * Cart, coupons and checkout. */ // Cart items listing. - Route::get('checkout/cart', 'Webkul\Shop\Http\Controllers\CartController@index')->defaults('_config', [ + Route::get('checkout/cart', [CartController::class, 'index'])->defaults('_config', [ 'view' => 'shop::checkout.cart.index' ])->name('shop.checkout.cart.index'); // Add cart items. - Route::post('checkout/cart/add/{id}', 'Webkul\Shop\Http\Controllers\CartController@add')->defaults('_config', [ + Route::post('checkout/cart/add/{id}', [CartController::class, 'add'])->defaults('_config', [ 'redirect' => 'shop.checkout.cart.index' ])->name('cart.add'); // Cart items remove. - Route::get('checkout/cart/remove/{id}', 'Webkul\Shop\Http\Controllers\CartController@remove')->name('cart.remove'); + Route::get('checkout/cart/remove/{id}', [CartController::class, 'remove'])->name('cart.remove'); // Cart update before checkout. - Route::post('/checkout/cart', 'Webkul\Shop\Http\Controllers\CartController@updateBeforeCheckout')->defaults('_config', [ + Route::post('/checkout/cart', [CartController::class, 'updateBeforeCheckout'])->defaults('_config', [ 'redirect' => 'shop.checkout.cart.index' ])->name('shop.checkout.cart.update'); // Cart items remove. - Route::get('/checkout/cart/remove/{id}', 'Webkul\Shop\Http\Controllers\CartController@remove')->defaults('_config', [ + Route::get('/checkout/cart/remove/{id}', [CartController::class, 'remove'])->defaults('_config', [ 'redirect' => 'shop.checkout.cart.index' ])->name('shop.checkout.cart.remove'); // Move item to wishlist from cart. - Route::post('move/wishlist/{id}', 'Webkul\Shop\Http\Controllers\CartController@moveToWishlist')->name('shop.movetowishlist'); + Route::post('move/wishlist/{id}', [CartController::class, 'moveToWishlist'])->name('shop.movetowishlist'); // Apply coupons. - Route::post('checkout/cart/coupon', 'Webkul\Shop\Http\Controllers\CartController@applyCoupon')->name('shop.checkout.cart.coupon.apply'); + Route::post('checkout/cart/coupon', [CartController::class, 'applyCoupon'])->name('shop.checkout.cart.coupon.apply'); // Remove coupons. - Route::delete('checkout/cart/coupon', 'Webkul\Shop\Http\Controllers\CartController@removeCoupon')->name('shop.checkout.coupon.remove.coupon'); + Route::delete('checkout/cart/coupon', [CartController::class, 'removeCoupon'])->name('shop.checkout.coupon.remove.coupon'); // Checkout index page. - Route::get('/checkout/onepage', 'Webkul\Shop\Http\Controllers\OnepageController@index')->defaults('_config', [ + Route::get('/checkout/onepage', [OnepageController::class, 'index'])->defaults('_config', [ 'view' => 'shop::checkout.onepage' ])->name('shop.checkout.onepage.index'); // Checkout get summary. - Route::get('/checkout/summary', 'Webkul\Shop\Http\Controllers\OnepageController@summary')->name('shop.checkout.summary'); + Route::get('/checkout/summary',[OnepageController::class, 'summary'])->name('shop.checkout.summary'); // Checkout save address form. - Route::post('/checkout/save-address', 'Webkul\Shop\Http\Controllers\OnepageController@saveAddress')->name('shop.checkout.save-address'); + Route::post('/checkout/save-address', [OnepageController::class, 'saveAddress'])->name('shop.checkout.save-address'); // Checkout save shipping address form. - Route::post('/checkout/save-shipping', 'Webkul\Shop\Http\Controllers\OnepageController@saveShipping')->name('shop.checkout.save-shipping'); + Route::post('/checkout/save-shipping', [OnepageController::class, 'saveShipping'])->name('shop.checkout.save-shipping'); // Checkout save payment method form. - Route::post('/checkout/save-payment', 'Webkul\Shop\Http\Controllers\OnepageController@savePayment')->name('shop.checkout.save-payment'); + Route::post('/checkout/save-payment', [OnepageController::class, 'savePayment'])->name('shop.checkout.save-payment'); // Check minimum order. - Route::post('/checkout/check-minimum-order', 'Webkul\Shop\Http\Controllers\OnepageController@checkMinimumOrder')->name('shop.checkout.check-minimum-order'); + Route::post('/checkout/check-minimum-order', [OnepageController::class, 'checkMinimumOrder'])->name('shop.checkout.check-minimum-order'); // Checkout save order. - Route::post('/checkout/save-order', 'Webkul\Shop\Http\Controllers\OnepageController@saveOrder')->name('shop.checkout.save-order'); + Route::post('/checkout/save-order', [OnepageController::class, 'saveOrder'])->name('shop.checkout.save-order'); // Checkout order successful. - Route::get('/checkout/success', 'Webkul\Shop\Http\Controllers\OnepageController@success')->defaults('_config', [ + Route::get('/checkout/success', [OnepageController::class, 'success'])->defaults('_config', [ 'view' => 'shop::checkout.success' ])->name('shop.checkout.success'); @@ -105,26 +126,26 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function * Product reviews. */ // Show product review form. - Route::get('/reviews/{slug}', 'Webkul\Shop\Http\Controllers\ReviewController@show')->defaults('_config', [ + Route::get('/reviews/{slug}', [ReviewController::class, 'show'])->defaults('_config', [ 'view' => 'shop::products.reviews.index' ])->name('shop.reviews.index'); // Show product review listing. - Route::get('/product/{slug}/review', 'Webkul\Shop\Http\Controllers\ReviewController@create')->defaults('_config', [ + Route::get('/product/{slug}/review', [ReviewController::class, 'create'])->defaults('_config', [ 'view' => 'shop::products.reviews.create' ])->name('shop.reviews.create'); // Store product review. - Route::post('/product/{slug}/review', 'Webkul\Shop\Http\Controllers\ReviewController@store')->defaults('_config', [ + Route::post('/product/{slug}/review', [ReviewController::class, 'store'])->defaults('_config', [ 'redirect' => 'shop.home.index' ])->name('shop.reviews.store'); /** * Downloadable products. */ - Route::get('/downloadable/download-sample/{type}/{id}', 'Webkul\Shop\Http\Controllers\ProductController@downloadSample')->name('shop.downloadable.download_sample'); + Route::get('/downloadable/download-sample/{type}/{id}', [ProductController::class, 'downloadSample'])->name('shop.downloadable.download_sample'); - Route::get('/product/{id}/{attribute_id}', 'Webkul\Shop\Http\Controllers\ProductController@download')->defaults('_config', [ + Route::get('/product/{id}/{attribute_id}', [ProductController::class, 'download'])->defaults('_config', [ 'view' => 'shop.products.index' ])->name('shop.product.file.download'); @@ -134,10 +155,10 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function */ Route::prefix('customer')->group(function () { // For customer exist check. - Route::post('/customer/exist', 'Webkul\Shop\Http\Controllers\OnepageController@checkExistCustomer')->name('customer.checkout.exist'); + Route::post('/customer/exist', [OnepageController::class, 'checkExistCustomer'])->name('customer.checkout.exist'); // For customer login checkout. - Route::post('/customer/checkout/login', 'Webkul\Shop\Http\Controllers\OnepageController@loginForCheckout')->name('customer.checkout.login'); + Route::post('/customer/checkout/login', [OnepageController::class, 'loginForCheckout'])->name('customer.checkout.login'); }); /** @@ -158,20 +179,20 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function * Forgot password routes. */ // Show forgot password form. - Route::get('/forgot-password', 'Webkul\Customer\Http\Controllers\ForgotPasswordController@create')->defaults('_config', [ + Route::get('/forgot-password', [ForgotPasswordController::class, 'create'])->defaults('_config', [ 'view' => 'shop::customers.signup.forgot-password' ])->name('customer.forgot-password.create'); // Store forgot password. - Route::post('/forgot-password', 'Webkul\Customer\Http\Controllers\ForgotPasswordController@store')->name('customer.forgot-password.store'); + Route::post('/forgot-password', [ForgotPasswordController::class, 'store'])->name('customer.forgot-password.store'); // Reset password form. - Route::get('/reset-password/{token}', 'Webkul\Customer\Http\Controllers\ResetPasswordController@create')->defaults('_config', [ + Route::get('/reset-password/{token}', [ResetPasswordController::class, 'create'])->defaults('_config', [ 'view' => 'shop::customers.signup.reset-password' ])->name('customer.reset-password.create'); // Store reset password. - Route::post('/reset-password', 'Webkul\Customer\Http\Controllers\ResetPasswordController@store')->defaults('_config', [ + Route::post('/reset-password',[ResetPasswordController::class, 'store'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.reset-password.store'); @@ -179,12 +200,12 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function * Login routes. */ // Login form. - Route::get('login', 'Webkul\Customer\Http\Controllers\SessionController@show')->defaults('_config', [ + Route::get('login', [SessionController::class, 'show'])->defaults('_config', [ 'view' => 'shop::customers.session.index', ])->name('customer.session.index'); // Login. - Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [ + Route::post('login', [SessionController::class, 'create'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.session.create'); @@ -192,20 +213,20 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function * Registration routes. */ // Show registration form. - Route::get('register', 'Webkul\Customer\Http\Controllers\RegistrationController@show')->defaults('_config', [ + Route::get('register', [RegistrationController::class, 'show'])->defaults('_config', [ 'view' => 'shop::customers.signup.index' ])->name('customer.register.index'); // Store new registered user. - Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [ + Route::post('register', [RegistrationController::class, 'create'])->defaults('_config', [ 'redirect' => 'customer.session.index', ])->name('customer.register.create'); // Verify account. - Route::get('/verify-account/{token}', 'Webkul\Customer\Http\Controllers\RegistrationController@verifyAccount')->name('customer.verify'); + Route::get('/verify-account/{token}', [RegistrationController::class, 'verifyAccount'])->name('customer.verify'); // Resend verification email. - Route::get('/resend/verification/{email}', 'Webkul\Customer\Http\Controllers\RegistrationController@resendVerificationEmail')->name('customer.resend.verification-email'); + Route::get('/resend/verification/{email}', [RegistrationController::class, 'resendVerificationEmail'])->name('customer.resend.verification-email'); /** * Customer authented routes. All the below routes only be accessible @@ -215,20 +236,20 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function /** * Logout. */ - Route::get('logout', 'Webkul\Customer\Http\Controllers\SessionController@destroy')->defaults('_config', [ + Route::get('logout', [SessionController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'customer.session.index' ])->name('customer.session.destroy'); /** * Wishlist. */ - Route::post('wishlist/add/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@add')->name('customer.wishlist.add'); + Route::post('wishlist/add/{id}', [WishlistController::class, 'add'])->name('customer.wishlist.add'); - Route::delete('wishlist/remove/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@remove')->name('customer.wishlist.remove'); + Route::delete('wishlist/remove/{id}', [WishlistController::class, 'remove'])->name('customer.wishlist.remove'); - Route::delete('wishlist/removeall', 'Webkul\Customer\Http\Controllers\WishlistController@removeAll')->name('customer.wishlist.removeall'); + Route::delete('wishlist/removeall', [WishlistController::class, 'removeAll'])->name('customer.wishlist.removeall'); - Route::get('wishlist/move/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@move')->name('customer.wishlist.move'); + Route::get('wishlist/move/{id}', [WishlistController::class, 'move'])->name('customer.wishlist.move'); /** * Customer account. All the below routes are related to @@ -238,104 +259,104 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function /** * Dashboard. */ - Route::get('index', 'Webkul\Customer\Http\Controllers\AccountController@index')->defaults('_config', [ + Route::get('index', [AccountController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.index' ])->name('customer.account.index'); /** * Profile. */ - Route::get('profile', 'Webkul\Customer\Http\Controllers\CustomerController@index')->defaults('_config', [ + Route::get('profile', [CustomerController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.profile.index' ])->name('customer.profile.index'); - Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@edit')->defaults('_config', [ + Route::get('profile/edit', [CustomerController::class, 'edit'])->defaults('_config', [ 'view' => 'shop::customers.account.profile.edit' ])->name('customer.profile.edit'); - Route::post('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@update')->defaults('_config', [ + Route::post('profile/edit', [CustomerController::class, 'update'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.profile.store'); - Route::post('profile/destroy', 'Webkul\Customer\Http\Controllers\CustomerController@destroy')->defaults('_config', [ + Route::post('profile/destroy', [CustomerController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.profile.destroy'); /** * Addresses. */ - Route::get('addresses', 'Webkul\Customer\Http\Controllers\AddressController@index')->defaults('_config', [ + Route::get('addresses', [AddressController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.address.index' ])->name('customer.address.index'); - Route::get('addresses/create', 'Webkul\Customer\Http\Controllers\AddressController@create')->defaults('_config', [ + Route::get('addresses/create', [AddressController::class, 'create'])->defaults('_config', [ 'view' => 'shop::customers.account.address.create' ])->name('customer.address.create'); - Route::post('addresses/create', 'Webkul\Customer\Http\Controllers\AddressController@store')->defaults('_config', [ + Route::post('addresses/create', [AddressController::class, 'store'])->defaults('_config', [ 'view' => 'shop::customers.account.address.address', 'redirect' => 'customer.address.index' ])->name('customer.address.store'); - Route::get('addresses/edit/{id}', 'Webkul\Customer\Http\Controllers\AddressController@edit')->defaults('_config', [ + Route::get('addresses/edit/{id}', [AddressController::class, 'edit'])->defaults('_config', [ 'view' => 'shop::customers.account.address.edit' ])->name('customer.address.edit'); - Route::put('addresses/edit/{id}', 'Webkul\Customer\Http\Controllers\AddressController@update')->defaults('_config', [ + Route::put('addresses/edit/{id}', [AddressController::class, 'update'])->defaults('_config', [ 'redirect' => 'customer.address.index' ])->name('customer.address.update'); - Route::get('addresses/default/{id}', 'Webkul\Customer\Http\Controllers\AddressController@makeDefault')->name('make.default.address'); + Route::get('addresses/default/{id}', [AddressController::class, 'makeDefault'])->name('make.default.address'); - Route::delete('addresses/delete/{id}', 'Webkul\Customer\Http\Controllers\AddressController@destroy')->name('address.delete'); + Route::delete('addresses/delete/{id}', [AddressController::class, 'destroy'])->name('address.delete'); /** * Wishlist. */ - Route::get('wishlist', 'Webkul\Customer\Http\Controllers\WishlistController@index')->defaults('_config', [ + Route::get('wishlist', [WishlistController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.wishlist.wishlist' ])->name('customer.wishlist.index'); /** * Orders. */ - Route::get('orders', 'Webkul\Shop\Http\Controllers\OrderController@index')->defaults('_config', [ + Route::get('orders', [OrderController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.orders.index' ])->name('customer.orders.index'); - Route::get('orders/view/{id}', 'Webkul\Shop\Http\Controllers\OrderController@view')->defaults('_config', [ + Route::get('orders/view/{id}', [OrderController::class, 'view'])->defaults('_config', [ 'view' => 'shop::customers.account.orders.view' ])->name('customer.orders.view'); - Route::get('orders/print/{id}', 'Webkul\Shop\Http\Controllers\OrderController@print')->defaults('_config', [ + Route::get('orders/print/{id}', [OrderController::class, 'print'])->defaults('_config', [ 'view' => 'shop::customers.account.orders.print' ])->name('customer.orders.print'); - Route::post('/orders/cancel/{id}', 'Webkul\Shop\Http\Controllers\OrderController@cancel')->name('customer.orders.cancel'); + Route::post('/orders/cancel/{id}', [OrderController::class, 'cancel'])->name('customer.orders.cancel'); /** * Downloadable products. */ - Route::get('downloadable-products', 'Webkul\Shop\Http\Controllers\DownloadableProductController@index')->defaults('_config', [ + Route::get('downloadable-products', [DownloadableProductController::class, 'index'])->defaults('_config', [ 'view' => 'shop::customers.account.downloadable_products.index' ])->name('customer.downloadable_products.index'); - Route::get('downloadable-products/download/{id}', 'Webkul\Shop\Http\Controllers\DownloadableProductController@download')->defaults('_config', [ + Route::get('downloadable-products/download/{id}', [DownloadableProductController::class, 'download'])->defaults('_config', [ 'view' => 'shop::customers.account.downloadable_products.index' ])->name('customer.downloadable_products.download'); /** * Reviews. */ - Route::get('reviews', 'Webkul\Customer\Http\Controllers\CustomerController@reviews')->defaults('_config', [ + Route::get('reviews', [CustomerController::class, 'reviews'])->defaults('_config', [ 'view' => 'shop::customers.account.reviews.index' ])->name('customer.reviews.index'); - Route::delete('reviews/delete/{id}', 'Webkul\Shop\Http\Controllers\ReviewController@destroy')->defaults('_config', [ + Route::delete('reviews/delete/{id}', [ReviewController::class, 'destroy'])->defaults('_config', [ 'redirect' => 'customer.reviews.index' ])->name('customer.review.delete'); - Route::delete('reviews/all-delete', 'Webkul\Shop\Http\Controllers\ReviewController@deleteAll')->defaults('_config', [ + Route::delete('reviews/all-delete', [ReviewController::class, 'deleteAll'])->defaults('_config', [ 'redirect' => 'customer.reviews.index' ])->name('customer.review.deleteall'); }); @@ -345,7 +366,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function /** * CMS pages. */ - Route::get('page/{slug}', 'Webkul\CMS\Http\Controllers\Shop\PagePresenterController@presenter')->name('shop.cms.page'); + Route::get('page/{slug}', [PagePresenterController::class, 'presenter'])->name('shop.cms.page'); /** * Fallback route. diff --git a/packages/Webkul/SocialLogin/src/Http/routes.php b/packages/Webkul/SocialLogin/src/Http/routes.php index 3ea7e2488..bbfff021e 100644 --- a/packages/Webkul/SocialLogin/src/Http/routes.php +++ b/packages/Webkul/SocialLogin/src/Http/routes.php @@ -1,12 +1,15 @@ ['web', 'locale', 'theme', 'currency']], function () { Route::prefix('customer')->group(function () { - Route::get('social-login/{provider}', 'Webkul\SocialLogin\Http\Controllers\LoginController@redirectToProvider')->defaults('_config', [ + Route::get('social-login/{provider}', [LoginController::class, 'redirectToProvider'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.social-login.index'); - Route::get('social-login/{provider}/callback','Webkul\SocialLogin\Http\Controllers\LoginController@handleProviderCallback')->defaults('_config', [ + Route::get('social-login/{provider}/callback',[LoginController::class, 'handleProviderCallback'])->defaults('_config', [ 'redirect' => 'customer.profile.index' ])->name('customer.social-login.callback'); }); diff --git a/packages/Webkul/Velocity/src/Http/admin-routes.php b/packages/Webkul/Velocity/src/Http/admin-routes.php index f27c7673c..f6d4acd43 100644 --- a/packages/Webkul/Velocity/src/Http/admin-routes.php +++ b/packages/Webkul/Velocity/src/Http/admin-routes.php @@ -1,46 +1,48 @@ ['web', 'admin_locale']], function () { Route::prefix(config('app.admin_url') . '/velocity')->group(function () { Route::group(['middleware' => ['admin']], function () { - Route::namespace('Webkul\Velocity\Http\Controllers\Admin')->group(function () { - // Content Pages Route - Route::get('/content', 'ContentController@index')->defaults('_config', [ - 'view' => 'velocity::admin.content.index' - ])->name('velocity.admin.content.index'); + // Content Pages Route + Route::get('/content', [ContentController::class, 'index'])->defaults('_config', [ + 'view' => 'velocity::admin.content.index' + ])->name('velocity.admin.content.index'); - Route::get('/content/search', 'ContentController@search')->name('velocity.admin.content.search'); + Route::get('/content/search', [ContentController::class, 'search'])->name('velocity.admin.content.search'); - Route::get('/content/create', 'ContentController@create')->defaults('_config',[ - 'view' => 'velocity::admin.content.create' - ])->name('velocity.admin.content.create'); + Route::get('/content/create', [ContentController::class, 'create'])->defaults('_config',[ + 'view' => 'velocity::admin.content.create' + ])->name('velocity.admin.content.create'); - Route::post('/content/create', 'ContentController@store')->defaults('_config',[ - 'redirect' => 'velocity.admin.content.index' - ])->name('velocity.admin.content.store'); + Route::post('/content/create', [ContentController::class, 'store'])->defaults('_config',[ + 'redirect' => 'velocity.admin.content.index' + ])->name('velocity.admin.content.store'); - Route::get('/content/edit/{id}', 'ContentController@edit')->defaults('_config',[ - 'view' => 'velocity::admin.content.edit' - ])->name('velocity.admin.content.edit'); + Route::get('/content/edit/{id}', [ContentController::class, 'edit'])->defaults('_config',[ + 'view' => 'velocity::admin.content.edit' + ])->name('velocity.admin.content.edit'); - Route::put('/content/edit/{id}', 'ContentController@update')->defaults('_config', [ - 'redirect' => 'velocity.admin.content.index' - ])->name('velocity.admin.content.update'); + Route::put('/content/edit/{id}', [ContentController::class, 'update'])->defaults('_config', [ + 'redirect' => 'velocity.admin.content.index' + ])->name('velocity.admin.content.update'); - Route::post('/content/delete/{id}', 'ContentController@destroy')->name('velocity.admin.content.delete'); + Route::post('/content/delete/{id}', [ContentController::class, 'destroy'])->name('velocity.admin.content.delete'); - Route::post('/content/masssdelete', 'ContentController@massDestroy')->defaults('_config', [ - 'redirect' => 'velocity.admin.content.index' - ])->name('velocity.admin.content.mass-delete'); + Route::post('/content/masssdelete', [ContentController::class, 'massDestroy'])->defaults('_config', [ + 'redirect' => 'velocity.admin.content.index' + ])->name('velocity.admin.content.mass-delete'); - Route::get('/meta-data', 'ConfigurationController@renderMetaData')->defaults('_config', [ - 'view' => 'velocity::admin.meta-info.meta-data' - ])->name('velocity.admin.meta-data'); + Route::get('/meta-data', [ConfigurationController::class, 'renderMetaData'])->defaults('_config', [ + 'view' => 'velocity::admin.meta-info.meta-data' + ])->name('velocity.admin.meta-data'); - Route::post('/meta-data/{id}', 'ConfigurationController@storeMetaData')->defaults('_config', [ - 'redirect' => 'velocity.admin.meta-data' - ])->name('velocity.admin.store.meta-data'); - }); + Route::post('/meta-data/{id}', [ConfigurationController::class, 'storeMetaData'])->defaults('_config', [ + 'redirect' => 'velocity.admin.meta-data' + ])->name('velocity.admin.store.meta-data'); }); }); }); \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Http/front-routes.php b/packages/Webkul/Velocity/src/Http/front-routes.php index 6f8e50bfb..c814791e6 100644 --- a/packages/Webkul/Velocity/src/Http/front-routes.php +++ b/packages/Webkul/Velocity/src/Http/front-routes.php @@ -1,88 +1,91 @@ ['web', 'locale', 'theme', 'currency']], function () { - Route::namespace('Webkul\Velocity\Http\Controllers\Shop')->group(function () { + /** + * Cart merger middleware. This middleware will take care of the items + * which are deactivated at the time of buy now functionality. If somehow + * user redirects without completing the checkout then this will merge + * full cart. + * + * If some routes are not able to merge the cart, then place the route in this + * group. + */ + Route::group(['middleware' => ['cart.merger']], function () { /** - * Cart merger middleware. This middleware will take care of the items - * which are deactivated at the time of buy now functionality. If somehow - * user redirects without completing the checkout then this will merge - * full cart. - * - * If some routes are not able to merge the cart, then place the route in this - * group. + * Authenticated routes. All the routes inside this, will be passed + * by customer middleware. */ - Route::group(['middleware' => ['cart.merger']], function () { + Route::group(['middleware' => ['customer']], function () { /** - * Authenticated routes. All the routes inside this, will be passed - * by customer middleware. + * Customer compare products. */ - Route::group(['middleware' => ['customer']], function () { - /** - * Customer compare products. - */ - Route::get('/customer/account/comparison', 'ComparisonController@getComparisonList') - ->name('velocity.customer.product.compare') - ->defaults('_config', [ - 'view' => 'shop::customers.account.compare.index' - ]); - }); - - /** - * Guest compare products. - */ - Route::get('/comparison', 'ComparisonController@getComparisonList') - ->name('velocity.product.compare') + Route::get('/customer/account/comparison', [ComparisonController::class, 'getComparisonList']) + ->name('velocity.customer.product.compare') ->defaults('_config', [ - 'view' => 'shop::guest.compare.index' + 'view' => 'shop::customers.account.compare.index' ]); - - Route::put('/comparison', 'ComparisonController@addCompareProduct') - ->name('customer.product.add.compare'); - - Route::delete('/comparison', 'ComparisonController@deleteComparisonProduct') - ->name('customer.product.delete.compare'); - - /** - * Categories and products. - */ - Route::get('/product-details/{slug}', 'ShopController@fetchProductDetails') - ->name('velocity.shop.product'); - - Route::get('/categorysearch', 'ShopController@search') - ->name('velocity.search.index') - ->defaults('_config', [ - 'view' => 'shop::search.search' - ]); - - Route::get('/fancy-category-details/{slug}', 'ShopController@fetchFancyCategoryDetails') - ->name('velocity.fancy.category.details'); - - Route::get('/category-details', 'ShopController@categoryDetails') - ->name('velocity.category.details'); - - Route::get('/category-products/{categoryId}', 'ShopController@getCategoryProducts') - ->name('velocity.category.products'); }); /** - * Cart, coupons and checkout. + * Guest compare products. */ - Route::get('/mini-cart', 'CartController@getMiniCartDetails') - ->name('velocity.cart.get.details'); + Route::get('/comparison', [ComparisonController::class, 'getComparisonList']) + ->name('velocity.product.compare') + ->defaults('_config', [ + 'view' => 'shop::guest.compare.index' + ]); - Route::post('/cart/add', 'CartController@addProductToCart') - ->name('velocity.cart.add.product'); + Route::put('/comparison', [ComparisonController::class, 'addCompareProduct']) + ->name('customer.product.add.compare'); - Route::delete('/cart/remove/{id}', 'CartController@removeProductFromCart') - ->name('velocity.cart.remove.product'); + Route::delete('/comparison', [ComparisonController::class, 'deleteComparisonProduct']) + ->name('customer.product.delete.compare'); - Route::get('/categories', 'ShopController@fetchCategories') - ->name('velocity.categoriest'); + /** + * Categories and products. + */ + Route::get('/product-details/{slug}', [ShopController::class, 'fetchProductDetails']) + ->name('velocity.shop.product'); - Route::get('/items-count', 'ShopController@getItemsCount') - ->name('velocity.product.item-count'); + Route::get('/categorysearch', [ShopController::class, 'search']) + ->name('velocity.search.index') + ->defaults('_config', [ + 'view' => 'shop::search.search' + ]); - Route::get('/detailed-products', 'ShopController@getDetailedProducts') - ->name('velocity.product.details'); + Route::get('/fancy-category-details/{slug}', [ShopController::class, 'fetchFancyCategoryDetails']) + ->name('velocity.fancy.category.details'); + + Route::get('/category-details', [ShopController::class, 'categoryDetails']) + ->name('velocity.category.details'); + + Route::get('/category-products/{categoryId}', [ShopController::class, 'getCategoryProducts']) + ->name('velocity.category.products'); }); + + /** + * Cart, coupons and checkout. + */ + Route::get('/mini-cart', [CartController::class, 'getMiniCartDetails']) + ->name('velocity.cart.get.details'); + + Route::post('/cart/add', [CartController::class, 'addProductToCart']) + ->name('velocity.cart.add.product'); + + Route::delete('/cart/remove/{id}', [CartController::class, 'removeProductFromCart']) + ->name('velocity.cart.remove.product'); + + Route::get('/categories', [ShopController::class, 'fetchCategories']) + ->name('velocity.categoriest'); + + Route::get('/items-count', [ShopController::class, 'getItemsCount']) + ->name('velocity.product.item-count'); + + Route::get('/detailed-products', [ShopController::class, 'getDetailedProducts']) + ->name('velocity.product.details'); }); From 7bc4248d214e2c905815d6e128c365bff407085a Mon Sep 17 00:00:00 2001 From: Apoorv Pal Date: Thu, 7 Oct 2021 15:15:50 +0530 Subject: [PATCH 11/18] fixed typo --- packages/Webkul/Admin/src/Http/routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index a36afae90..fde67e5b3 100755 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -70,7 +70,7 @@ Route::group(['middleware' => ['web', 'admin_locale']], function () { 'view' => 'admin::users.reset-password.create', ])->name('admin.reset-password.create'); - Route::post('/reset-password', [ResetPasswordController::clss, 'store'])->defaults('_config', [ + Route::post('/reset-password', [ResetPasswordController::class, 'store'])->defaults('_config', [ 'redirect' => 'admin.dashboard.index', ])->name('admin.reset-password.store'); From 2c0f710e36718a5fab4d2771caa9aed055bb9043 Mon Sep 17 00:00:00 2001 From: Apoorv Pal Date: Thu, 7 Oct 2021 18:03:11 +0530 Subject: [PATCH 12/18] removed namespace from route group --- packages/Webkul/API/Http/routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/API/Http/routes.php b/packages/Webkul/API/Http/routes.php index e66ded520..025057a5e 100755 --- a/packages/Webkul/API/Http/routes.php +++ b/packages/Webkul/API/Http/routes.php @@ -55,7 +55,7 @@ use Webkul\API\Http\Resources\Sales\Shipment; Route::group(['prefix' => 'api'], function ($router) { - Route::group(['namespace' => 'Webkul\API\Http\Controllers\Shop', 'middleware' => ['locale', 'theme', 'currency']], function ($router) { + Route::group(['middleware' => ['locale', 'theme', 'currency']], function ($router) { //Currency and Locale switcher Route::get('switch-currency', [CoreController::class, 'switchCurrency']); From 0f730dce60fa2b19769f65fe88990248eea2b91a Mon Sep 17 00:00:00 2001 From: Apoorv Pal Date: Thu, 7 Oct 2021 18:04:08 +0530 Subject: [PATCH 13/18] reordered use class statements --- packages/Webkul/API/Http/routes.php | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/Webkul/API/Http/routes.php b/packages/Webkul/API/Http/routes.php index 025057a5e..a28a53bfd 100755 --- a/packages/Webkul/API/Http/routes.php +++ b/packages/Webkul/API/Http/routes.php @@ -17,24 +17,6 @@ use Webkul\API\Http\Controllers\Shop\SessionController; use Webkul\API\Http\Controllers\Shop\TransactionController; use Webkul\API\Http\Controllers\Shop\WishlistController; -// Repositories -use Webkul\Attribute\Repositories\AttributeRepository; -use Webkul\Attribute\Repositories\AttributeFamilyRepository; -use Webkul\Category\Repositories\CategoryRepository; -use Webkul\Core\Repositories\ChannelRepository; -use Webkul\Core\Repositories\CountryRepository; -use Webkul\Core\Repositories\CurrencyRepository; -use Webkul\Core\Repositories\LocaleRepository; -use Webkul\Core\Repositories\SliderRepository; -use Webkul\Customer\Repositories\CustomerRepository; -use Webkul\Customer\Repositories\CustomerAddressRepository; -use Webkul\Customer\Repositories\WishlistRepository; -use Webkul\Product\Repositories\ProductReviewRepository; -use Webkul\Sales\Repositories\InvoiceRepository; -use Webkul\Sales\Repositories\OrderRepository; -use Webkul\Sales\Repositories\OrderTransactionRepository; -use Webkul\Sales\Repositories\ShipmentRepository; - // Resources use Webkul\API\Http\Resources\Catalog\Attribute; use Webkul\API\Http\Resources\Catalog\AttributeFamily; @@ -53,6 +35,24 @@ use Webkul\API\Http\Resources\Sales\Order; use Webkul\API\Http\Resources\Sales\OrderTransaction; use Webkul\API\Http\Resources\Sales\Shipment; +// Repositories +use Webkul\Attribute\Repositories\AttributeRepository; +use Webkul\Attribute\Repositories\AttributeFamilyRepository; +use Webkul\Category\Repositories\CategoryRepository; +use Webkul\Core\Repositories\ChannelRepository; +use Webkul\Core\Repositories\CountryRepository; +use Webkul\Core\Repositories\CurrencyRepository; +use Webkul\Core\Repositories\LocaleRepository; +use Webkul\Core\Repositories\SliderRepository; +use Webkul\Customer\Repositories\CustomerRepository; +use Webkul\Customer\Repositories\CustomerAddressRepository; +use Webkul\Customer\Repositories\WishlistRepository; +use Webkul\Product\Repositories\ProductReviewRepository; +use Webkul\Sales\Repositories\InvoiceRepository; +use Webkul\Sales\Repositories\OrderRepository; +use Webkul\Sales\Repositories\OrderTransactionRepository; +use Webkul\Sales\Repositories\ShipmentRepository; + Route::group(['prefix' => 'api'], function ($router) { Route::group(['middleware' => ['locale', 'theme', 'currency']], function ($router) { From b01a2e1b8e953c951c6321d5482b9fdd5a8687a1 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 8 Oct 2021 11:46:54 +0530 Subject: [PATCH 14/18] Auto Logged Out Added --- .../User/src/Http/Middleware/Bouncer.php | 71 ++++++++++++------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/packages/Webkul/User/src/Http/Middleware/Bouncer.php b/packages/Webkul/User/src/Http/Middleware/Bouncer.php index dcc71f5ef..911a915e2 100755 --- a/packages/Webkul/User/src/Http/Middleware/Bouncer.php +++ b/packages/Webkul/User/src/Http/Middleware/Bouncer.php @@ -2,51 +2,72 @@ namespace Webkul\User\Http\Middleware; -use Closure; -use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; class Bouncer { /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard - * @return mixed - */ - public function handle($request, Closure $next, $guard = 'admin') + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard + * @return mixed + */ + public function handle($request, \Closure $next, $guard = 'admin') { - if (! Auth::guard($guard)->check()) { + if (! auth()->guard($guard)->check()) { return redirect()->route('admin.session.create'); } - $this->checkIfAuthorized($request); + /** + * If somehow the user deleted all permissions, then it should be + * auto logged out and need to contact the administrator again. + */ + if ($this->isPermissionsEmpty()) { + auth()->guard('admin')->logout(); + + return redirect()->route('admin.session.create'); + } return $next($request); } /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @return mixed - */ - public function checkIfAuthorized($request) + * Check for user, if they have empty permissions or not except admin. + * + * @return bool + */ + public function isPermissionsEmpty() { if (! $role = auth()->guard('admin')->user()->role) { abort(401, 'This action is unauthorized.'); } - if ($role->permission_type == 'all') { - return; - } else { - $acl = app('acl'); + if ($role->permission_type === 'all') { + return false; + } - if ($acl && isset($acl->roles[Route::currentRouteName()])) { - bouncer()->allow($acl->roles[Route::currentRouteName()]); - } + if ($role->permission_type !== 'all' && empty($role->permissions)) { + return true; + } + + $this->checkIfAuthorized(); + + return false; + } + + /** + * Check authorization. + * + * @return null + */ + public function checkIfAuthorized() + { + $acl = app('acl'); + + if ($acl && isset($acl->roles[Route::currentRouteName()])) { + bouncer()->allow($acl->roles[Route::currentRouteName()]); } } } From 5f08126d25a7b60064f8759a7f5802d0e7f03466 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Sun, 10 Oct 2021 03:29:02 +0530 Subject: [PATCH 15/18] resolved #5210 --- .../Webkul/Velocity/publishable/assets/css/velocity.css | 2 +- .../Velocity/publishable/assets/js/velocity-core.js | 2 +- .../Webkul/Velocity/publishable/assets/js/velocity.js | 2 +- .../Webkul/Velocity/publishable/assets/mix-manifest.json | 6 +++--- .../src/Resources/assets/sass/components/app.scss | 8 ++++++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/Velocity/publishable/assets/css/velocity.css b/packages/Webkul/Velocity/publishable/assets/css/velocity.css index b4bc3f1d2..64752ec5b 100644 --- a/packages/Webkul/Velocity/publishable/assets/css/velocity.css +++ b/packages/Webkul/Velocity/publishable/assets/css/velocity.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap);@font-face{font-family:Webkul Rango;src:url("../fonts/font-rango/rango.eot?o0evyv");src:url("../fonts/font-rango/rango.eot?o0evyv#iefix") format("embedded-opentype"),url("../fonts/font-rango/rango.ttf?o0evyv") format("truetype"),url("../fonts/font-rango/rango.woff?o0evyv") format("woff"),url("../fonts/font-rango/rango.svg?o0evyv#rango") format("svg");font-weight:400;font-style:normal;font-display:swap}.wk-icon{font-size:20px;font-weight:400;text-align:center;color:#0041ff}[class*=" rango-"],[class^=rango-]{font-family:Webkul Rango!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rango-activity:before{content:"\E900"}.rango-announcement:before{content:"\E901"}.rango-arrow-circle-down:before{content:"\E902"}.rango-arrow-circle-left:before{content:"\E903"}.rango-arrow-circle-right:before{content:"\E904"}.rango-arrow-circle-up:before{content:"\E905"}.rango-arrow-down:before{content:"\E906"}.rango-arrow-left:before{content:"\E907"}.rango-arrow-right:before{content:"\E908"}.rango-arrow-up:before{content:"\E909"}.rango-auction:before{content:"\E90A"}.rango-baby:before{content:"\E90B"}.rango-bag:before{content:"\E90C"}.rango-ball-2:before{content:"\E90D"}.rango-bar-code:before{content:"\E90E"}.rango-batch:before{content:"\E90F"}.rango-book:before{content:"\E910"}.rango-calender:before{content:"\E911"}.rango-camera:before{content:"\E912"}.rango-car:before{content:"\E913"}.rango-card:before{content:"\E914"}.rango-cart-1:before{content:"\E915"}.rango-cart-2:before{content:"\E916"}.rango-cart-3:before{content:"\E917"}.rango-circel-1:before{content:"\E918"}.rango-circel:before{content:"\E919"}.rango-circle-1:before{content:"\E91A"}.rango-circle-2:before{content:"\E91B"}.rango-circle-check:before{content:"\E91C"}.rango-clear:before{content:"\E91D"}.rango-close-2:before{content:"\E91E"}.rango-close:before{content:"\E91F"}.rango-cloth:before{content:"\E920"}.rango-coin:before{content:"\E921"}.rango-copy:before{content:"\E922"}.rango-currency:before{content:"\E923"}.rango-delete:before{content:"\E924"}.rango-donwload-1:before{content:"\E925"}.rango-download-1:before{content:"\E926"}.rango-edit-pencil:before{content:"\E927"}.rango-ellipse:before{content:"\E928"}.rango-envelop:before{content:"\E929"}.rango-exchange:before{content:"\E92A"}.rango-exchnage:before{content:"\E92B"}.rango-expend-collaps:before{content:"\E92C"}.rango-expend:before{content:"\E92D"}.rango-eye-hide:before{content:"\E92E"}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon:before,.rango-eye-visible:before{content:"\E92F"}.rango-facebook:before{content:"\E930"}.rango-file:before{content:"\E931"}.rango-filter:before{content:"\E932"}.rango-flag:before{content:"\E933"}.rango-folder:before{content:"\E934"}.rango-food:before{content:"\E935"}.rango-furniture:before{content:"\E936"}.rango-gift:before{content:"\E937"}.rango-globe:before{content:"\E938"}.rango-google-plus:before{content:"\E939"}.rango-gps:before{content:"\E93A"}.rango-graph-1:before{content:"\E93B"}.rango-graph:before{content:"\E93C"}.rango-heart-fill:before{content:"\E93D"}.rango-heart:before{content:"\E93E"}.rango-hold-cart:before{content:"\E93F"}.rango-home:before{content:"\E940"}.rango-info:before{content:"\E941"}.rango-instagram:before{content:"\E942"}.rango-language-1:before{content:"\E943"}.rango-language:before{content:"\E944"}.rango-laptop:before{content:"\E945"}.rango-limit:before{content:"\E946"}.rango-linked-in:before{content:"\E947"}.rango-lipstick:before{content:"\E948"}.rango-location:before{content:"\E949"}.rango-lock-1:before{content:"\E94A"}.rango-lock-2:before{content:"\E94B"}.rango-map:before{content:"\E94C"}.rango-message-1:before{content:"\E94D"}.rango-message:before{content:"\E94E"}.rango-minus:before{content:"\E94F"}.rango-mobile:before{content:"\E950"}.rango-more:before{content:"\E951"}.rango-neckless:before{content:"\E952"}.rango-next:before{content:"\E953"}.rango-notification:before{content:"\E954"}.rango-num-pad:before{content:"\E955"}.rango-percentage:before{content:"\E956"}.rango-phone:before{content:"\E957"}.rango-picture:before{content:"\E958"}.rango-pintrest:before{content:"\E959"}.rango-play:before{content:"\E95A"}.rango-plus:before{content:"\E95B"}.rango-pos:before{content:"\E95C"}.rango-power:before{content:"\E95D"}.rango-previous:before{content:"\E95E"}.rango-printer:before{content:"\E95F"}.rango-product-add:before{content:"\E960"}.rango-product-retrun:before{content:"\E961"}.rango-product:before{content:"\E962"}.rango-produt-group:before{content:"\E963"}.rango-push:before{content:"\E964"}.rango-quotation:before{content:"\E965"}.rango-refresh:before{content:"\E966"}.rango-refrigrator:before{content:"\E967"}.rango-return-credit:before{content:"\E968"}.rango-return:before{content:"\E969"}.rango-search:before{content:"\E96A"}.rango-security:before{content:"\E96B"}.rango-setting-cog:before{content:"\E96C"}.rango-setting-reset:before{content:"\E96D"}.rango-share-1:before{content:"\E96E"}.rango-share-2:before{content:"\E96F"}.rango-shoes:before{content:"\E970"}.rango-shop:before{content:"\E971"}.rango-sign-in:before{content:"\E972"}.rango-sign-out:before{content:"\E973"}.rango-sort-1:before{content:"\E974"}.rango-sort-2:before{content:"\E975"}.rango-square-1:before{content:"\E976"}.rango-square-3:before{content:"\E977"}.rango-square-4:before{content:"\E978"}.rango-square-tick-fill:before{content:"\E979"}.rango-square:before{content:"\E97B"}.rango-star-fill:before{content:"\E97C"}.rango-star:before{content:"\E97D"}.rango-stat-down:before{content:"\E97E"}.rango-stat-up:before{content:"\E97F"}.rango-support-head:before{content:"\E980"}.rango-t-shirt:before{content:"\E981"}.rango-table:before{content:"\E982"}.rango-tag-1:before{content:"\E983"}.rango-tag-2:before{content:"\E984"}.rango-tag-3:before{content:"\E985"}.rango-tag-4:before{content:"\E986"}.rango-tick-2:before{content:"\E987"}.rango-tick-square:before{content:"\E988"}.rango-tick:before{content:"\E989"}.rango-toggle:before{content:"\E98A"}.rango-trophy:before{content:"\E98B"}.rango-twitter:before{content:"\E98C"}.rango-upload-2:before{content:"\E98D"}.rango-upload:before{content:"\E98E"}.rango-user-add:before{content:"\E98F"}.rango-user-cash:before{content:"\E990"}.rango-user-group:before{content:"\E991"}.rango-user-info:before{content:"\E992"}.rango-user-owner:before{content:"\E993"}.rango-user-shop:before{content:"\E994"}.rango-user:before{content:"\E995"}.rango-van-ship:before{content:"\E996"}.rango-video-camera:before{content:"\E997"}.rango-video:before{content:"\E998"}.rango-view-grid:before{content:"\E999"}.rango-view-list:before{content:"\E99A"}.rango-wifi-on:before{content:"\E99B"}.rango-wifi:before{content:"\E99C"}.rango-youtube:before{content:"\E99D"}.rango-zoom-minus:before{content:"\E99E"}.rango-zoom-plus:before{content:"\E99F"}.velocity-icon{width:60px;height:55px;background-image:url("../images/Icon-Velocity.svg")}.camera-icon,.velocity-icon{display:inline-block;background-size:cover}.camera-icon{background-image:url("../images/Camera.svg");width:24px}.active.velocity-icon,.active .velocity-icon,.router-link-active.velocity-icon,.router-link-active .velocity-icon{background-image:url("../images/Icon-Velocity-Active.svg")}.ltr{direction:ltr}.rtl{direction:rtl}.padding-10,.padding-15{padding:15px}.fw5{font-weight:500}.fw6,.product-detail .right .info .price,.product-detail .right h3,.product-detail .right h4{font-weight:600}.fw7,.product-detail .right .info h2{font-weight:700}.fs13{font-size:13px!important}.fs14,.main-content-wrapper{font-size:14px}.fs15{font-size:15px}.account-content .account-layout .bottom-toolbar .pagination .page-item,.fs16,.product-detail .right{font-size:16px}.fs16i{font-size:16px!important}.fs17{font-size:17px}.fs18,.product-detail .right h3{font-size:18px}.fs19{font-size:19px}.fs20,.product-detail .right .info .price{font-size:20px}.fs24,.product-detail .right .info h2{font-size:24px}.fs30,.product-detail .right .info .price .card-current-price{font-size:30px}.fs40{font-size:40px}.pt0{padding-top:0!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pl0{padding-left:0!important}.pl5{padding-left:5px!important}.pl15{padding-left:15px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px!important}.pl40{padding-left:40px!important}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr15{padding-right:15px!important}.pr40{padding-right:40px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb30{padding-bottom:30px!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px}.mt15{margin-top:15px!important}.mr5{margin-right:5px}.mr7{margin-right:7px}.mr10{margin-right:10px}.mr15,.product-detail .right .options .buttons :not(:last-child),.product-detail .right .options .quantity>label{margin-right:15px}.mr20{margin-right:20px}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15,.product-detail .right .info{margin-bottom:15px}.mb20,.product-detail .right .options>*,.product-detail .right>div{margin-bottom:20px}.mb25{margin-bottom:25px}.mb30,.product-detail .right .customer-reviews .row{margin-bottom:30px}.ml0,.product-detail .right>div:not(:first-child){margin-left:0!important}.ml5{margin-left:5px}.ml10{margin-left:10px!important}.ml15{margin-left:15px!important}.ml30{margin-left:30px!important}.body-blur{filter:blur(4px);-webkit-filter:blur(4px)}.no-margin{margin:0!important}.flex-wrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.category-list-container .category,.cursor-pointer,.qty-btn>:not(:nth-child(2)){cursor:pointer}.cursor-not-allowed{cursor:not-allowed!important}.cursor-default{cursor:default}.grey{color:#9e9e9e}.clr-light{color:rgba(0,0,0,.53)}.clr-dark,.footer .footer-content .footer-statics .software-description p{color:hsla(0,0%,100%,.52)}.font-clr{color:rgba(0,0,0,.83)}.display-inbl,.product-detail .right .options .quantity>label{display:inline-block!important}.display-block,.product-detail .right .options label{display:block!important}.align-vertical-middle{vertical-align:middle}.full-width{width:100%}.full-image{width:100%;height:100%}.card-product-image-container .background-image-group,.full-back-size{background-size:100% 100%!important}.max-width-100{max-width:100%!important}.no-border{border:none!important}.back-pos-rt{background-position:100%}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.account-content .account-layout .bottom-toolbar .pagination .page-item,.cart-details .continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,.theme-btn{z-index:10;border:none;cursor:pointer;font-weight:600;padding:10px 20px;vertical-align:top;border:1px solid transparent;color:#fff!important;background-color:#26a37c!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.cart-details .continue-shopping-btn:focus,.cart-details .continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover,.theme-btn:focus,.theme-btn:hover{outline:none;-webkit-box-shadow:none;box-shadow:none;border:1px solid #247959;background-color:#26a37c!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item,.account-content .account-layout .bottom-toolbar .pagination .page-item,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.cart-details .light.continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.theme-btn.light{color:#26a37c!important;background-color:#fff!important;-webkit-box-shadow:0 1px 0 0 #cfcfcf;box-shadow:0 1px 0 0 #cfcfcf;border:1px solid rgba(0,0,0,.12)}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.cart-details .light.continue-shopping-btn:focus,.cart-details .light.continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light:hover,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:focus,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.theme-btn.light:focus,.theme-btn.light:hover{outline:none;-webkit-box-shadow:none;box-shadow:none;border:1px solid #247959;background-color:#f5f5f5!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.btn-add-to-cart:hover,.cart-details .continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover,.theme-btn:hover{border-color:#247959!important;background-color:#247959!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover.light,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover.light,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .btn-add-to-cart.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.btn-add-to-cart:hover.light,.cart-details .continue-shopping-btn:hover.light,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.theme-btn:hover.light{border:1px solid rgba(0,0,0,.12)!important}.norm-btn{border:1px solid #ccc;font-size:14px;padding:9px 20px;border-radius:2px;vertical-align:top;color:#111!important;background-color:#fff!important}.sale-btn{z-index:10;border:none;color:#fff;font-size:14px;padding:3px 10px;position:absolute;border-radius:12px;background-color:#26a37c}.bg-image,.small-card-container .product-image{width:100%;background-size:contain;background-repeat:no-repeat;background-position:top}#top #account .welcome-content *,.material-icons,.unselectable *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.card-arrow-container .card-arrow{z-index:10;width:20px;height:20px;display:block;position:absolute;background-color:#2b2b2b;transform:rotate(45deg);-webkit-transform:rotate(45deg);-webkit-box-shadow:0 0 0 1px rgba(39,44,48,.05),0 2px 7px 1px rgba(39,44,48,.16);box-shadow:0 0 0 1px rgba(39,44,48,.05),0 2px 7px 1px rgba(39,44,48,.16)}.card-arrow-container .card-arrow-tp{left:50%;top:-10px}.card-arrow-container .card-arrow-rt{top:50%;right:-10px}.card-arrow-container .card-arrow-bt{left:50%;top:calc(100% - 10px)}.card-arrow-container .card-arrow-lt{top:50%;left:-7px}.lg-card-container{cursor:pointer}.lg-card-container a{color:rgba(0,0,0,.83);text-decoration:none}.lg-card-container #quick-view-btn-container :hover{color:#fff!important}.lg-card-container .background-image-group{background-size:contain!important}.lg-card-container.grid-card .card-current-price,.lg-card-container.list-card .card-current-price{font-size:18px}.lg-card-container.grid-card .product-rating .stars,.lg-card-container.list-card .product-rating .stars{display:inline-block}.lg-card-container.grid-card .product-rating span,.lg-card-container.list-card .product-rating span{vertical-align:middle}.lg-card-container.grid-card .product-information>div:not(:last-child),.lg-card-container.list-card .product-information>div:not(:last-child){margin-bottom:5px}.lg-card-container.grid-card img,.lg-card-container.list-card img{width:100%}.lg-card-container.list-card{margin-left:0;padding-left:0}.lg-card-container.list-card .background-image-group{height:100%}.lg-card-container.list-card .product-image{float:left;width:30%;height:270px;max-width:200px;max-height:200px;position:relative}.lg-card-container.list-card .product-image .quick-view-btn-container button{left:calc(50% - 40px)}.lg-card-container.list-card .product-information{width:70%;float:right;padding-left:20px}.lg-card-container.list-card .product-rating .stars{display:inline-block}.lg-card-container.list-card .product-rating span{vertical-align:top}.lg-card-container.list-card .product-information{height:200px;display:table}.lg-card-container.list-card .product-information>div{display:table-cell}.lg-card-container.list-card .product-price .sticker{display:block}.lg-card-container.list-card .wishlist-icon{height:40px;vertical-align:top;display:inline-table;padding-left:0!important}.lg-card-container.list-card .wishlist-icon i{display:table-cell;vertical-align:middle;padding-left:0!important}.lg-card-container.list-card .compare-icon{padding-left:0;display:inline-table}.lg-card-container.list-card .add-to-cart-btn{float:left;display:inline-block}.lg-card-container.grid-card{padding:15px}.lg-card-container.grid-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.lg-card-container.grid-card .product-image img{display:block;height:100%}.lg-card-container.list-card:not(:first-child){margin-top:20px}.carousel-products.with-recent-viewed .btn-add-to-cart,.small-padding{padding:3px 4px!important}.medium-padding{padding:3px 10px!important}.general-container{cursor:pointer}.lg-card-container>.product-card{border:none}.general-container:hover,.lg-card-container:hover,.product-card-new:hover{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.lg-card-container:hover .quick-view-btn-container{display:block}.product-card-new .product-rating,.text-nowrap{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#555}.small-card-container{cursor:pointer;margin-bottom:10px;margin-left:0!important;margin-right:0!important}.small-card-container .material-icons{font-size:16px}.small-card-container .product-image-container{padding:0;display:inline-block}.small-card-container .product-image{height:100%;background-position:50%}.small-card-container .card-body{width:50%;display:inline-block;padding:10px 0!important}.small-card-container .card-body .product-name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.small-card-container .regular-price,.small-card-container .sticker{display:none}.small-card-container:hover{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.text-down-3{top:3px;position:relative}.text-down-4{top:4px;position:relative}.text-down-6{top:6px;position:relative}.text-up-1{top:-1px;position:relative}.text-up-4{top:-4px;position:relative}.text-up-14{top:-14px;position:relative}ul.circle-list{padding-top:10px;text-align:center}ul.circle-list li.circle{width:10px;height:10px;cursor:pointer;border-radius:50%;display:inline-block;border:1px solid #d8d8d8}ul.circle-list li.circle.fill{background:#d8d8d8}ul.circle-list li.circle:not(:last-child){margin-right:6px}.hide{display:none}.category-breadcrumb{font-size:16px}.link-color{color:#4d7ea8}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action a,.account-content .account-layout .bottom-toolbar .pagination a.page-item,a.unset{color:unset!important;text-decoration:none!important}a.active-hover:hover{color:#4d7ea8!important;text-decoration:underline!important}a.remove-decoration,a.remove-decoration:active,a.remove-decoration:focus,a.remove-decoration:hover{text-decoration:none!important}.dropdown-icon:after{display:inline-block;margin-left:1rem;vertical-align:middle;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.disable-box-shadow,.disable-box-shadow:active,.disable-box-shadow:focus,input:focus,select:focus{outline:none!important;box-shadow:none!important;-webkit-box-shadow:0 5px 15px transparent;-o-box-shadow:0 5px 15px transparent;box-shadow:0 5px 15px transparent}.control-error{color:#f05153}.mandatory,.required{width:100%}.mandatory:after,.required:after{content:"*";font-size:16px;margin-left:-1px;color:#f05153}a.default{color:rgba(0,0,0,.83)!important;text-decoration:none!important}.VueCarousel{width:100%;cursor:pointer}.VueCarousel .VueCarousel-inner{padding-top:5px}.VueCarousel .VueCarousel-slide:first-of-type .product-card-new{margin-left:5px}.navigation-hide .VueCarousel-navigation,.pagination-hide .VueCarousel-pagination{display:none}.layered-filter-wrapper,.scrollable{max-height:100%;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}.layered-filter-wrapper::-webkit-scrollbar,.scrollable::-webkit-scrollbar{width:0!important}button[disabled]{opacity:.5;cursor:not-allowed}.max-sm-img-dimention{max-width:110px;max-height:110px}.max-sm-img-dimention img{width:100%;height:100%}.max-width{width:1440px!important;margin:0 auto!important}.styled-select{appearance:none;-moz-appearance:none;-webkit-appearance:none}.styled-select+.select-icon-container{position:relative}.styled-select+.select-icon-container .select-icon{top:-24px;left:unset;right:10px;font-size:16px;position:absolute;pointer-events:none}.down-arrow-container{position:relative;color:rgba(0,0,0,.83);vertical-align:top;display:inline-block}.down-arrow-container .rango-arrow-down{top:10px;left:-5px;font-size:16px;position:absolute}.select-icon{top:5px;left:-7px;font-size:16px;position:relative}.normal-text{color:#141516}.normal-white-text{color:hsla(0,0%,100%,.83)}.display-table{display:table}.display-table .cell{display:table-cell;vertical-align:middle}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon,.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-right-icon,.account-content .sidebar .customer-sidebar .navigation li i.icon,.pagination .page-item.next .angle-left-icon,.pagination .page-item.next .angle-right-icon,.pagination .page-item.previous .angle-left-icon,.pagination .page-item.previous .angle-right-icon,.rango-default{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important}.max-height-350{max-height:350px}.border-normal{border:1px solid #dcdcdc}.has-error input,.has-error select,.has-error textarea{border-color:#f05153!important}.modal-parent{top:0;width:100%;height:100%;position:fixed;background:hsla(0,0%,100%,.9);z-index:125}.compare-icon,.wishlist-icon{height:38px;display:table;cursor:pointer;margin-left:10px}.compare-icon i,.wishlist-icon i{display:table-cell;vertical-align:middle}.qty-btn,.qty-btn>*{height:36px;display:inline-block}.qty-btn>*{padding:0 10px;border:1px solid #ccc;vertical-align:top;line-height:3.5rem}.qty-btn>:not(:first-child){border-left:none;position:relative}.qty-btn>:nth-child(2){left:-4px}.qty-btn>:nth-child(3){left:-7px}.btn-add-to-cart{padding:3px 14px!important;border-radius:0!important;color:#fff!important;border-color:#26a37c!important;background-color:#26a37c!important}.btn-add-to-cart.large{padding:12px 18px}.btn-add-to-cart .rango-cart-1{padding-right:5px}.accordian .accordian-header i.rango-arrow{float:right;font-size:24px}.accordian .accordian-header i.rango-arrow:before{content:"\E908"}.accordian.active .accordian-header i.rango-arrow:before{content:"\E906"}.accordian .accordian-header{width:100%;font-size:18px;cursor:pointer;color:#3a3a3a;margin-top:-1px;padding-bottom:20px;display:inline-block}.accordian .accordian-content{width:100%;display:none;padding-bottom:10px}.accordian.active .accordian-header{padding-bottom:10px}.accordian.active .accordian-content{display:inline-block}.review-page-container{padding:20px;position:relative}.review-page-container>div:first-child{top:40px;position:sticky;height:-webkit-max-content;height:-moz-max-content;height:max-content}.review-page-container .category-breadcrumb{margin-bottom:30px}.review-page-container h2{font-size:24px;font-weight:600}.review-page-container h3{font-size:20px;font-weight:600}.review-page-container h4{font-size:16px;font-weight:600}.review-page-container .customer-reviews>div.row{padding-bottom:30px;display:block}.review-page-container .submit-btn{font-weight:600}.review-page-container .submit-btn button{padding:10px 15px}.customer-rating .rating-container{padding:30px 0}.customer-rating a{color:#4d7ea8}.customer-rating a:hover{text-decoration:none}.customer-rating .col-lg-6:first-child{border-right:1px solid #ccc}.customer-rating .rating-bar{top:12px;padding:0;height:5px;position:relative;background-color:#f7f7f9}.customer-rating .rating-bar>div{width:0;height:100%;background-color:#111}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .customer-rating button.btn.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity .customer-rating button.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.light.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity .customer-rating button.light,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.btn.page-item,.account-content .account-layout .bottom-toolbar .pagination .customer-rating .page-item,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.page-item,.cart-details .customer-rating .light.continue-shopping-btn,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .page-item,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.customer-rating .cart-details .light.continue-shopping-btn,.customer-rating .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item,.customer-rating .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light,.customer-rating .quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.customer-rating .theme-btn.light,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .customer-rating button.page-item,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.page-item{margin-top:10px}.review-form{width:80%}.review-form>div{padding-top:30px}.review-form>div label{font-size:14px;font-weight:500;display:block}.review-form>div input,.review-form>div textarea{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;border:1px solid #ccc}.filters-container{margin:20px 0}.filters-container .toolbar-wrapper>div{margin:0 20px 0 0;display:inline-block}.filters-container .toolbar-wrapper>div label{font-weight:500;margin-right:10px}.filters-container .toolbar-wrapper>div select{cursor:pointer;padding:6px 16px;color:rgba(0,0,0,.83);background-color:#fff}.filters-container .toolbar-wrapper>div .down-icon-position{pointer-events:none;background-color:#fff}.filters-container .toolbar-wrapper>div:not(:first-child){vertical-align:super}.filters-container .toolbar-wrapper .limiter:after{margin-left:10px}.view-mode{margin-bottom:20px}.view-mode .rango-view-grid-container{width:36px;height:36px;cursor:pointer;color:rgba(0,0,0,.83);padding:6px 0 0 5px;display:inline-block}.view-mode .rango-view-grid-container.active{color:#fff;background-color:#26a37c}.view-mode .rango-view-list-container{width:36px;height:36px;cursor:pointer;color:rgba(0,0,0,.83);padding:6px 0 0 5px;display:inline-block}.view-mode .rango-view-list-container.active{color:#fff;background-color:#26a37c}.modal-container{left:50%;top:100px;z-index:11;width:600px;max-width:80%;max-height:80%;position:fixed;font-size:14px;overflow-y:auto;margin-left:-300px;background:#fff;-webkit-animation:jelly .5s ease-in-out;animation:jelly .5s ease-in-out;-webkit-animation:fade-in-white .3s ease-in-out;animation:fade-in-white .3s ease-in-out;border-radius:5px;-webkit-box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2);box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2)}.modal-container .modal-header{padding:20px}.modal-container .modal-header h3{display:inline-block;font-size:20px;color:rgba(0,0,0,.83);margin:0}.modal-container .modal-header .icon{float:right;cursor:pointer}.modal-container .modal-header .icon.remove-icon{width:24px;right:20px;height:24px;margin-right:0;position:absolute;background-image:url("../images/Icon-remove.svg")}.modal-container .modal-body{padding:20px}.modal-container .modal-body .control-group .control{width:100%}.product-card-new{width:12rem;height:385px;border:none!important;margin:0 5px 10px 10px}.product-card-new .category-product-image-container{margin:0 auto;height:190px;position:relative}.product-card-new .category-product-image-container img{max-width:100%;max-height:100%}.product-card-new .product-image-container{max-height:190px;position:relative}.product-card-new .product-image-container img{width:100%;min-height:190px;max-height:190px}.product-card-new .card-current-price{font-size:18px}.product-card-new .product-rating .stars{display:inline-block}.product-card-new .product-rating span{font-size:14px;vertical-align:middle}.product-card-new .product-rating .material-icons{font-size:16px}.product-card-new .card-body{cursor:default}.product-card-new .card-body>div:last-child{margin-top:10px}.product-card-new .card-body .product-name,.product-card-new .card-body .product-rating{width:15rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-card-new .sticker{display:block}.product-card-new .card-body .compare-icon,.product-card-new .card-body .wishlist-icon{left:0;top:10px;display:none;margin-left:5px;margin-right:5px;position:absolute}.product-card-new .card-body .compare-icon{right:0;left:unset}.product-card-new .card-body .add-to-cart-btn{width:100%;position:relative}.product-card-new .card-body .add-to-cart-btn .btn-add-to-cart{width:100%;max-width:140px;max-width:100%!important}.carousel-products.with-recent-viewed .product-card-new .card-body .add-to-cart-btn .btn-add-to-cart,.product-card-new .card-body .add-to-cart-btn .btn-add-to-cart.small-padding,.product-card-new .card-body .add-to-cart-btn .carousel-products.with-recent-viewed .btn-add-to-cart{max-width:130px}.quick-view-btn-container{left:-20px;width:100%;bottom:10px;display:none;position:absolute}.quick-view-btn-container span{left:32%;top:-26px;z-index:1;font-size:16px;color:#fff;position:absolute}.quick-view-btn-container button{left:30%;top:-36px;border:none;color:#fff;font-size:16px;padding:5px 10px 7px 24px;position:absolute;opacity:.8;background-color:#0d2438}.product-card-new:hover #quick-view-btn-container{display:block}.product-card-new:hover .category-product-image-container,.product-card-new:hover .product-image-container{overflow:hidden}.product-card-new:hover .category-product-image-container img,.product-card-new:hover .product-image-container img{-webkit-transition:all .5s;transition:all .5s;-webkit-transform:scale(1.05);transform:scale(1.05)}.product-card-new:hover .compare-icon,.product-card-new:hover .wishlist-icon{display:block}.product-card-new:hover .sticker{display:none}.lg-card-container:hover .product-image{overflow:hidden}.lg-card-container:hover .product-image img{-webkit-transition:all .5s;transition:all .5s;-webkit-transform:scale(1.05);transform:scale(1.05)}.quantity{width:100%;padding-bottom:10px;font-size:16px!important}.quantity label{float:left;padding:5px 15px 10px 0}.quantity button,.quantity input{height:35px;border-radius:2px;vertical-align:top;padding:0 10px!important;font-size:24px!important;font-weight:600!important;color:#111!important;background-color:#fff;border:1px solid #ccc!important}.quantity input{max-width:50px;cursor:default;font-size:16px!important;text-align:center;margin-left:-5px;margin-right:-5px}.quantity button:hover{background-color:#f5f5f5!important}.quantity button:active,.quantity button:focus,.quantity input:active,.quantity input:focus{outline:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.form-container .container{width:65%;margin:0 auto;padding-top:30px}.form-container .container .heading{width:100%;margin-bottom:35px;display:inline-block}.form-container .container .heading h2{line-height:4rem;display:inline-block}.form-container .container .heading .btn-new-customer{float:right;font-size:16px}.form-container .container .body{font-size:16px;padding:35px 55px;margin-bottom:60px;border:1px solid #ccc}.form-container .container .body .form-header{margin-bottom:20px}.form-container .container .body form>div{padding-bottom:20px}.form-container .container .body form>div input{border:1px solid #dcdcdc}.container-right>.recently-viewed{padding-top:20px}.rango-star{cursor:default}.customer-options{top:40px;float:right;padding:20px;width:200px!important}.customer-options .customer-session{padding:10px 20px 0}.customer-options .customer-session label{font-size:18px;color:#9e9e9e;text-transform:uppercase}.customer-options li{padding:3px 0;height:unset!important}.customer-options li a{display:block;padding:0 20px!important}.customer-options a{font-size:16px}.cart-btn-collection button[type=button].btn-secondary{border:none;font-size:16px;color:#111;background-color:#fff}.cart-btn-collection button[type=button].btn-secondary :hover{color:#111!important;background-color:#fff!important}.cart-btn-collection button[type=button].btn-secondary :active,.cart-btn-collection button[type=button].btn-secondary :focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.cart-btn-collection button[type=button].btn-secondary #cart-count{left:-20px;top:-15px;padding:4px;min-width:20px;border-radius:50%;position:relative;color:#fff;background:#21a179}.mini-cart-container #mini-cart{outline:none;-webkit-box-shadow:none;box-shadow:none;text-decoration:unset}.mini-cart-container #mini-cart .badge{border-radius:50%;top:-2px;left:15px;padding:4px;min-width:20px;position:absolute;color:#fff;background:#21a179}.dropdown-icon-custom:after{top:-5px;color:#000;font-size:16px;position:relative;display:inline-block;margin-left:1rem;vertical-align:middle;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}#cart-modal-content{top:44px;z-index:100;width:350px;left:-265px;position:absolute}#cart-modal-content .close{top:12px;right:15px;padding:0;position:relative}#cart-modal-content .mini-cart-container{height:100%;width:100%;font-size:14px;max-height:200px;overflow-y:scroll;padding:10px 15px 0 20px}#cart-modal-content .small-card-container{margin:0;width:100%;padding:0}#cart-modal-content .small-card-container .product-image-container{margin:10px 10px 10px 0;border:1px solid #ececec}#cart-modal-content .small-card-container input{width:30px;text-align:center;font-weight:500;border:1px solid #ececec}#cart-modal-content .small-card-container .card-total-price{float:right}#cart-modal-content .small-card-container .rango-close{top:-10px;left:-10px;padding:0 4px 3px 3px;font-size:10px;max-height:17px;line-height:1.3rem;text-align:center;position:absolute;border-radius:50%;color:#fff;background:#111}#cart-modal-content .small-card-container:hover{-webkit-box-shadow:none;box-shadow:none}#cart-modal-content .modal-footer{padding-right:15px}.cart-details{padding:40px 20px}.cart-details h1{margin-bottom:30px}.cart-details .cart-details-header h2{margin-bottom:20px}.cart-details .cart-details-header .cart-header{max-height:45px;margin-bottom:20px;padding-bottom:20px!important;border-bottom:2px solid #e5e5e5}.cart-details .cart-details-header .cart-header>h3{font-size:16px;font-weight:600}.cart-details .cart-content{padding:0}.cart-details .cart-content .product-quantity .quantity{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.cart-details .cart-content .product-quantity .quantity label{display:none!important}.cart-details .cart-content .cart-item-list>.row{margin-bottom:40px}.cart-details .cart-content .cart-item-list>.row:last-child{padding-bottom:20px;border-bottom:2px solid #e5e5e5}.cart-details .cart-content .cart-item-list .product-image-container{padding:0;max-width:110px;max-height:110px}.cart-details .cart-content .cart-item-list .wishlist-icon{margin:0;display:inline}.cart-details .cart-content .product-details-content{padding-left:20px}.cart-details .cart-content .product-details-content .row{font-size:16px}.cart-details .cart-content .product-details-content .row .card-current-price{font-size:18px}.cart-details .cart-content .product-details-content .row>a{line-height:20px}.cart-details .continue-shopping-btn{max-width:156px;margin-top:20px;margin-left:15px}.cart-details .coupon-container{margin-top:20px}.cart-details .coupon-container .control-error{padding:10px 0}.account-content .sidebar{height:100%}.account-content .sidebar .customer-sidebar{border-right:1px solid #e5e5e5}.account-content .sidebar .customer-sidebar .account-details{text-align:center;padding:25px 20px}.account-content .sidebar .customer-sidebar .account-details .customer-name{width:60px;height:60px;margin:0 auto;font-size:24px;margin-bottom:5px;display:inline-block}.account-content .sidebar .customer-sidebar .account-details .customer-name-text{color:rgba(0,0,0,.83)}.account-content .sidebar .customer-sidebar .account-details .customer-email{color:#9e9e9e}.account-content .sidebar .customer-sidebar .navigation,.account-content .sidebar .customer-sidebar .navigation li{width:100%}.account-content .sidebar .customer-sidebar .navigation li.active,.account-content .sidebar .customer-sidebar .navigation li:hover{color:#28557b;background-color:#ececec}.account-content .sidebar .customer-sidebar .navigation li i.icon{font-size:18px;padding-right:5px}.account-content .sidebar .customer-sidebar .navigation li i.icon.profile:before{content:"\E995"}.account-content .sidebar .customer-sidebar .navigation li i.icon.address:before{content:"\E949"}.account-content .sidebar .customer-sidebar .navigation li i.icon.reviews:before{content:"\E97D"}.account-content .sidebar .customer-sidebar .navigation li i.icon.wishlist:before{content:"\E93E"}.account-content .sidebar .customer-sidebar .navigation li i.icon.orders:before{content:"\E931"}.account-content .sidebar .customer-sidebar .navigation li i.icon.downloadables:before{content:"\E926"}.account-content .sidebar .customer-sidebar .navigation li i.icon.compare:before{content:"\E93B"}.account-content .sidebar .customer-sidebar .navigation li a{display:block;padding:10px 15px}.account-content .sidebar .customer-sidebar .navigation li:last-child{margin-bottom:0}.account-content .account-layout{color:rgba(0,0,0,.83);padding:15px 20px;padding-bottom:60px}.account-content .account-layout.right{padding-left:250px!important}.account-content .account-layout .account-head{margin-bottom:20px}.account-content .account-layout .account-heading{font-size:24px;font-weight:600}.account-content .account-layout .account-table-content .control-group,.account-content .account-layout .account-table-content>.row{margin-bottom:30px}.account-content .account-layout .account-table-content label{font-weight:500}.account-content .account-layout .account-table-content input,.account-content .account-layout .account-table-content select,.account-content .account-layout .account-table-content textarea{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;background:#fff;border:1px solid #ccc}.account-content .account-layout .account-table-content input:active,.account-content .account-layout .account-table-content input:focus,.account-content .account-layout .account-table-content select:active,.account-content .account-layout .account-table-content select:focus,.account-content .account-layout .account-table-content textarea:active,.account-content .account-layout .account-table-content textarea:focus{border-color:#26a37c}.account-content .account-layout .account-table-content .address-holder{margin-top:30px}.account-content .account-layout .account-table-content .address-holder>div{margin:5px 0;padding-left:0}.account-content .account-layout .account-table-content .address-holder .card{height:100%}.account-content .account-layout .account-table-content .address-holder .card ul li{display:inline-block}.account-content .account-layout .account-table-content .account-items-list{margin-bottom:40px}.account-content .account-layout .account-table-content #datagrid-filters{width:100%;margin-bottom:20px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.account-content .account-layout .account-table-content #datagrid-filters .filter-left .icon-wrapper .search-btn{background-size:cover;width:24px;height:24px;background-image:url("../images/icon-search.svg");position:relative;float:right;top:-32px;right:5px}.account-content .account-layout .account-table-content #datagrid-filters>*{display:inline-block;vertical-align:top}.account-content .account-layout .account-table-content #datagrid-filters>.search-filter{top:20px;max-width:200px;margin-right:20px;position:relative}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(2){width:calc(50% - 10px)}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(3){width:calc(50% - 220px)}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(3) .control-group{float:right;max-width:200px}.account-content .account-layout .account-table-content #datagrid-filters>* input,.account-content .account-layout .account-table-content #datagrid-filters>* select{height:38px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters{font-size:16px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .grid-dropdown-header{display:inline-block}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-list li{list-style:none}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-toggle:after{border:unset}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container{width:100%;display:inline-block!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button{display:block;font-size:14px;margin-top:10px;font-weight:600;padding:5px 10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container li:not(:last-child){margin-bottom:10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container li{width:150px;display:inline-block}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .control-group{margin-bottom:0}.account-content .account-layout .account-table-content #datagrid-filters~table.table thead{font-size:18px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody{font-size:16px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr td a{display:block}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .badge{padding:10px;font-size:12px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon{font-size:24px;padding-left:10px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon:hover{color:#4d7ea8}.account-content .account-layout .account-table-content #datagrid-filters .filter-left{float:left}.account-content .account-layout .account-table-content #datagrid-filters .filter-right{top:-25px;width:70%;float:right;position:relative}.account-content .account-layout .account-table-content #datagrid-filters .filter-right .per-page{right:0;position:absolute}.account-content .account-layout .account-table-content .filtered-tags .filter-tag{font-size:16px;margin-right:20px}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon:before{top:1px;content:"\E91F";margin-left:4px;position:relative}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon:hover{cursor:pointer}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .wrapper{color:#000311;margin-left:10px;padding:5px 10px;background:#e7e7e7;letter-spacing:-.22px}.account-content .account-layout .account-table-content.profile-page-content .table{padding:0;width:800px;margin-bottom:15px}.account-content .account-layout .account-table-content.profile-page-content .table>table{width:100%;color:#5e5e5e;border:1px solid rgba(0,0,0,.125)}.account-content .account-layout .account-table-content.profile-page-content .table td{border:unset;padding:6px 12px}.account-content .account-layout .account-table-content .accordian .accordian-header{padding:10px 0;font-weight:600}.account-content .account-layout .account-table-content .image-wrapper{width:100%;margin-top:10px;margin-bottom:20px;display:inline-block}.account-content .account-layout .account-table-content .image-wrapper .image-item{width:200px;height:200px;position:relative;border-radius:3px;margin-right:20px;background:#f8f9fa;margin-bottom:20px;display:inline-block;background-position:50%;background-repeat:no-repeat;background-image:url(/vendor/webkul/ui/assets/images/placeholder-icon.svg)}.account-content .account-layout .account-table-content .image-wrapper .image-item .remove-image{left:0;bottom:0;width:100%;color:#fff;padding:10px;cursor:pointer;margin-bottom:0;text-align:center;position:absolute;margin-right:20px;border-radius:0 0 4px 4px;text-shadow:0 1px 2px rgba(0,0,0,.24);background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.08)),to(rgba(0,0,0,.24)));background-image:linear-gradient(-180deg,rgba(0,0,0,.08),rgba(0,0,0,.24))}.account-content .account-layout .account-table-content .image-wrapper .image-item input{display:none}.account-content .account-layout .account-table-content .image-wrapper .image-item img.preview{width:100%;height:100%}.account-content .account-layout .account-items-list.wishlist-container{width:100%;margin:0 auto}.account-content .account-layout .account-items-list.wishlist-container .product-card-new{width:19rem}.account-content .account-layout .max-sm-img-dimention{max-width:110px;max-height:110px}.account-content .account-layout .max-sm-img-dimention img{width:100%;height:100%}.account-content .account-layout .reviews-container>.row{margin-bottom:40px}.account-content .account-layout .bottom-toolbar .pagination{margin:0}.account-content .account-layout .bottom-toolbar .pagination a:not([href]).next,.account-content .account-layout .bottom-toolbar .pagination a:not([href]).previous{cursor:not-allowed;color:#9e9e9e!important}.account-content .account-layout .bottom-toolbar .pagination .page-item{border:none!important;box-shadow:unset!important;-webkit-box-shadow:unset!important}.account-content .account-layout .bottom-toolbar .pagination .page-item.active{border:1px solid #26a37c;color:#26a37c!important}.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-right-icon{margin:0;font-size:24px;background:unset;text-align:center}.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon:before{content:"\E908"}.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon:before{content:"\E907"}.account-content .account-layout .sale-container{font-size:16px}.account-content .account-layout .sale-container .tabs ul{font-weight:600;font-size:20px;list-style-type:none}.account-content .account-layout .sale-container .tabs ul li{cursor:pointer;padding:10px 15px;display:inline-block;border-bottom:2px solid transparent}.account-content .account-layout .sale-container .tabs ul li.active{cursor:default;border-bottom:2px solid #26a37c}.account-content .account-layout .sale-container .tabs-content .sale-section{padding:20px 0 10px;border-bottom:1px solid #ccc}.account-content .account-layout .sale-container .tabs-content .sale-section .section-title{font-size:18px;font-weight:600;padding-bottom:10px;color:#9e9e9e}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content label+span{font-weight:600;color:#9e9e9e}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals{width:100%;display:inline-block}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals .sale-summary{float:right}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals .sale-summary tbody tr td:first-child{width:200px}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .table table{width:100%}.account-content .account-layout .sale-container .order-box-container{padding:10px 0}.account-content .account-layout .sale-container .order-box-container .box{width:calc(25% - 5px);vertical-align:top;display:inline-block}.account-content .account-layout .sale-container .order-box-container .box .box-title{font-size:18px;padding:10px 0;font-weight:600;color:#9e9e9e}.account-content .select-icon{left:95%;top:-28px;font-size:22px;position:relative}#alert-container{top:50px;right:15px;z-index:100;position:fixed;font-size:16px}#alert-container .alert{max-width:400px!important;min-height:45px!important;max-height:100px!important}#alert-container .alert.alert-dismissible .close{font-size:23px;padding:.3rem 1.25rem}.wishlist-icon{vertical-align:middle}.wishlist-icon i{color:#111}.checkout-process{padding:40px 20px}.checkout-process .col-lg-7 .coupon-container,.checkout-process .col-lg-7>div:not(:first-child){margin-top:20px}.checkout-process h1{font-weight:600;margin-bottom:30px}.checkout-process .layered-filter-wrapper,.checkout-process .scrollable{padding-top:25px}.checkout-process .order-summary-container{top:75px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .checkout-process .order-summary-container button.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity .checkout-process .order-summary-container button,.account-content .account-layout .bottom-toolbar .pagination .checkout-process .order-summary-container .page-item,.cart-details .checkout-process .order-summary-container .continue-shopping-btn,.checkout-process .order-summary-container .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.checkout-process .order-summary-container .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.checkout-process .order-summary-container .account-content .account-layout .bottom-toolbar .pagination .page-item,.checkout-process .order-summary-container.bottom h3,.checkout-process .order-summary-container .cart-details .continue-shopping-btn,.checkout-process .order-summary-container .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,.checkout-process .order-summary-container .theme-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .checkout-process .order-summary-container button{display:none}.checkout-process input[type=radio]{transform:scale(1.3);-ms-transform:scale(1.3);-webkit-transform:scale(1.3)}.checkout-process .styled-select{cursor:pointer}.checkout-process .styled-select+.select-icon{top:55%;left:92%;font-size:20px;position:absolute}.checkout-process .coupon-container input{max-width:200px}.checkout-process .coupon-container button{margin:20px 0 30px}.checkout-process .coupon-container .applied-coupon-details{font-size:16px;margin-bottom:10px}.checkout-process .coupon-container .applied-coupon-details label:first-of-type{color:#26a37c}.checkout-process .coupon-container .rango-close{cursor:pointer;margin-left:5px}.address-container .address-holder{margin-top:15px}.address-container .address-holder>div{margin:5px 0;padding-left:0}.address-container .address-holder .card{height:100%}.address-container .address-holder .card h5{font-size:14px}.address-container .address-holder .card ul li{display:inline-block}.address-container .address-holder .card .add-address-button{height:100%;display:table;text-align:center}.address-container .address-holder .card .add-address-button>div{display:table-cell;vertical-align:middle}.address-container .address-holder .card .add-address-button>div span{vertical-align:super}.custom-form .form-field{padding:0;margin-bottom:30px}.custom-form label{font-weight:500}.custom-form input[type=password],.custom-form input[type=search],.custom-form input[type=text],.custom-form select{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;background:#fff;border:1px solid #ccc}.custom-form input[type=checkbox]{position:relative;top:3px}.custom-form input:active,.custom-form input:focus,.custom-form select:active,.custom-form select:focus{border-color:#26a37c}.payment-form .payment-methods>.row,.payment-form .shipping-methods>.row,.payment-form h3,.review-checkout-conainer .payment-methods>.row,.review-checkout-conainer .shipping-methods>.row,.review-checkout-conainer h3,.shipping-form .payment-methods>.row,.shipping-form .shipping-methods>.row,.shipping-form h3{margin-bottom:20px}.payment-form .payment-methods .instructions,.payment-form .shipping-methods .instructions,.review-checkout-conainer .payment-methods .instructions,.review-checkout-conainer .shipping-methods .instructions,.shipping-form .payment-methods .instructions,.shipping-form .shipping-methods .instructions{margin-top:5px;margin-left:-13px}.payment-form .payment-methods .instructions label,.payment-form .shipping-methods .instructions label,.review-checkout-conainer .payment-methods .instructions label,.review-checkout-conainer .shipping-methods .instructions label,.shipping-form .payment-methods .instructions label,.shipping-form .shipping-methods .instructions label{font-weight:600;font-size:14px}.payment-form .payment-methods .instructions p,.payment-form .shipping-methods .instructions p,.review-checkout-conainer .payment-methods .instructions p,.review-checkout-conainer .shipping-methods .instructions p,.shipping-form .payment-methods .instructions p,.shipping-form .shipping-methods .instructions p{margin:0;font-size:14px;color:#777;font-style:italic}.payment-form .address-summary li,.review-checkout-conainer .address-summary li,.shipping-form .address-summary li{display:inline-block}.payment-form .cart-item-list,.review-checkout-conainer .cart-item-list,.shipping-form .cart-item-list{padding:20px 0;border-bottom:1px solid #e5e5e5}.payment-form .cart-item-list h4,.review-checkout-conainer .cart-item-list h4,.shipping-form .cart-item-list h4{padding-bottom:20px;border-bottom:1px solid #e5e5e5;margin-bottom:20px!important}.payment-form .cart-item-list>.row:first-child,.review-checkout-conainer .cart-item-list>.row:first-child,.shipping-form .cart-item-list>.row:first-child{margin-top:50px}.payment-form .cart-item-list>.row,.review-checkout-conainer .cart-item-list>.row,.shipping-form .cart-item-list>.row{margin-bottom:20px}.payment-form .cart-details,.review-checkout-conainer .cart-details,.shipping-form .cart-details{padding:40px 0}.order-summary-container{top:50px;padding-top:25px;height:-webkit-max-content;height:-moz-max-content;height:max-content;position:sticky!important;max-width:500px!important}.order-summary-container>div{width:100%}.order-summary-container .order-summary{padding:25px 30px;border:1px solid #e5e5e5}.order-summary-container .order-summary>h3{margin-bottom:20px}.order-summary-container .order-summary>.row:not(:last-child){margin-bottom:10px}.order-summary-container .order-summary #grand-total-detail{margin-top:15px;padding-top:15px;margin-bottom:25px;border-top:1px solid #e5e5e5}.order-success-content{padding:40px 20px;font-size:16px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#address-section .form-header h3{margin-bottom:20px}.attached-products-wrapper{margin-top:20px}#related-products-carousel .product-card-new:first-child{margin-left:0!important}.price-label{margin-right:6px}.product-price{height:72px}.product-price .price-label{margin-right:6px}.product-price .regular-price{font-weight:500;margin-right:10px;text-decoration:line-through;display:block}.product-price .price-from .bundle-regular-price{font-size:12px!important;font-weight:500;margin-right:10px;text-decoration:line-through}.product-price .price-from .bundle-special-price{font-size:15px!important;font-weight:600}.product-price .price-from .bundle-to{display:block;font-size:15px!important;font-weight:500;margin-top:1px;margin-bottom:1px}.product-price span.price-label{font-size:16px}.product-price span.final-price{font-size:24px}.sticker{top:8px;left:8px;border:none;color:#fff;display:none;font-size:14px;font-weight:600;padding:2px 10px;position:absolute;border-radius:12px}.sticker.sale{padding:2px 14px;background-color:#f05153}.sticker.new{background-color:#26a37c;display:block}#app{min-height:65vh;position:relative}.main-container-wrapper .sticky-header{top:0;height:55px;z-index:100;position:sticky;background:#fff}.main-container-wrapper .sticky-header.header-shadow{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.search-container{padding:30px 20px}.search-container .lg-card-container.list-card{margin:0 15px}.search-container :first-child{margin-top:0}.method-sticker{font-size:13px;padding:4px 8px;margin-right:3px;margin-bottom:3px;text-align:center;border-radius:1px;display:inline-block;color:#cfcfd0;background-color:#141516}.sidebar{z-index:1000000;width:230px}.sidebar .category-content .category-title{top:-1px;font-weight:600;position:relative}.sidebar .category-content .rango-arrow-right{top:4px;position:relative}.sidebar .category-content .category-icon{width:25px;height:20px;padding-right:5px;display:inline-block}.sidebar .category-content .category-icon img{width:100%;height:100%;vertical-align:text-top}.sidebar li:hover>a>span{color:#28557b}.sidebar .sub-categories{display:none}.sidebar .sub-categories .category{padding:5px 0 4px 15px}.sidebar .sub-categories .category+.nested{color:rgba(0,0,0,.83)}.sidebar .sub-categories .category+.nested li a{padding-top:0}.sidebar .sub-categories .category+.nested li a .category-title{font-weight:500;padding-left:28px}.sidebar .sub-categories .category .category-title{vertical-align:top}.category-list-container{z-index:10;padding:0!important;background:#fff;position:absolute!important;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.category-list-container .category{width:100%;line-height:2.5rem;display:inline-block}.category-list-container .category span{top:-4px;position:relative}.category-list-container li a{padding:7px 0 5px 15px}.category-list-container li a:hover{background:#ececec}.category-list-container .sub-categories{top:-1px;left:100%;height:100%;min-height:330px;z-index:100;padding-top:10px;position:absolute;background:#fff;border-left:1px solid #ccc;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);overflow-y:auto}.category-list-container .sub-categories li:last-of-type{margin-bottom:10px}#sidebar-level-0{display:none;z-index:100000;border-top:1px solid #ccc}.grouped-product-container .grouped-product-list ul li{width:100%;font-size:18px;margin-bottom:10px;display:inline-block}.grouped-product-container .grouped-product-list ul li:last-child{margin-bottom:0}.grouped-product-container .grouped-product-list ul li:first-child span{font-weight:600}.grouped-product-container .grouped-product-list ul li:first-child span:last-child{float:right;width:50px;text-align:left}.grouped-product-container .grouped-product-list ul li .name{font-size:16px;vertical-align:middle;display:inline-block}.grouped-product-container .grouped-product-list ul li .qty{float:right}.grouped-product-container .grouped-product-list ul li .qty .control-group{height:45px;width:auto;border-top:0;padding-top:0;margin-bottom:0;max-width:none;text-align:center}.grouped-product-container .grouped-product-list ul li .qty .control-group label{display:none}.grouped-product-container .grouped-product-list ul li .qty .control-group .control{width:60px;text-align:center;line-height:38px}.grouped-product-container .grouped-product-list ul li .qty .control-group>*{height:100%}.bundle-options-wrapper .bundle-option-list{padding:15px 0;border-top:1px solid hsla(0,0%,64%,.2)}.bundle-options-wrapper .bundle-option-list h3{font-size:16px;margin:0;color:#242424}.bundle-options-wrapper .bundle-option-list .bundle-option-item{border-bottom:1px solid hsla(0,0%,64%,.2);padding:15px 0;width:100%;display:inline-block}.bundle-options-wrapper .bundle-option-list .bundle-option-item:last-child{border-bottom:0;padding-bottom:0}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group{margin-bottom:0;color:#5e5e5e}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group label{color:#242424}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group .control{color:#5e5e5e}.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity{border-top:0;padding-bottom:0}.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity.has-error button{border-color:#fc6868;color:#fc6868}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-error{float:left;width:100%}.bundle-options-wrapper .bundle-option-list .bundle-option-item.has-error button{border-color:#fc6868;color:#fc6868}.bundle-options-wrapper .bundle-summary{padding:15px 0;border-top:1px solid hsla(0,0%,64%,.2)}.bundle-options-wrapper .bundle-summary h3{font-size:16px;margin:0;color:#242424}.bundle-options-wrapper .bundle-summary .quantity{border-top:0}.bundle-options-wrapper .bundle-summary .bundle-price{font-weight:600;font-size:24px;color:#ff6472;margin-top:10px}.bundle-options-wrapper .bundle-summary ul.bundle-items li{margin-bottom:20px}.bundle-options-wrapper .bundle-summary ul.bundle-items li:last-child{margin-bottom:0}.bundle-options-wrapper .bundle-summary ul.bundle-items li .selected-products{color:#5e5e5e}.category-container .grid-card,.search-container .grid-card{width:15rem}.downloadable-container .sample-list{padding:5px 0}.downloadable-container .sample-list h3{font-size:16px;margin-top:0}.downloadable-container .sample-list ul li{margin-bottom:5px}.downloadable-container .sample-list ul li:last-child{margin-bottom:0}.downloadable-container .link-list{padding:5px 0}.downloadable-container .link-list h3{font-size:16px;margin-top:0}.downloadable-container .link-list ul li{margin-bottom:15px}.downloadable-container .link-list ul li:last-child{margin-bottom:0}.downloadable-container .link-list ul li .checkbox input[type=checkbox]{width:15px!important;height:15px!important;margin-left:-24px}.downloadable-container .link-list ul li a{float:right;margin-top:3px}.category-container{min-height:670px;margin-left:15px;padding:40px 15px!important}.category-container .hero-image{display:inline-block}.category-container .hero-image img{width:100%;height:100%;max-height:500px;margin-bottom:30px}.vue-slider .vue-slider-rail{background-color:#ccc}.vue-slider .vue-slider-dot-handle{width:100%;height:100%;border-radius:50%;background-color:#fff;-webkit-box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32)}.vue-slider .vue-slider-dot-tooltip-inner,.vue-slider .vue-slider-dot-tooltip-text{border-color:#26a37c!important;background-color:#26a37c!important}.vue-slider .vue-slider-dot-tooltip-text{display:block;font-size:14px;min-width:20px;padding:2px 5px;text-align:center;border-radius:5px;white-space:nowrap;color:#fff}.vue-slider .vue-slider-dot-tooltip-text:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\0;border-top-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider .vue-slider-process{background-color:#26a37c!important}.full-content-wrapper>.container-fluid{padding:0!important;margin-bottom:60px!important}.full-content-wrapper>.container-fluid>.row{padding:0 15px!important}.full-content-wrapper div>.container-fluid,.full-content-wrapper p>.container-fluid{padding:0!important;margin-bottom:60px!important}.full-content-wrapper div>.container-fluid>.row,.full-content-wrapper p>.container-fluid>.row{padding:0 15px!important}.slides-container{position:relative}.slides-container .VueCarousel-pagination{display:none}.slides-container .VueCarousel-pagination button:active,.slides-container .VueCarousel-pagination button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.slides-container .VueCarousel-pagination .VueCarousel-dot{padding:5px!important}.slides-container .VueCarousel-dot--active{background-color:#26a37c!important}.slides-container .VueCarousel .VueCarousel-inner{padding-top:0}.slides-container .VueCarousel .VueCarousel-slide{position:relative}.slides-container .VueCarousel .VueCarousel-slide .show-content{top:0;left:0;width:100%;height:100%;display:table;text-align:center;position:absolute}.slides-container .VueCarousel .VueCarousel-slide .show-content p{display:table-cell;vertical-align:middle}.slides-container .VueCarousel .VueCarousel-slide:not(:first-of-type) img{display:none}.filter-attributes-item{margin-bottom:10px;border-bottom:1px solid #ccc}.filter-attributes-item.active .filter-attributes-content{display:block}.filter-attributes-item .filter-input{margin:10px 15px 13px -4px}.filter-attributes-item .filter-input input[type=text]{text-align:center;border:1px solid #26a37c;width:30%;background-color:#fff}.filter-attributes-item input[type=checkbox]+span{margin-left:10px!important}.filter-attributes-content{display:none;margin-left:7px}.layered-filter-wrapper{max-height:670px;overflow-x:hidden;margin-bottom:42px;padding:42px 10px 0}.layered-filter-wrapper .recently-viewed{margin-top:20px}.layered-filter-wrapper .recently-viewed h2{font-size:18px}.selective-div{width:150px;-webkit-appearance:none}.select-icon-margin{margin-top:10px;margin-left:96px}.down-icon-position{position:absolute}.select-icon-show-margin{margin-left:35px;margin-top:10px}.down-arrow-margin{margin-left:75px;margin-top:8px}.vc-header{z-index:10;margin:0!important;padding:0!important;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.23);box-shadow:0 1px 3px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.23)}.new-products-recent{top:-44px;position:relative}.recently-viewed-products-wrapper{padding:2px}.recently-viewed-products-wrapper .price-from .bundle-regular-price{display:none}.recently-viewed-products-wrapper .price-from .bundle-special-price{font-size:15px!important;font-weight:600}.recently-viewed-products-wrapper .price-from .bundle-to{display:unset;margin:0 2px;font-size:15px!important;font-weight:500}.pagination{width:100%}.pagination .page-item{padding:0 10px}.pagination .page-item.active{font-weight:600;color:#26a37c!important;border-bottom:2px solid #26a37c}.pagination .page-item.next .angle-left-icon,.pagination .page-item.next .angle-right-icon,.pagination .page-item.previous .angle-left-icon,.pagination .page-item.previous .angle-right-icon{margin:0;font-size:24px;background:unset;text-align:center}.pagination .page-item.next .angle-right-icon:before{content:"\E908"}.pagination .page-item.previous .angle-left-icon:before{content:"\E907"}.pagination a{color:unset!important;text-decoration:none!important}.pagination a i{top:2px;font-size:18px;position:relative}.pagination .angle-left-icon,.pagination .angle-right-icon{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important;background:unset}.pagination .angle-right-icon:before{content:"\E908"}.pagination .angle-left-icon:before{content:"\E907"}.carousel-products+.recently-viewed{top:-40px;position:relative}.carousel-products .VueCarousel-slide{cursor:default}.vue-slider{max-width:97%}.profile-update-form{width:800px}.compare-products{width:100%;cursor:pointer;overflow-x:auto;padding-bottom:20px;word-break:break-word;margin-left:0!important;margin-right:10px!important}.compare-products .active{cursor:grabbing;cursor:-webkit-grabbing;-webkit-transform:scale(1);transform:scale(1)}.compare-products tr{width:100%}.compare-products td{padding:15px;min-width:250px;max-width:250px;vertical-align:top}.compare-products .image-wrapper{width:100%}.compare-products .stars i{font-size:16px}.compare-products .action{position:relative}.compare-products .action .btn-add-to-cart{width:125px!important;white-space:pre-wrap}.compare-products .action .close-btn{right:0;top:6px;position:absolute;display:inline-block}.compare-products .action .close-btn:hover{font-weight:600}.compare-products .action .compare-icon{display:none}.compare-products .material-icons.cross{top:5px;right:20px;cursor:pointer;position:absolute}.compare-products .wishlist-icon{top:5px;right:60px;position:absolute;display:inline-block}.compare-products::-webkit-scrollbar{display:none}.compare-products{-ms-overflow-style:none;scrollbar-width:none}.cp-spinner{width:48px;height:48px;position:absolute;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;left:calc(50% - 24px);margin-top:calc(40% - 24px)}.overlay-loader{top:50%;left:50%;z-index:11;position:fixed;margin-top:-24px;margin-left:-24px}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}.cp-round:before{border-radius:50%;border:6px solid grey}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #26a37c;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.image-search-container{top:9px;right:45px;z-index:10;cursor:pointer;position:absolute;background:#fff;height:24px!important}.image-search-result{width:100%;padding:20px;border-radius:2px;margin-bottom:20px;display:inline-block;border:1px solid #0041ff;background-color:rgba(0,65,255,.1)}.image-search-result .searched-image{float:left}.image-search-result .searched-image img{width:150px;height:auto;-webkit-box-shadow:1px 1px 3px 0 rgba(0,0,0,.32);box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)}.image-search-result .searched-terms{margin-left:20px;display:inline-block}.image-search-result .searched-terms .term-list a{padding:5px 8px;margin-top:10px;background:#fff;margin-right:10px}.filtered-tags{margin-bottom:20px}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{scroll-behavior:smooth}body .container-margin{margin:auto 20px}.root-category-menu{border-bottom:1px solid #d8e6ed}.angle-right-icon{width:22px;height:20px;float:right;margin-right:10px;background-image:url("../images/Icon-Arrow-Right.svg")}.card-product-image-container{height:300px;min-height:100px;max-height:300px}.card-product-image-container img{width:100%;height:100%}.card-product-image-container .background-image-group{width:100%;height:100%;background-position:50%;background-repeat:no-repeat}.hide-text{white-space:nowrap;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden!important}.card-bottom-container{margin-top:12px}.card-actual-price{text-decoration:line-through}.card-discount{color:rgba(38,163,124,.83)}.no-border-shadow{border:none!important;box-shadow:none!important;-webkit-box-shadow:none!important}.card-bottom-container .rango-heart{float:right;margin-top:8px;cursor:pointer;font-size:20px}.disable-active:active,.disable-active:focus,header #search-form>:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.container-margin>.container-fluid{margin-bottom:60px}.v-mr-20{margin-right:2rem}.popular-product-categories .active{color:#4d7ea8;padding:0 10px 5px;display:inline-block;border-bottom:2px solid}.popular-product-categories .switch-buttons{top:-3px;position:relative}.align-vertical-super{vertical-align:super}.align-vertical-top{vertical-align:top}.card-sale-btn{top:5px}.star-rating>*{font-size:14px}.advertisement-four-container .offers-ct-panel>.row{padding:0 10px}.advertisement-four-container .offers-ct-panel a:first-child{padding-bottom:15px!important}.advertisement-four-container .offers-ct-panel .offers-ct-top{height:180px}.advertisement-four-container .offers-ct-panel .offers-ct-bottom{height:220px}.advertisement-four-container>.row:first-child{padding:0 10px!important}.advertisement-four-container .col-4:nth-child(2){padding-left:10px;padding-right:10px}.advertisement-four-container img{width:100%;height:100%;max-height:425px}.advertisement-four-container img:first-of-type,.advertisement-four-container img:last-child{padding:0}.advertisement-two-container img{width:100%}.advertisement-three-container img{height:100%}.advertisement-three-container .bottom-container img,.advertisement-three-container .top-container img{height:225px}.advertisement-three-container .bottom-container{padding-top:15px}.recently-viewed-items{padding-left:10px!important;padding:0!important}.product-policy-container .card{border:none;padding:20px 10px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.product-policy-container .card .policy{display:table;padding:0 10px}.product-policy-container .card .policy .left{margin-right:10px;display:inline-block}.product-policy-container .card .policy .right{display:table-cell;vertical-align:middle}.product-policy-container .product-policy-wrapper:first-of-type{padding-left:0}.product-policy-container .product-policy-wrapper:last-of-type{padding-right:0}.category-with-custom-options img{width:100%;max-width:100%;height:100%;max-height:100%}.category-with-custom-options .row:first-child{margin-bottom:0}.category-with-custom-options .row:first-child .category-image{height:350px}.category-with-custom-options .row:first-child > div{padding:0;background-repeat:no-repeat}.category-with-custom-options .row:first-child > div:first-child,.category-with-custom-options .row:first-child > div:nth-child(3){max-height:345px}.category-with-custom-options .row:nth-child(2) .category-image{height:350px}.category-with-custom-options .row:nth-child(2)>div{padding:0;background-repeat:no-repeat}.category-with-custom-options .row:nth-child(2)>div:nth-child(2),.category-with-custom-options .row:nth-child(2)>div:nth-child(4){max-height:345px}.category-with-custom-options .categories-collection{width:100%;height:100%;display:table;min-height:310px;max-height:345px;padding-left:36px;background:#2b2b2b}.category-with-custom-options .categories-collection h2{color:#fff}.category-with-custom-options .categories-collection li{color:hsla(0,0%,100%,.83)}.category-with-custom-options .categories-collection .category-text-content{height:100%;display:table-cell;vertical-align:middle}.hot-categories-container .hot-category-wrapper{padding:0 10px 0 0}.hot-categories-container .hot-category-wrapper .card{height:100%;padding:20px;border:none}.hot-categories-container .hot-category-wrapper .velocity-divide-page .left{width:30px;height:30px;margin-left:10px}.hot-categories-container .hot-category-wrapper .velocity-divide-page .left img{width:100%;height:100%}.hot-categories-container .hot-category-wrapper .velocity-divide-page .right{padding-left:50px!important}.hot-categories-container .hot-category-wrapper:nth-last-child(2){padding:0}.hot-categories-container .hot-category-wrapper:last-child{padding:0 0 0 10px}.hot-categories-container ul,.popular-categories-container ul{line-height:2.5rem}.hot-categories-container li,.popular-categories-container li{font-size:16px}.popular-categories-container .popular-category-wrapper{padding:0 8px}.popular-categories-container .popular-category-wrapper .card{height:100%;border:none}.popular-categories-container .popular-category-wrapper .card .category-image{height:180px}.popular-categories-container .popular-category-wrapper .card .category-image img{width:100%;height:100%}.popular-categories-container .popular-category-wrapper .card-image{height:180px;background-size:100% 100%;background-image:url("../images/man.png")}.popular-categories-container .popular-category-wrapper .card-description{padding:10px 20px}.popular-categories-container .popular-category-wrapper:first-child{padding-left:0}.popular-categories-container .popular-category-wrapper:nth-last-child(2){padding-right:0}.popular-categories-container .popular-category-wrapper:last-child{padding-left:16px;padding-right:0}.reviews-container .review-wrapper:first-of-type{padding:0 8px 0 0}.reviews-container .review-wrapper{padding:0 8px}.reviews-container .review-wrapper:nth-last-of-type(2){padding:0 0 0 8px}.reviews-container .review-wrapper:last-of-type{padding:0 0 0 16px}.reviews-container .card{border:none;height:100%;padding:20px;padding-left:15px;padding-right:15px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.reviews-container .card .customer-info>div{padding:0;display:inline-block}.reviews-container .card .customer-info>div:first-child{width:60px;margin-right:10px}.reviews-container .card .customer-info>div:last-child{width:calc(100% - 75px)}.reviews-container .card .review-info{height:100%;padding:20px 15px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.reviews-container .card .review-info>div:not(:last-child){margin-bottom:10px}.reviews-container .card .review-info .star-ratings{margin-bottom:5px!important}.main-content-wrapper,.reviews-container .product-info{display:inline-block}.main-content-wrapper>.row.disabled{cursor:not-allowed}.main-content-wrapper .main-category{padding:8px 15px;border-top:1px solid #ccc;border-bottom:5px solid transparent}.main-content-wrapper .content-list{margin:0;width:100%;height:42px;text-align:left;list-style:none;position:relative;vertical-align:top;display:inline-block}.main-content-wrapper .content-list ul{width:100%;height:100%;white-space:nowrap;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;background-color:#4d7ea8;overflow-x:auto}.main-content-wrapper .content-list ul li a{display:block;cursor:pointer;font-size:16px;font-weight:600;padding:8px 15px;letter-spacing:0;position:relative;color:#fff;text-decoration:none}.main-content-wrapper .content-list ul li:hover{background-color:#42719a}.velocity-divide-page{position:relative}.velocity-divide-page .left{z-index:1;width:230px;position:absolute}.velocity-divide-page .right{width:100%;padding-left:230px!important}.container-right{width:100%;display:inline-block}.container-right>:first-child{width:100%}.home-base{margin-bottom:60px}.broken-image{width:320px;height:160px;background-image:url("../images/static/broken-clock.png")}.velocity-icon{width:150px;height:150px;background-image:url("../images/static/v-icon.png")}.error-page{padding-top:30vh}.custom-circle{width:56px;height:54px;padding:14px;font-size:20px;color:#21a179;border-radius:50%;text-align:center;background:#fff;display:inline-block;vertical-align:middle;border:2px solid #21a179;font:18px josefin sans,arial}body:after{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(71,55,78,.8);opacity:0;-webkit-transition:opacity .3s 0s,visibility 0s .3s;transition:opacity .3s 0s,visibility 0s .3s}.cd-quick-view{top:100px;width:700px;z-index:101;padding:40px;display:none;position:absolute;margin-bottom:50px;left:calc(50% - 350px);background-color:#fff;-webkit-box-shadow:0 0 30px rgba(0,0,0,.2);box-shadow:0 0 30px rgba(0,0,0,.2);-webkit-transform:translateZ(0);transform:translateZ(0);backface-visibility:hidden;will-change:left,top,width;-webkit-backface-visibility:hidden}.cd-quick-view .cd-slider li.selected img{width:100%;height:100%;display:inline-block!important}.cd-quick-view .cd-slider img{display:none}.cd-quick-view .close-btn{top:15px;right:20px;font-weight:600;position:absolute}.cd-quick-view .action-buttons{padding-top:10px;margin-left:118px}.cd-quick-view .action-buttons>span{font-size:24px;margin-left:24px}.cd-quick-view .product-actions{display:inline-block}.cd-quick-view .product-actions .compare-icon,.cd-quick-view .product-actions .wishlist-icon{height:38px;display:inline-table;cursor:pointer;margin-left:10px}.cd-quick-view .product-actions .compare-icon i,.cd-quick-view .product-actions .wishlist-icon i{display:table-cell;vertical-align:middle}.cd-quick-view .product-actions .wishlist-icon{float:right}.cd-quick-view .product-actions .add-to-cart-btn{float:left}.cd-quick-view .quick-view-name{font-size:24px;line-height:25px}.cd-quick-view .product-price{margin-top:10px}.cd-quick-view .product-rating{display:table;margin:10px 0}.cd-quick-view .product-rating a,.cd-quick-view .product-rating span{vertical-align:top;display:table-cell}.cd-quick-view .product-gallery{top:10px;position:sticky}.cd-quick-view .product-gallery .VueCarousel-pagination button{padding:0!important;margin:3px!important;border:1px solid #dcdcdc!important;background-color:#fff!important}.cd-quick-view .product-gallery .VueCarousel-pagination button.VueCarousel-dot--active{background-color:#dcdcdc!important}.cd-quick-view .product-gallery .VueCarousel-pagination button.VueCarousel-dot--active:focus{outline:none}.cd-quick-view .description-text{word-break:break-word;overflow:auto}.container{max-width:1300px!important}.slider-container{min-height:400px}.category-page-wrapper,.remove-padding-margin{width:100%!important;margin:0!important;padding:0!important}.demo{border:1px solid red}.quick-addtocart-btn{margin-top:306px;margin-left:-82px}.model-display-block{display:block}.footer{width:100%;background-color:#fff;display:inline-block}.footer .footer-content .newsletter-subscription{color:#fff;padding:10px 130px;background-color:#4d7ea8}.footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{width:300px;border:none;height:38px;font-size:18px;max-width:250px;padding:10px 20px;color:rgba(0,0,0,.83)}.footer .footer-content .newsletter-subscription .newsletter-wrapper button.subscribe-btn{left:-2px;height:38px;font-size:18px;max-width:110px;line-height:10px;position:relative}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons{height:100%;padding:20px 0;color:#fff}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons i{margin:0;cursor:pointer}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons .within-circle{background:#4d7ea8;margin-right:2px;border:1px solid hsla(0,0%,100%,.52)}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons .within-circle:hover{opacity:.5}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons img{background:#4d7ea8;border:1px solid hsla(0,0%,100%,.52);padding-left:15px;padding-right:15px}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{text-align:right;padding:25px 0 30px}.footer .footer-content>.row{padding:60px 130px;background:#30383f}.footer .footer-content>.row .logo{width:auto;max-height:40px}.footer .footer-content>.row .footer-ct-content>div{margin:0;padding:0;font-size:14px;line-height:2.5rem}.footer .footer-content>.row .footer-ct-content>div ul{margin-bottom:0}.footer .footer-content>.row .footer-ct-content>div ul li{margin-bottom:5px}.footer .footer-content>.row .footer-ct-content>div ul li a{color:hsla(0,0%,100%,.83)}.footer .footer-content>.row .footer-rt-content{padding-right:0}.footer .footer-content>.row .footer-rt-content .row>div{width:100%;display:block}.footer .footer-content>.row .footer-rt-content .row .bg-image,.footer .footer-content>.row .footer-rt-content .row .small-card-container .product-image,.small-card-container .footer .footer-content>.row .footer-rt-content .row .product-image{width:42px;height:30px;display:inline-block;background-position:0}.footer .footer-content>.row .footer-rt-content .row .bg-image:not(:last-child),.footer .footer-content>.row .footer-rt-content .row .small-card-container .product-image:not(:last-child),.small-card-container .footer .footer-content>.row .footer-rt-content .row .product-image:not(:last-child){margin-right:3px}.footer .footer-content>.row .footer-rt-content .row .cash{background-image:url("../images/static/cash.png")}.footer .footer-content>.row .footer-rt-content .row .cheque{width:57px!important;background-image:url("../images/static/cheque.png")}.footer .footer-content>.row .footer-rt-content .row .visa{background-image:url("../images/static/visa.png")}.footer .footer-content>.row .footer-rt-content .row .master-card{background-image:url("../images/static/master-card.png")}.footer .footer-content>.row .footer-rt-content .row .paypal{background-image:url("../images/static/paypal.png")}.footer .footer-content>.row .footer-rt-content .row .discover{background-image:url("../images/static/discover.png")}.footer .footer-content>.row .footer-rt-content .row:not(:last-child){padding-bottom:20px}.footer .footer-content>.row .footer-rt-content h3{font-size:14px;color:hsla(0,0%,100%,.52)}.footer .footer-content .footer-statics .software-description{padding-left:0}.footer .footer-content .footer-statics .software-description p{font-size:14px}.footer .top-brands{padding:30px 130px}.footer .top-brands .top-brands-body ul{width:85%;display:inline-block}.footer .top-brands .top-brands-body ul li{margin-left:0;font-size:16px;padding:15px 0 0;display:inline-block}.footer .footer-copy-right{width:100%;height:60px;font-size:16px;line-height:6rem;text-align:center;background:#30383f;color:hsla(0,0%,100%,.83)}.footer .footer-copy-right p{padding:0 20px}.footer .footer-copy-right a{color:unset}.footer .footer-copy-right a:hover{color:#4d7ea8}.product-detail{padding-top:20px;margin-bottom:20px;padding-left:0!important;padding-right:0!important}.product-detail .right>div{border-bottom:1px solid #ccc}.product-detail .right>div.attributes .attribute{margin-bottom:20px}.product-detail .right>div.attributes .attribute:last-child{margin-bottom:30px}.product-detail .right .category-breadcrumb{margin-left:0;padding:0 15px}.product-detail .right .reviews{vertical-align:top}.product-detail .right .reviews>div{display:inline-block}.product-detail .right .info{margin-left:0}.product-detail .right .info>h2,.product-detail .right .info div{padding-left:0}.product-detail .right .info>*{margin-bottom:10px}.product-detail .right .info .availability button{border:none;color:#fff;font-weight:600;cursor:default;padding:2px 11px;background:#f05153}.product-detail .right .info .availability button.active{background:#4d7ea8}.product-detail .right .options .box{width:32px;height:32px;display:inline-block;background-color:#ccc}.product-detail .right h3{margin-bottom:0}.product-detail .right .row.reviews .reviews-text{line-height:3rem}.product-detail .right .add-to-cart-btn{padding:0}.product-detail .right .add-to-cart-btn button{text-transform:uppercase;padding:9px 15px!important}.product-detail .right .add-to-cart-btn button span{top:0;font-size:16px}.product-detail .right .product-price{height:unset}.product-detail .right .product-price .price-from .bundle-regular-price{font-size:20px!important;font-weight:500;margin-right:10px;text-decoration:line-through}.product-detail .right .product-price .price-from .bundle-special-price{font-size:20px!important;font-weight:600}.product-detail .right .product-price .price-from .bundle-to{display:block;font-size:20px!important;font-weight:500;margin-top:1px;margin-bottom:1px}.product-detail .right .quantity{width:unset}.product-detail .right .form-group label{display:block}.product-detail .right .form-group .radio{margin-right:10px}.product-detail .right .form-group .radio input[type=radio]{margin-left:0;position:static}.product-detail .right .form-group .radio .radio-view{display:none}.product-detail .thumb-list{left:15px;z-index:99;padding:0;overflow:hidden;margin-top:10px;position:relative}.product-detail .thumb-list .arrow{left:0;height:100%;z-index:1001;opacity:.5;margin-top:5px;cursor:pointer;position:absolute;line-height:13em;background:#dcdcdc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.product-detail .thumb-list .arrow.right{right:0;left:unset;line-height:13rem}.product-detail .thumb-list .thumb-frame{padding:1px;border:1px solid transparent}.product-detail .thumb-list .thumb-frame.active{border:1px solid #26a37c}.product-detail .thumb-list .small-card-container .thumb-frame>.product-image,.product-detail .thumb-list .thumb-frame>.bg-image,.small-card-container .product-detail .thumb-list .thumb-frame>.product-image{width:100%;height:110px;background-size:100% 100%;background-position-y:center}.product-detail .product-actions>div{display:inline-block}.product-detail .product-actions>div .add-to-cart-btn{float:left}.product-detail .product-actions>div .compare-icon,.product-detail .product-actions>div .wishlist-icon{height:46px;margin-left:0;padding-left:10px}.product-detail .product-actions>div .compare-icon i,.product-detail .product-actions>div .wishlist-icon i{display:table-cell;vertical-align:middle}.product-detail .product-actions>div .compare-icon{display:inline-table}.product-detail .product-actions>div .wishlist-icon{float:right}.product-detail #product-form,.product-detail .layouter{height:100%}.product-detail #product-form .form-container{height:100%;position:relative}.product-detail #product-form .form-container>.left{top:60px;padding:0;position:sticky}.product-detail #product-form .form-container>.left .product-image-group>div{margin:0;padding:0}.product-detail #product-form .form-container .right .swatch-container{margin-top:10px;display:block}.product-detail #product-form .form-container .right .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}.product-detail #product-form .form-container .right .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}.product-detail #product-form .form-container .right .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}.product-detail #product-form .form-container .right .swatch-container .swatch input:checked+img,.product-detail #product-form .form-container .right .swatch-container .swatch input:checked+span{border:1px solid #242424}.product-detail #product-form .form-container .right .swatch-container .swatch input{display:none}.product-detail #product-form .form-container .right .swatch-container .no-options{color:#fb3949}.product-detail .accordian.active .accordian-header{padding-bottom:0}.product-detail .accordian-content div,.product-detail .description{overflow:auto}.product-detail .full-description{font-size:14px}.product-detail .full-specifications tr td:first-child{width:100px}.product-detail select[disabled=disabled]{cursor:not-allowed;border-color:#dcdcdc;background-color:#dcdcdc}.store-meta-images{margin-top:20px}.store-meta-images img{width:100%;height:100%;max-height:300px}.related-products{margin-bottom:60px}.vc-small-screen{display:none!important}@media only screen and (max-width:1192px){.sticky-header,.vc-full-screen{display:block!important}.vc-small-screen{display:none!important}#main-category{display:block!important}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons{width:100%;padding:5px 0;text-align:center!important}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{width:100%;padding:10px 0;text-align:center}.footer .footer-content .footer-statics>div:not(:last-child){margin-bottom:30px}.slider-container{min-height:290px}}@media only screen and (max-width:992px){body.open-hamburger{color:#7f7f7f;opacity:.8;overflow:hidden}#webheader{position:fixed;background-color:#fff}#main-category,#webheader{display:none!important}#home-right-bar-container{position:relative;top:-48px}.sticky-header,.vc-full-screen{display:none!important}.vc-small-screen{display:block!important}.force-center{margin:0 auto!important}.main-content-wrapper{z-index:100;margin-bottom:25px;background-color:#fff}.main-content-wrapper .vc-header{top:0;margin:0;padding:0;width:100%;height:50px;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.main-content-wrapper .vc-header>div{display:none}.main-content-wrapper .vc-header>div.vc-small-screen{display:block}.main-content-wrapper .vc-header>div.vc-small-screen img{width:100%;height:100%;max-height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .hamburger-wrapper{display:inline-block;height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .hamburger-wrapper .hamburger{top:12px;font-size:24px;position:relative}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header{position:relative;z-index:2;display:table;text-align:right;height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header>a{display:table-cell;vertical-align:middle}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container,.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-wrapper{top:-32px;left:-12px;position:relative}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container .badge,.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-wrapper .badge{z-index:10;border-radius:50%;position:absolute;background:#26a37c}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container{left:4px;margin-right:10px}#top{display:none}.product-card-new{max-width:19rem}.product-card-new.grid-card .card-body .product-name{width:13rem}.product-card-new.grid-card .card-body .product-rating{display:none}.product-card-new.grid-card .card-body .add-to-cart-btn{padding:0;display:table}.carousel-products.with-recent-viewed .product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .btn-add-to-cart,.product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .carousel-products.with-recent-viewed .btn-add-to-cart,.product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .small-padding.btn-add-to-cart{padding:3px 14px!important}.product-card-new.grid-card .card-body .add-to-cart-btn~a{position:relative}.product-card-new.grid-card .card-body .add-to-cart-btn~a.compare-icon{right:0}.product-card-new.grid-card .card-body .add-to-cart-btn~a.wishlist-icon{padding:0;left:10px;max-width:25px}.product-card-new.grid-card #quick-view-btn-container{display:none}.advertisement-four-container .offers-ct-panel{padding:8px 0}.advertisement-four-container .offers-ct-panel a:first-child{padding-bottom:10px!important}.advertisement-three-container .bottom-container img,.advertisement-three-container .top-container img{padding:0;height:unset}.advertisement-three-container .second-panel{padding-top:10px}.advertisement-two-container a:nth-of-type(2){padding:15px 0 0}.category-with-custom-options{display:none}.category-with-custom-options.vc-small-screen{display:block}.category-with-custom-options.vc-small-screen .smart-category-container .col-12{padding:0}.category-with-custom-options.vc-small-screen .smart-category-container:not(:first-child){padding-top:20px}.footer .footer-content .newsletter-subscription{padding:10px 20px}.footer .footer-content .newsletter-subscription .newsletter-wrapper{margin:0;padding:0}.footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{width:200px}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{text-align:left}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter .subscriber-form-div{text-align:center}.footer .footer-content .footer-statics{padding:30px 50px}.footer .footer-content .footer-copy-right{font-size:14px}.popular-categories-container .popular-category-wrapper{padding:0}.popular-categories-container .popular-category-wrapper .card .category-image{height:100%}.popular-categories-container .popular-category-wrapper:last-child{padding-left:0}.slides-container .VueCarousel .VueCarousel-pagination button{width:5px!important;height:5px!important}.slides-container .VueCarousel .VueCarousel-pagination .VueCarousel-dot{padding:2px!important}.account-content .sidebar{display:none}.account-content .account-layout{padding:0}.account-content .account-layout.right{padding-right:20px!important;padding-left:20px!important}.account-content .account-layout .account-items-list.wishlist-container .product-card-new{width:calc(50% - 5px)}.account-content .account-layout .account-table-content #datagrid-filters>.search-filter{width:100%;max-width:100%;margin:0 0 10px}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters{width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters .control-group{width:100%;max-width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters .dropdown-container li{width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters:nth-of-type(2){margin-top:30px;margin-bottom:10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters.per-page{margin-top:0;margin-bottom:10px;position:relative}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary{width:100%;font-size:17px}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary tbody tr td{width:50%!important}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary tbody tr td:last-child{text-align:right}.account-content .account-layout .sale-container .order-box-container .box{width:100%;margin-bottom:20px}.account-content .account-layout .sale-container .order-box-container .box .box-title{padding-bottom:0}.account-content .account-layout .table table thead{display:none}.account-content .account-layout .table table tr{margin-bottom:20px;border:1px solid #ccc}.account-content .account-layout .table table tr td{width:100%;border-top:none;border-right:1px solid #ccc!important}.account-content .account-layout .table table tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block}.account-content .account-layout .table table tr td .action{display:inline-block}.account-content .account-layout .table table tr td:first-child{font-weight:700}.mini-cart-container{display:none}header .vc-small-screen .searchbar{padding-left:20px!important;padding-right:20px!important}header .vc-small-screen .searchbar .compare-btn,header .vc-small-screen .searchbar .wishlist-btn{display:none}header .vc-small-screen #search-form{background:transparent;width:100%}header .vc-small-screen #search-form .selectdiv{display:none}header .vc-small-screen #search-form .selectdiv+div input{width:calc(100% - 40px);border:1px solid #26a37c}.carousel-products.vc-full-screen{display:none}.carousel-products.vc-small-screen{display:block!important}.carousel-products+.recently-viewed{top:0;position:static}.reviews-container .review-wrapper,.reviews-container .review-wrapper:first-of-type,.reviews-container .review-wrapper:last-of-type,.reviews-container .review-wrapper:nth-last-of-type(2){padding:0}.reviews-container .review-wrapper:not(:last-child){margin-bottom:10px}.product-policy-wrapper{padding:0!important}.product-policy-wrapper:not(:last-child){margin-bottom:10px}.product-detail #product-form .form-container .left{top:0;position:relative;margin-bottom:20px}.product-detail #product-form .form-container .left .vc-small-product-image{width:100%}.product-detail .customer-rating>.row>div{margin-bottom:30px}.product-detail .arrow.left,.product-detail .arrow.right{display:none}.product-detail .thumb-list .small-card-container .thumb-frame>.product-image,.product-detail .thumb-list .thumb-frame>.bg-image,.small-card-container .product-detail .thumb-list .thumb-frame>.product-image{background-size:contain}.review-page-container>div{padding:0}.review-page-container>div:not(:last-child){position:relative;margin-bottom:60px}.customer-rating>.row>div:not(:last-child){margin-bottom:20px}.auth-content.form-container>.container{margin:0;width:100%}.auth-content.form-container>.container>div:first-child{padding:0}.auth-content.form-container>.container>div:first-child .body{padding:20px}.category-page-wrapper .layered-filter-wrapper{display:none}.category-page-wrapper .category-container{margin:0;margin-top:20px;padding-left:0!important;padding-right:0!important}.category-page-wrapper .category-container>div{padding:0 10px}.category-page-wrapper .category-container>div:first-child{padding:0 10px!important}.category-page-wrapper .category-container .filters-container{left:0;top:30px;padding:0;width:100%;z-index:9;position:fixed;padding-bottom:10px;background-color:#fff;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.21);box-shadow:0 2px 4px 0 rgba(0,0,0,.21)}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4{margin:0;padding:0;display:table;text-align:center}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 *{display:table-cell;vertical-align:middle}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 a{text-align:center;display:inline-block}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 span{left:5px;position:relative}.nav-container{top:0;left:0;width:75%;opacity:1;z-index:9999;height:100vh;position:fixed;font-size:16px;overflow-y:scroll;-webkit-box-shadow:0 2px 8px 0;box-shadow:0 2px 8px 0;background-color:#fff}.nav-container .wrapper{position:relative}.nav-container .wrapper .category-title{width:100%;display:none;display:table;padding-left:10px;margin:13px 0}.nav-container .wrapper .category-title>i{font-size:26px;display:table-cell;vertical-align:middle}.nav-container .wrapper .category-title span{font-size:20px;display:table-cell;vertical-align:top}.nav-container .wrapper .category-title span i{float:left!important;margin:2px 2px 0 0!important}.nav-container .wrapper .greeting{top:0;width:100%;display:table;position:sticky;color:#111;background-color:#fff;border-bottom:1px solid #ccc}.nav-container .wrapper .greeting>i{font-size:26px;display:table-cell;vertical-align:middle}.nav-container .wrapper .greeting span{font-size:20px;display:table-cell;vertical-align:top}.nav-container .wrapper ul{font-weight:600;color:#111;border-top:1px solid #ccc}.nav-container .wrapper ul li{font-size:16px;padding:10px 0 10px 20px}.nav-container .wrapper ul li:hover{background-color:#ececec}.nav-container .wrapper ul li .category-logo,.nav-container .wrapper ul li .language-logo-wrapper{width:18px;height:18px;margin-right:5px;display:inline-block}.nav-container .wrapper ul li .rango-arrow-right{float:right;font-size:20px;padding-top:5px;padding-right:15px}.nav-container .wrapper ul li .nested-category{border-top:unset}.nav-container .wrapper ul li .nested-category li:last-child{padding-bottom:0}.nav-container .wrapper ul:first-of-type{border-top:unset}.nav-container .wrapper .category-wrapper li,.nav-container .wrapper .vc-customer-options li{font-size:14px}.nav-container .wrapper .category-wrapper li i.icon,.nav-container .wrapper .vc-customer-options li i.icon{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important;font-size:18px;padding-right:5px;display:contents}.nav-container .wrapper .category-wrapper li i.icon.profile:before,.nav-container .wrapper .vc-customer-options li i.icon.profile:before{content:"\E995"}.nav-container .wrapper .category-wrapper li i.icon.address:before,.nav-container .wrapper .vc-customer-options li i.icon.address:before{content:"\E949"}.nav-container .wrapper .category-wrapper li i.icon.reviews:before,.nav-container .wrapper .vc-customer-options li i.icon.reviews:before{content:"\E97D"}.nav-container .wrapper .category-wrapper li i.icon.wishlist:before,.nav-container .wrapper .vc-customer-options li i.icon.wishlist:before{content:"\E93E"}.nav-container .wrapper .category-wrapper li i.icon.compare:before,.nav-container .wrapper .vc-customer-options li i.icon.compare:before{content:"\E93B"}.nav-container .wrapper .category-wrapper li i.icon.orders:before,.nav-container .wrapper .vc-customer-options li i.icon.orders:before{content:"\E931"}.nav-container .wrapper .category-wrapper li i.icon.downloadables:before,.nav-container .wrapper .vc-customer-options li i.icon.downloadables:before{content:"\E926"}.nav-container .drawer-section{padding:15px}.nav-container .header.drawer-section{width:100%;display:table}.nav-container .header.drawer-section>*{display:table-cell;vertical-align:middle}.nav-container .header.drawer-section i{width:25px;padding-right:10px}.nav-container .layered-filter-wrapper{width:100%;display:block;padding-top:0;margin-bottom:0}.category-container .grid-card,.search-container .grid-card{width:45%}.category-container .grid-card:nth-child(odd),.search-container .grid-card:nth-child(odd){float:left}.category-container .grid-card:nth-child(2n),.search-container .grid-card:nth-child(2n){float:right}.cart-details.offset-1,.cart-details .order-summary-container.offset-1{margin-left:0;padding-left:0;padding-right:0}.cart-details .cart-details-header,.cart-details h1{padding:0}.cart-details h1{margin-bottom:20px}.cart-details .cart-header{display:none}.cart-details .cart-item-list>div{margin:0;padding:0}.cart-details .product-price .special-price,.cart-details .product-price span:first-child{font-size:18px}.cart-details .actions{margin-top:7px!important}.cart-details .continue-shopping,.cart-details .empty-cart-message{padding:0}.checkout-process{margin-left:0!important;padding-left:0!important;padding-right:0!important}.checkout-process>div,.checkout-process h1{padding:0}.checkout-process .accordian-header h3{margin-bottom:0!important}.checkout-process .billing-address{margin-bottom:20px}.address-holder>div{padding-right:0;padding-bottom:15px}.wishlist-container{width:100%!important;margin:0!important;padding:0!important}.wishlist-container .product-card-new{margin-left:0}.compare-products{padding:0!important}.compare-products .col,.compare-products .col-2{max-width:unset}.compare-icon,.wishlist-icon{margin-left:0}.image-search-result .searched-terms{margin-left:0;margin-top:20px}.image-search-result .searched-terms .term-list a{line-height:40px}#datagrid-filters.datagrid-filters{padding-top:20px}#sort-by.sorter select{top:2px;left:25px;padding:0 10px;position:absolute;display:inline-block}.slider-container{min-height:220px}}@media only screen and (max-width:768px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.modal-container{left:10%;max-width:80%;margin-left:0}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}.table{width:90%;margin-bottom:1rem;margin-top:68px;color:#212529;overflow-x:auto}.per-page{position:absolute;margin-top:66px;margin-right:-1px;margin-left:17px;width:151px}.filter-left{position:relative;margin-right:-6px!important}.dropdown-filters{margin-left:15px}.quantity button.btn-sm.btn-primary.apply-filter,button.btn.btn-sm.btn-primary.apply-filter{margin-top:10px;margin-left:-158px}.quick-view-btn-container span{left:24%;top:-24px;font-size:13px}.quick-view-in-list{display:none}.product-card-new{max-width:18rem}.slider-container{min-height:220px}}@media only screen and (max-width:420px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.slider-container{min-height:100px}.advertisement-four-container{min-height:992px}.advertisement-four-container .advertisement-container-block,.advertisement-four-container .offers-ct-panel{min-height:425px}}@media only screen and (max-width:320px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.quick-view-in-list{display:none}.slider-container{min-height:100px}.advertisement-four-container{min-height:992px}.advertisement-four-container .advertisement-container-block,.advertisement-four-container .offers-ct-panel{min-height:425px}}body.rtl{text-align:right}.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:14px!important}body.rtl .order-summary-container{margin-left:0;margin-right:130px}body.rtl .velocity-divide-page .right{padding-left:0!important;padding-right:230px!important}body.rtl header #search-form #header-search-icon{float:right;border-radius:2px 0 0 2px}body.rtl header #search-form .btn-group select,body.rtl header #search-form .quantity select{border-left:0;border-right:1px solid #26a37c}body.rtl header #search-form .btn-group .selectdiv select,body.rtl header #search-form .quantity .selectdiv select{float:unset}body.rtl header #search-form .btn-group .selectdiv select~.select-icon-container,body.rtl header #search-form .quantity .selectdiv select~.select-icon-container{top:0;right:100px;position:absolute}body.rtl header #search-form .btn-group .selectdiv .select-icon,body.rtl header #search-form .quantity .selectdiv .select-icon{top:12px;left:8px}body.rtl header.sticky-header img{float:right}body.rtl header .mini-cart-container #mini-cart .badge{top:-8px;left:73%}body.rtl header .left-wrapper{float:left}body.rtl header .left-wrapper .compare-btn .badge-container .badge,body.rtl header .left-wrapper .wishlist-btn .badge-container .badge{top:-28px;left:-2px}body.rtl .main-content-wrapper .main-category{text-align:right}body.rtl .main-content-wrapper .main-category i{float:right;margin-left:10px}body.rtl .main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container{left:-4px}body.rtl .main-content-wrapper .vc-header .mini-cart-container #mini-cart .badge{top:-6px;left:90%}body.rtl .main-content-wrapper .vc-header .mini-cart-container #mini-cart .cart-text{left:24px;vertical-align:top}body.rtl .form-container .container .heading h2{float:right}body.rtl .form-container .container .heading a{float:left}body.rtl .sticker{left:unset;right:8px}body.rtl .subscriber-form-div{text-align:left}body.rtl .footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{left:-4px;position:relative}body.rtl #top #account .welcome-content{float:left}body.rtl #top #account .welcome-content i{text-align:left}body.rtl #top #account+.account-modal{width:100%!important;right:unset}body.rtl #top #account+.account-modal .modal-content{float:left}body.rtl #top .locale-icon~.select-icon-container{right:20px}body.rtl #cart-modal-content{left:0}body.rtl #cart-modal-content .small-card-container .rango-close{left:unset;right:-10px}body.rtl #cart-modal-content .small-card-container .card-total-price{float:left}body.rtl .category-list-container .sub-categories{left:-100%}body.rtl .category-list-container li a{padding:7px 15px 5px}body.rtl .category-list-container li ul.nested li a{padding-right:25px}body.rtl .filters-container .view-mode>div{padding-right:6px}body.rtl .filters-container .toolbar-wrapper>div label{margin-right:0;margin-left:10px}body.rtl .filter-attributes-content{margin-left:7px;margin-right:0}body.rtl .filter-attributes-item input[type=checkbox]+span{margin-right:10px}body.rtl .filter-attributes-item .filter-input{margin-right:0}body.rtl .product-card-new .card-body .cart-wish-wrap{margin-right:0!important}body.rtl .product-card-new .card-body .cart-wish-wrap .add-to-cart-btn{padding-left:35px!important}body.rtl .product-card-new .card-body .wishlist-icon{left:0;right:unset}body.rtl .product-card-new .card-body .product-name{width:unset}body.rtl .account-content .account-layout.right{width:calc(100% - 20px);padding-right:250px!important}body.rtl .account-content .account-layout .account-table-content .address-holder>div{padding-right:0;padding-left:15px}body.rtl .account-content .sidebar .customer-sidebar{border-left:1px solid #e5e5e5}body.rtl .account-content .sidebar .customer-sidebar .navigation li i.icon{padding-right:0;padding-left:5px}body.rtl .product-detail .right .info{margin-right:0}body.rtl .product-detail .right .info>h2,body.rtl .product-detail .right .info div{padding-right:0}body.rtl .product-detail .right .info .buynow{float:left;margin-right:10px}body.rtl .product-detail .thumb-list{left:0;margin-right:0}body.rtl .product-detail .wishlist-icon{padding-right:10px}body.rtl .zoomWindow{right:100%!important}body.rtl .modal-footer>:not(:last-child){margin-left:.25rem}body.rtl .compare-products .wishlist-icon{left:52px;right:unset}body.rtl .compare-products .material-icons.cross{left:20px;right:unset}body.rtl #alert-container{right:unset;left:15px}body.rtl .mini-cart-content~.down-arrow-container .rango-arrow-down{left:-15px}body.rtl .alert-dismissible .close{left:-8px}body.rtl .booking-information .book-slots .control-group-container .form-group:not(.quantity).date:after{left:40px;right:unset}body.rtl .full-content-wrapper>.container-fluid>.row.pl-26{padding-right:26%!important}body.rtl .image-search-container{left:45px;right:unset}body.rtl .product-policy-container .card .policy .left{margin-left:10px}body.rtl .account-content .account-layout .account-table-content #datagrid-filters .filter-left .icon-wrapper .search-btn{float:left;right:unset;left:5px}body.rtl .account-content .account-layout .account-table-content #datagrid-filters .per-page{left:0;right:unset}body.rtl .advertisement-three-container .second-panel{padding-right:30px}body.rtl .advertisement-two-container .row{padding:0!important}body.rtl .advertisement-two-container .row .pr0{padding-right:15px!important}body.rtl .downloadable-container .link-list ul li a{float:left;margin-top:3px}body.rtl .text-right{text-align:left!important}body.rtl .text-left{text-align:right!important}body.rtl .pr0{padding-left:0!important;padding-right:15px!important}body.rtl .pl0{padding-right:0!important}body.rtl .pl10{padding-right:10px!important}body.rtl .rango-arrow-right:before{content:"\E907"}body.rtl .styled-select+.select-icon-container .select-icon{left:6px;right:unset}body.rtl .ml15{margin-right:15px!important}body.rtl .pl30{padding-right:30px}body.rtl .ml-5{margin-right:3rem!important}.product-detail .right .options .buttons body.rtl :not(:last-child),.product-detail .right .options body.rtl .quantity>label,body.rtl .mr15,body.rtl .product-detail .right .options .buttons :not(:last-child),body.rtl .product-detail .right .options .quantity>label{margin-left:15px!important}body.rtl .ml5{margin-right:5px}@media only screen and (max-width:992px){body.rtl .order-summary-container{margin-right:0}body.rtl .nav-container ul li{padding:10px 20px 10px 0}body.rtl .nav-container ul li .rango-arrow-right{float:left;padding-left:40px}body.rtl .nav-container .wrapper .vc-customer-options li i.icon{float:right;padding-left:5px}body.rtl .account-content .account-layout.right,body.rtl .full-content-wrapper>.container-fluid>.row.pl-26{padding-right:20px!important}body.rtl .velocity-divide-page .left{right:35px;width:150px;top:4px}}@media only screen and (max-width:425px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:12px!important}}@media only screen and (max-width:375px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:10px!important}body.rtl .velocity-divide-page .right{padding:0 20px!important}}@media only screen and (max-width:320px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:8px!important}}body.rtl .payment-methods .pl40{padding-right:40px!important;padding-left:0!important}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format("woff2")}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconsoutlined/v14/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2) format("woff2")}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconsround/v14/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmP.woff2) format("woff2")}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconssharp/v15/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvR.woff2) format("woff2")}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconstwotone/v13/hESh6WRmNCxEqUmNyh3JDeGxjVVyMg4tHGctNCu0.woff2) format("woff2")}.material-icons{font-family:Material Icons;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons,.material-icons-outlined{max-width:30px;overflow:hidden;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}.material-icons-outlined{font-family:Material Icons Outlined;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-round{font-family:Material Icons Round;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-round,.material-icons-sharp{font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}.material-icons-sharp{font-family:Material Icons Sharp;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}*{margin:0;padding:0;font-family:Source Sans Pro,sans-serif}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}::-webkit-scrollbar{width:3px;height:5px}::-webkit-scrollbar-track{background:#d8d8d8}::-webkit-scrollbar-thumb{background:#666}::-webkit-input-placeholder{font-family:Source Sans Pro,sans-serif}input[type=checkbox]{width:24px;height:15px;margin-right:10px}.form-control:focus{-webkit-box-shadow:0 0 8px 1px rgba(105,221,157,.25);box-shadow:0 0 8px 1px rgba(105,221,157,.25)}button,input,optgroup,select,textarea{font-family:Source Sans Pro,sans-serif;color:rgba(0,0,0,.83)}textarea{resize:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}body{padding:0;margin:0;font-weight:400;color:rgba(0,0,0,.83);font-size:12px;line-height:20px;width:100%;background:#fff;font-family:Source Sans Pro,sans-serif}.btn:hover,.quantity button:hover,.quantity input:hover{text-decoration:none}.btn:active:hover,.btn:focus,.quantity button:active:hover,.quantity button:focus,.quantity input:active:hover,.quantity input:focus{outline:none;outline-offset:0}.btn-link{color:rgba(0,0,0,.83);padding:6px 5px}.btn-link:focus,.btn-link:hover{color:rgba(0,0,0,.83);text-decoration:none}#top{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.24);box-shadow:0 0 0 0 rgba(0,0,0,.24);margin:0;min-height:32px;color:rgba(0,0,0,.83);border-bottom:1px solid #ccc}#top .btn,#top .quantity button,#top .quantity input,.quantity #top button,.quantity #top input{font-family:Source Sans Pro,sans-serif;font-size:14px;letter-spacing:0;text-align:center;border-radius:0;text-decoration:none}#top .btn:hover,#top .quantity button:hover,#top .quantity input:hover,.quantity #top button:hover,.quantity #top input:hover{text-decoration:none}#top .btn:active:hover,#top .btn:focus,#top .quantity button:active:hover,#top .quantity button:focus,#top .quantity input:active:hover,#top .quantity input:focus,.quantity #top button:active:hover,.quantity #top button:focus,.quantity #top input:active:hover,.quantity #top input:focus{outline:none;outline-offset:0}#top .btn-normal{background:#21a179;border-color:#269c77;color:#fff;font-weight:600}#top .btn-normal:active:focus,#top .btn-normal:active:hover,#top .btn-normal:hover{background:#fff;border-color:#21a179;color:#21a179}#top .btn-link{color:rgba(0,0,0,.83)}#top .dropdown-menu-large{min-width:250px;left:-100px}#top .customer-name{font-size:16px;font-weight:600;padding:0 10px;color:rgba(0,0,0,.83)}#top #account{font-size:14px}#top #account .select-icon{top:0;left:0;padding-left:5px}#top #account .welcome-content{display:table;min-width:150px;cursor:pointer;float:right;text-align:right;padding-top:5px}#top #account .welcome-content *{display:table-cell;vertical-align:middle}#top #account+.account-modal{top:40px;right:10px;z-index:101;height:-webkit-max-content;height:-moz-max-content;height:max-content;width:290px!important;position:absolute!important}#top #account+.account-modal .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,#top #account+.account-modal .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,#top #account+.account-modal .account-content .account-layout .bottom-toolbar .pagination .page-item,#top #account+.account-modal .cart-details .continue-shopping-btn,#top #account+.account-modal .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,#top #account+.account-modal .theme-btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container #top #account+.account-modal button.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity #top #account+.account-modal button,.account-content .account-layout .bottom-toolbar .pagination #top #account+.account-modal .page-item,.cart-details #top #account+.account-modal .continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container #top #account+.account-modal button{padding:.5rem .9rem}#top #account+.account-modal .modal-footer{-webkit-box-pack:unset;-ms-flex-pack:unset;justify-content:unset}#top #account+.account-modal .modal-content{top:0;padding:0}#top #account+.account-modal .modal-content ul li:hover{background-color:#ececec}#top #account+.account-modal .modal-content ul li a{padding:10px 20px}#top #account+.account-modal .modal-content ul li:last-child{margin-bottom:5px}#top>div:last-child{height:32px}#top>div .default{padding:5px;font-size:14px}#top .locale-icon{width:20px;display:inline-block}#top .locale-icon img{width:100%}#top .locale-switcher{padding-left:5px;position:relative;padding-right:15px}#top .dropdown{margin-right:15px}#top .dropdown .select-icon-container .select-icon{right:0}.dropdown-menu{border-top:3px solid #269c77;border-radius:0;background:#fff;-webkit-box-shadow:11px 10px 17px 0 rgba(0,0,0,.21);box-shadow:11px 10px 17px 0 rgba(0,0,0,.21)}.dropdown-menu li a .dropdown-menu li a:focus,.dropdown-menu li a:focus,.dropdown-menu li a:hover{background:#21a179;color:#fff}.no-padding,.product-detail .right h3{padding:0!important}.btn-normal{background:#21a179;border-color:#269c77;color:#fff;font-weight:600;border-radius:0}.btn-normal:active:focus,.btn-normal:active:hover,.btn-normal:hover{background:#fff;border-color:#21a179;color:#21a179}.btn-secondary{background:#fff;border-color:#fff;color:#21a179}.btn-secondary:active:focus,.btn-secondary:active:hover,.btn-secondary:focus,.btn-secondary:hover{background:#21a179;border-color:#21a179}.btn-danger{color:#fff}.btn-danger,.btn-danger:active:focus,.btn-danger:active:hover,.btn-danger:focus,.btn-danger:hover{background:#f05153;border-color:#f05153}header .logo{height:50px;padding-left:10px}header #search-form{height:40px;margin:5px 0;background:#fff}header #search-form *{height:100%}header #search-form .btn-group,header #search-form .quantity{max-width:550px}header #search-form .btn-group .selectdiv,header #search-form .quantity .selectdiv{width:210px}header #search-form .btn-group .selectdiv .select-icon,header #search-form .quantity .selectdiv .select-icon{top:-30px;right:8px;z-index:10;font-size:18px;background-color:#fff;height:20px}header #search-form .btn-group select,header #search-form .quantity select{width:100%;height:100%;cursor:pointer;border-radius:2px 0 0 2px;border:1px solid #26a37c;border-right:0;font-family:Source Sans Pro,sans-serif;-webkit-appearance:none;-moz-appearance:none;appearance:none}header #search-form .btn-group select::-ms-expand,header #search-form .quantity select::-ms-expand{display:none}header #search-form input{border-radius:0;height:100%;font-size:14px;padding:0 10px;line-height:20px;letter-spacing:0;border:1px solid #26a37c;border-left:1px solid #ccc}.quantity header #search-form button:hover,.quantity header #search-form input:hover,header #search-form .btn:hover,header #search-form .quantity button:hover,header #search-form .quantity input:hover{text-decoration:none}.quantity header #search-form button:active:hover,.quantity header #search-form button:focus,.quantity header #search-form input:active:hover,.quantity header #search-form input:focus,header #search-form .btn:active:hover,header #search-form .btn:focus,header #search-form .quantity button:active:hover,header #search-form .quantity button:focus,header #search-form .quantity input:active:hover,header #search-form .quantity input:focus{outline:none;outline-offset:0}header #search-form #header-search-icon{min-width:40px;border-radius:0 2px 2px 0;background-color:#26a37c}header #search-form #header-search-icon i{color:#fff}header .mini-cart-container{height:50px;padding:5px 17px;display:inline-block}header .mini-cart-container #mini-cart .mini-cart-content{font-size:16px;font-weight:600;text-align:right;margin-right:7px;letter-spacing:0;position:relative;color:rgba(0,0,0,.83);display:inline-block}header .mini-cart-container #mini-cart .mini-cart-content i+span.cart-text{padding-left:0;vertical-align:text-bottom}header .mini-cart-container #mini-cart .mini-cart-content .cart-text{padding-left:5px}header .mini-cart-container #mini-cart .mini-cart-content+.down-arrow-container .rango-arrow-down{top:8px}header .left-wrapper{float:right}header .left-wrapper .compare-btn,header .left-wrapper .wishlist-btn{height:50px;font-size:18px;font-weight:600;padding:10px 16px 6px}header .left-wrapper .compare-btn i,header .left-wrapper .wishlist-btn i{margin-right:5px;vertical-align:middle}header .left-wrapper .compare-btn .badge-container,header .left-wrapper .wishlist-btn .badge-container{position:relative;display:inline-block}header .left-wrapper .compare-btn .badge-container .badge,header .left-wrapper .wishlist-btn .badge-container .badge{border-radius:50%;top:-23px;left:-15px;padding:4px;min-width:20px;position:absolute;color:hsla(0,0%,100%,.83);background:#21a179}header .left-wrapper .compare-btn span,header .left-wrapper .wishlist-btn span{top:2px;position:relative}header .dropdown-menu-large{min-width:280px;left:-180px}header .dropdown-menu-large .dropdown-content{width:100%;max-height:300px;overflow-y:auto}header .dropdown-menu-large .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px}header .dropdown-menu-large .dropdown-content .item .item-image{position:relative}header .dropdown-menu-large .dropdown-content .item .item-image .material-icons{position:absolute;left:-6px;top:-6px;font-size:16px;cursor:pointer}header .dropdown-menu-large .dropdown-content .item .item-image .thumbnail{width:75px;height:75px;margin:0;border-radius:0;border:1px solid #ccc}header .dropdown-menu-large .dropdown-content .item .item-name{font-weight:600;font-size:18px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-content .item .item-details{padding:0 10px;height:auto}header .dropdown-menu-large .dropdown-content .item .item-details .item-options{font-family:Source Sans Pro,sans-serif;font-size:13px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price{padding:5px 0;display:inline-block}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price .item-qty{font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:left}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price .item-price{font-weight:600;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:right}header .dropdown-menu-large .dropdown-header{padding:10px 10px 5px;border-top:1px solid #ccc}header .dropdown-menu-large .dropdown-header .sub-total-text{font-weight:600;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-header .cart-sub-total{font-weight:700;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:right}header .dropdown-menu-large .dropdown-footer{padding:10px 10px 0;border-top:1px solid #ccc;font-weight:700;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-footer .cart-link{text-align:left}header .dropdown-menu-large .dropdown-footer .cart-link a{vertical-align:middle}header .dropdown-menu-large .dropdown-footer .checkout-link{text-align:right}#nav-menu{margin:0;-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.24);box-shadow:0 0 0 0 rgba(0,0,0,.24);background-color:#fff}#nav-menu .navbar{margin:0;font-family:SourceSansPro-Semibold;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;cursor:pointer;min-height:40px;position:relative}#nav-menu .navbar .navbar-header{width:100%;display:inline-block}#nav-menu .navbar .navbar-header .main-category{width:100%;overflow:hidden;position:relative;display:inline-block;padding:5px 5px 5px 35px}#nav-menu .navbar .navbar-header .main-category .material-icons{position:absolute;left:0;top:2px;font-size:28px}#nav-menu .navbar .category-dropdown{position:absolute;top:40px;background:#fff;left:0;width:100%;height:525px}#nav-menu .navbar .category-dropdown li.category-list{width:100%;display:inline-block;background:#fff;position:relative}#nav-menu .navbar .category-dropdown li.category-list a{padding:10px 0;position:relative;font-size:14px;color:rgba(0,0,0,.83);letter-spacing:0;font-weight:600;display:block}#nav-menu .navbar .category-dropdown li.category-list a .material-icons{position:absolute;right:0;top:8px}#nav-menu .navbar .category-dropdown li.category-list a:hover{color:#28557b;text-decoration:none;background-color:#f7f7f9}#nav-menu .navbar .category-dropdown li.category-list .child-container{position:absolute;top:0;background-color:#ccc;left:283px;width:250px;height:350px}#nav-menu .secondary-navbar{background-color:#4d7ea8;min-height:40px;padding:5px;vertical-align:middle;text-align:left;margin:0;list-style:none;height:auto;display:inline-block;width:100%}#nav-menu .secondary-navbar li{float:left}#nav-menu .secondary-navbar li a{display:block;cursor:pointer;font-size:16px;font-weight:600;letter-spacing:0;position:relative;color:#fff;text-decoration:none;padding:5px 20px 5px 5px}.viewed-products .viewed-products-listing{border:1px solid #fff;background-color:#f6f6f6}.viewed-products .viewed-products-listing .product-description,.viewed-products .viewed-products-listing .product-image{display:inline-block}.viewed-products .viewed-products-listing .product-description div{padding-top:2px}.customer-reviews .first-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.customer-reviews .second-row{width:100%;display:inline-block}.customer-reviews .second-row .reviews-listing{background:#fff;padding-right:10px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.customer-reviews .second-row .review-grid{display:grid;width:345px;height:262px;padding-top:40px;padding-left:10px;padding-right:10px}.categories-grid-customizable .category-grid{padding-right:5px;padding-left:5px;padding-bottom:10px}.categories-grid-customizable .category-grid .category-image{border:1px solid red}.categories-grid-customizable .category-grid .category-details{border:1px solid blue}.categories-grid-customizable .category-grid .category-details h3{color:#fff;text-align:center}.categories-grid-customizable .category-grid .category-details li{color:#fff;text-align:center;list-style-type:none}.product-policy{padding:30px 0 50px;border:1px solid maroon;text-align:center}.popular-products{height:auto;width:100%;padding-right:10px}.popular-products .second-row .popular-products-listing{border:1px solid red}.popular-products .second-row .popular-products-listing .product-buttons .add-to-cart-button .btn-primary{border:#26a37c!important;border-radius:0}.popular-products .second-row .popular-products-listing .product-buttons .add-to-cart-button .addtocart{text-transform:uppercase;background-color:#26a37c}.customer-name{display:table-cell;height:54px;width:56px;text-align:center;vertical-align:middle;border-radius:50%;background:#21a179;color:#fff;padding:16px;font:18px josefin sans,arial}.spacing{margin:5px 0}i.within-circle{display:inline-block;border-radius:50%;-webkit-box-shadow:0 0 2px #888;box-shadow:0 0 2px #888;padding:12px;margin:15px 0;width:50px;height:50px}.center_div{margin:0 auto;width:80%}.form-style{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0}.label-style{display:inline-block!important;max-width:100%!important;margin-bottom:5px!important;font-weight:100!important;font-size:16px!important}.btn-white{color:#fff;height:36px;width:133px}.w3-card-2{width:133px}.w3-card-2,.w3-card-login{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);float:right;height:36px}.w3-card-login{width:71px}.btn-new-customer-login{color:#26a37c!important;font-size:16px;padding:11px;text-decoration:none!important}.btn-dark-green{color:#fff;background-color:#26a37c;border-color:#26a37c;height:36px;border-radius:0!important}.login-text{height:65px;width:575px;border:1px #e5e5e5;margin:0 auto}.row:after,.row:before{display:none!important}.image-wrapper{margin-bottom:20px;margin-top:10px;display:inline-block;width:100%}.image-wrapper .image-item{width:150px;height:150px;margin-right:20px;background:#f8f9fa;border-radius:3px;display:inline-block;position:relative;background-image:url("../images/placeholder-icon.svg");background-repeat:no-repeat;background-position:50%;margin-bottom:20px;float:left;background-size:75%}.image-wrapper .image-item img.preview{width:100%;height:100%}.image-wrapper .image-item input{display:none}.image-wrapper .image-item .remove-image{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.08)),to(rgba(0,0,0,.24)));background-image:linear-gradient(-180deg,rgba(0,0,0,.08),rgba(0,0,0,.24));border-radius:0 0 4px 4px;position:absolute;bottom:0;width:100%;padding:10px;text-align:center;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.24);margin-right:20px;cursor:pointer}.image-wrapper .image-item:hover .remove-image{display:block}.image-wrapper .image-item.has-image{background-image:none}.btn-primary{background-color:#26a37c!important;border-color:#26a37c!important} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap);@font-face{font-family:Webkul Rango;src:url("../fonts/font-rango/rango.eot?o0evyv");src:url("../fonts/font-rango/rango.eot?o0evyv#iefix") format("embedded-opentype"),url("../fonts/font-rango/rango.ttf?o0evyv") format("truetype"),url("../fonts/font-rango/rango.woff?o0evyv") format("woff"),url("../fonts/font-rango/rango.svg?o0evyv#rango") format("svg");font-weight:400;font-style:normal;font-display:swap}.wk-icon{font-size:20px;font-weight:400;text-align:center;color:#0041ff}[class*=" rango-"],[class^=rango-]{font-family:Webkul Rango!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rango-activity:before{content:"\E900"}.rango-announcement:before{content:"\E901"}.rango-arrow-circle-down:before{content:"\E902"}.rango-arrow-circle-left:before{content:"\E903"}.rango-arrow-circle-right:before{content:"\E904"}.rango-arrow-circle-up:before{content:"\E905"}.rango-arrow-down:before{content:"\E906"}.rango-arrow-left:before{content:"\E907"}.rango-arrow-right:before{content:"\E908"}.rango-arrow-up:before{content:"\E909"}.rango-auction:before{content:"\E90A"}.rango-baby:before{content:"\E90B"}.rango-bag:before{content:"\E90C"}.rango-ball-2:before{content:"\E90D"}.rango-bar-code:before{content:"\E90E"}.rango-batch:before{content:"\E90F"}.rango-book:before{content:"\E910"}.rango-calender:before{content:"\E911"}.rango-camera:before{content:"\E912"}.rango-car:before{content:"\E913"}.rango-card:before{content:"\E914"}.rango-cart-1:before{content:"\E915"}.rango-cart-2:before{content:"\E916"}.rango-cart-3:before{content:"\E917"}.rango-circel-1:before{content:"\E918"}.rango-circel:before{content:"\E919"}.rango-circle-1:before{content:"\E91A"}.rango-circle-2:before{content:"\E91B"}.rango-circle-check:before{content:"\E91C"}.rango-clear:before{content:"\E91D"}.rango-close-2:before{content:"\E91E"}.rango-close:before{content:"\E91F"}.rango-cloth:before{content:"\E920"}.rango-coin:before{content:"\E921"}.rango-copy:before{content:"\E922"}.rango-currency:before{content:"\E923"}.rango-delete:before{content:"\E924"}.rango-donwload-1:before{content:"\E925"}.rango-download-1:before{content:"\E926"}.rango-edit-pencil:before{content:"\E927"}.rango-ellipse:before{content:"\E928"}.rango-envelop:before{content:"\E929"}.rango-exchange:before{content:"\E92A"}.rango-exchnage:before{content:"\E92B"}.rango-expend-collaps:before{content:"\E92C"}.rango-expend:before{content:"\E92D"}.rango-eye-hide:before{content:"\E92E"}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon:before,.rango-eye-visible:before{content:"\E92F"}.rango-facebook:before{content:"\E930"}.rango-file:before{content:"\E931"}.rango-filter:before{content:"\E932"}.rango-flag:before{content:"\E933"}.rango-folder:before{content:"\E934"}.rango-food:before{content:"\E935"}.rango-furniture:before{content:"\E936"}.rango-gift:before{content:"\E937"}.rango-globe:before{content:"\E938"}.rango-google-plus:before{content:"\E939"}.rango-gps:before{content:"\E93A"}.rango-graph-1:before{content:"\E93B"}.rango-graph:before{content:"\E93C"}.rango-heart-fill:before{content:"\E93D"}.rango-heart:before{content:"\E93E"}.rango-hold-cart:before{content:"\E93F"}.rango-home:before{content:"\E940"}.rango-info:before{content:"\E941"}.rango-instagram:before{content:"\E942"}.rango-language-1:before{content:"\E943"}.rango-language:before{content:"\E944"}.rango-laptop:before{content:"\E945"}.rango-limit:before{content:"\E946"}.rango-linked-in:before{content:"\E947"}.rango-lipstick:before{content:"\E948"}.rango-location:before{content:"\E949"}.rango-lock-1:before{content:"\E94A"}.rango-lock-2:before{content:"\E94B"}.rango-map:before{content:"\E94C"}.rango-message-1:before{content:"\E94D"}.rango-message:before{content:"\E94E"}.rango-minus:before{content:"\E94F"}.rango-mobile:before{content:"\E950"}.rango-more:before{content:"\E951"}.rango-neckless:before{content:"\E952"}.rango-next:before{content:"\E953"}.rango-notification:before{content:"\E954"}.rango-num-pad:before{content:"\E955"}.rango-percentage:before{content:"\E956"}.rango-phone:before{content:"\E957"}.rango-picture:before{content:"\E958"}.rango-pintrest:before{content:"\E959"}.rango-play:before{content:"\E95A"}.rango-plus:before{content:"\E95B"}.rango-pos:before{content:"\E95C"}.rango-power:before{content:"\E95D"}.rango-previous:before{content:"\E95E"}.rango-printer:before{content:"\E95F"}.rango-product-add:before{content:"\E960"}.rango-product-retrun:before{content:"\E961"}.rango-product:before{content:"\E962"}.rango-produt-group:before{content:"\E963"}.rango-push:before{content:"\E964"}.rango-quotation:before{content:"\E965"}.rango-refresh:before{content:"\E966"}.rango-refrigrator:before{content:"\E967"}.rango-return-credit:before{content:"\E968"}.rango-return:before{content:"\E969"}.rango-search:before{content:"\E96A"}.rango-security:before{content:"\E96B"}.rango-setting-cog:before{content:"\E96C"}.rango-setting-reset:before{content:"\E96D"}.rango-share-1:before{content:"\E96E"}.rango-share-2:before{content:"\E96F"}.rango-shoes:before{content:"\E970"}.rango-shop:before{content:"\E971"}.rango-sign-in:before{content:"\E972"}.rango-sign-out:before{content:"\E973"}.rango-sort-1:before{content:"\E974"}.rango-sort-2:before{content:"\E975"}.rango-square-1:before{content:"\E976"}.rango-square-3:before{content:"\E977"}.rango-square-4:before{content:"\E978"}.rango-square-tick-fill:before{content:"\E979"}.rango-square:before{content:"\E97B"}.rango-star-fill:before{content:"\E97C"}.rango-star:before{content:"\E97D"}.rango-stat-down:before{content:"\E97E"}.rango-stat-up:before{content:"\E97F"}.rango-support-head:before{content:"\E980"}.rango-t-shirt:before{content:"\E981"}.rango-table:before{content:"\E982"}.rango-tag-1:before{content:"\E983"}.rango-tag-2:before{content:"\E984"}.rango-tag-3:before{content:"\E985"}.rango-tag-4:before{content:"\E986"}.rango-tick-2:before{content:"\E987"}.rango-tick-square:before{content:"\E988"}.rango-tick:before{content:"\E989"}.rango-toggle:before{content:"\E98A"}.rango-trophy:before{content:"\E98B"}.rango-twitter:before{content:"\E98C"}.rango-upload-2:before{content:"\E98D"}.rango-upload:before{content:"\E98E"}.rango-user-add:before{content:"\E98F"}.rango-user-cash:before{content:"\E990"}.rango-user-group:before{content:"\E991"}.rango-user-info:before{content:"\E992"}.rango-user-owner:before{content:"\E993"}.rango-user-shop:before{content:"\E994"}.rango-user:before{content:"\E995"}.rango-van-ship:before{content:"\E996"}.rango-video-camera:before{content:"\E997"}.rango-video:before{content:"\E998"}.rango-view-grid:before{content:"\E999"}.rango-view-list:before{content:"\E99A"}.rango-wifi-on:before{content:"\E99B"}.rango-wifi:before{content:"\E99C"}.rango-youtube:before{content:"\E99D"}.rango-zoom-minus:before{content:"\E99E"}.rango-zoom-plus:before{content:"\E99F"}.velocity-icon{width:60px;height:55px;background-image:url("../images/Icon-Velocity.svg")}.camera-icon,.velocity-icon{display:inline-block;background-size:cover}.camera-icon{background-image:url("../images/Camera.svg");width:24px}.active.velocity-icon,.active .velocity-icon,.router-link-active.velocity-icon,.router-link-active .velocity-icon{background-image:url("../images/Icon-Velocity-Active.svg")}.ltr{direction:ltr}.rtl{direction:rtl}.padding-10,.padding-15{padding:15px}.fw5{font-weight:500}.fw6,.product-detail .right .info .price,.product-detail .right h3,.product-detail .right h4{font-weight:600}.fw7,.product-detail .right .info h2{font-weight:700}.fs13{font-size:13px!important}.fs14,.main-content-wrapper{font-size:14px}.fs15{font-size:15px}.account-content .account-layout .bottom-toolbar .pagination .page-item,.fs16,.product-detail .right{font-size:16px}.fs16i{font-size:16px!important}.fs17{font-size:17px}.fs18,.product-detail .right h3{font-size:18px}.fs19{font-size:19px}.fs20,.product-detail .right .info .price{font-size:20px}.fs24,.product-detail .right .info h2{font-size:24px}.fs30,.product-detail .right .info .price .card-current-price{font-size:30px}.fs40{font-size:40px}.pt0{padding-top:0!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pl0{padding-left:0!important}.pl5{padding-left:5px!important}.pl15{padding-left:15px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px!important}.pl40{padding-left:40px!important}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr15{padding-right:15px!important}.pr40{padding-right:40px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb30{padding-bottom:30px!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px}.mt15{margin-top:15px!important}.mr5{margin-right:5px}.mr7{margin-right:7px}.mr10{margin-right:10px}.mr15,.product-detail .right .options .buttons :not(:last-child),.product-detail .right .options .quantity>label{margin-right:15px}.mr20{margin-right:20px}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15,.product-detail .right .info{margin-bottom:15px}.mb20,.product-detail .right .options>*,.product-detail .right>div{margin-bottom:20px}.mb25{margin-bottom:25px}.mb30,.product-detail .right .customer-reviews .row{margin-bottom:30px}.ml0,.product-detail .right>div:not(:first-child){margin-left:0!important}.ml5{margin-left:5px}.ml10{margin-left:10px!important}.ml15{margin-left:15px!important}.ml30{margin-left:30px!important}.body-blur{filter:blur(4px);-webkit-filter:blur(4px)}.no-margin{margin:0!important}.flex-wrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.category-list-container .category,.cursor-pointer,.qty-btn>:not(:nth-child(2)){cursor:pointer}.cursor-not-allowed{cursor:not-allowed!important}.cursor-default{cursor:default}.grey{color:#9e9e9e}.clr-light{color:rgba(0,0,0,.53)}.clr-dark,.footer .footer-content .footer-statics .software-description p{color:hsla(0,0%,100%,.52)}.font-clr{color:rgba(0,0,0,.83)}.display-inbl,.product-detail .right .options .quantity>label{display:inline-block!important}.display-block,.product-detail .right .options label{display:block!important}.align-vertical-middle{vertical-align:middle}.full-width{width:100%}.full-image{width:100%;height:100%}.card-product-image-container .background-image-group,.full-back-size{background-size:100% 100%!important}.max-width-100{max-width:100%!important}.no-border{border:none!important}.back-pos-rt{background-position:100%}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.account-content .account-layout .bottom-toolbar .pagination .page-item,.cart-details .continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,.theme-btn{z-index:10;border:none;cursor:pointer;font-weight:600;padding:10px 20px;vertical-align:top;border:1px solid transparent;color:#fff!important;background-color:#26a37c!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.cart-details .continue-shopping-btn:focus,.cart-details .continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover,.theme-btn:focus,.theme-btn:hover{outline:none;-webkit-box-shadow:none;box-shadow:none;border:1px solid #247959;background-color:#26a37c!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item,.account-content .account-layout .bottom-toolbar .pagination .page-item,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.cart-details .light.continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.theme-btn.light{color:#26a37c!important;background-color:#fff!important;-webkit-box-shadow:0 1px 0 0 #cfcfcf;box-shadow:0 1px 0 0 #cfcfcf;border:1px solid rgba(0,0,0,.12)}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn:focus,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:focus,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.cart-details .light.continue-shopping-btn:focus,.cart-details .light.continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light:focus,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light:hover,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:focus,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.theme-btn.light:focus,.theme-btn.light:hover{outline:none;-webkit-box-shadow:none;box-shadow:none;border:1px solid #247959;background-color:#f5f5f5!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.btn-add-to-cart:hover,.cart-details .continue-shopping-btn:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover,.theme-btn:hover{border-color:#247959!important;background-color:#247959!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item:hover,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button:hover.light,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn:hover.light,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .btn-add-to-cart.page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .page-item:hover,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.btn-add-to-cart:hover.light,.cart-details .continue-shopping-btn:hover.light,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item:hover,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button:hover.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item:hover,.theme-btn:hover.light{border:1px solid rgba(0,0,0,.12)!important}.norm-btn{border:1px solid #ccc;font-size:14px;padding:9px 20px;border-radius:2px;vertical-align:top;color:#111!important;background-color:#fff!important}.sale-btn{z-index:10;border:none;color:#fff;font-size:14px;padding:3px 10px;position:absolute;border-radius:12px;background-color:#26a37c}.bg-image,.small-card-container .product-image{width:100%;background-size:contain;background-repeat:no-repeat;background-position:top}#top #account .welcome-content *,.material-icons,.unselectable *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.card-arrow-container .card-arrow{z-index:10;width:20px;height:20px;display:block;position:absolute;background-color:#2b2b2b;transform:rotate(45deg);-webkit-transform:rotate(45deg);-webkit-box-shadow:0 0 0 1px rgba(39,44,48,.05),0 2px 7px 1px rgba(39,44,48,.16);box-shadow:0 0 0 1px rgba(39,44,48,.05),0 2px 7px 1px rgba(39,44,48,.16)}.card-arrow-container .card-arrow-tp{left:50%;top:-10px}.card-arrow-container .card-arrow-rt{top:50%;right:-10px}.card-arrow-container .card-arrow-bt{left:50%;top:calc(100% - 10px)}.card-arrow-container .card-arrow-lt{top:50%;left:-7px}.lg-card-container{cursor:pointer}.lg-card-container a{color:rgba(0,0,0,.83);text-decoration:none}.lg-card-container #quick-view-btn-container :hover{color:#fff!important}.lg-card-container .background-image-group{background-size:contain!important}.lg-card-container.grid-card .card-current-price,.lg-card-container.list-card .card-current-price{font-size:18px}.lg-card-container.grid-card .product-rating .stars,.lg-card-container.list-card .product-rating .stars{display:inline-block}.lg-card-container.grid-card .product-rating span,.lg-card-container.list-card .product-rating span{vertical-align:middle}.lg-card-container.grid-card .product-information>div:not(:last-child),.lg-card-container.list-card .product-information>div:not(:last-child){margin-bottom:5px}.lg-card-container.grid-card img,.lg-card-container.list-card img{width:100%}.lg-card-container.list-card{margin-left:0;padding-left:0}.lg-card-container.list-card .background-image-group{height:100%}.lg-card-container.list-card .product-image{float:left;width:30%;height:270px;max-width:200px;max-height:200px;position:relative}.lg-card-container.list-card .product-image .quick-view-btn-container button{left:calc(50% - 40px)}.lg-card-container.list-card .product-information{width:70%;float:right;padding-left:20px}.lg-card-container.list-card .product-rating .stars{display:inline-block}.lg-card-container.list-card .product-rating span{vertical-align:top}.lg-card-container.list-card .product-information{height:200px;display:table}.lg-card-container.list-card .product-information>div{display:table-cell}.lg-card-container.list-card .product-price .sticker{display:block}.lg-card-container.list-card .wishlist-icon{height:40px;vertical-align:top;display:inline-table;padding-left:0!important}.lg-card-container.list-card .wishlist-icon i{display:table-cell;vertical-align:middle;padding-left:0!important}.lg-card-container.list-card .compare-icon{padding-left:0;display:inline-table}.lg-card-container.list-card .add-to-cart-btn{float:left;display:inline-block}.lg-card-container.grid-card{padding:15px}.lg-card-container.grid-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.lg-card-container.grid-card .product-image img{display:block;height:100%}.lg-card-container.list-card:not(:first-child){margin-top:20px}.carousel-products.with-recent-viewed .btn-add-to-cart,.small-padding{padding:3px 4px!important}.medium-padding{padding:3px 10px!important}.general-container{cursor:pointer}.lg-card-container>.product-card{border:none}.general-container:hover,.lg-card-container:hover,.product-card-new:hover{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.lg-card-container:hover .quick-view-btn-container{display:block}.product-card-new .product-rating,.text-nowrap{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#555}.small-card-container{cursor:pointer;margin-bottom:10px;margin-left:0!important;margin-right:0!important}.small-card-container .material-icons{font-size:16px}.small-card-container .product-image-container{padding:0;display:inline-block}.small-card-container .product-image{height:100%;background-position:50%}.small-card-container .card-body{width:50%;display:inline-block;padding:10px 0!important}.small-card-container .card-body .product-name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.small-card-container .regular-price,.small-card-container .sticker{display:none}.small-card-container:hover{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.text-down-3{top:3px;position:relative}.text-down-4{top:4px;position:relative}.text-down-6{top:6px;position:relative}.text-up-1{top:-1px;position:relative}.text-up-4{top:-4px;position:relative}.text-up-14{top:-14px;position:relative}ul.circle-list{padding-top:10px;text-align:center}ul.circle-list li.circle{width:10px;height:10px;cursor:pointer;border-radius:50%;display:inline-block;border:1px solid #d8d8d8}ul.circle-list li.circle.fill{background:#d8d8d8}ul.circle-list li.circle:not(:last-child){margin-right:6px}.hide{display:none}.category-breadcrumb{font-size:16px}.link-color{color:#4d7ea8}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action a,.account-content .account-layout .bottom-toolbar .pagination a.page-item,a.unset{color:unset!important;text-decoration:none!important}a.active-hover:hover{color:#4d7ea8!important;text-decoration:underline!important}a.remove-decoration,a.remove-decoration:active,a.remove-decoration:focus,a.remove-decoration:hover{text-decoration:none!important}.dropdown-icon:after{display:inline-block;margin-left:1rem;vertical-align:middle;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.disable-box-shadow,.disable-box-shadow:active,.disable-box-shadow:focus,input:focus,select:focus{outline:none!important;box-shadow:none!important;-webkit-box-shadow:0 5px 15px transparent;-o-box-shadow:0 5px 15px transparent;box-shadow:0 5px 15px transparent}.control-error{color:#f05153}.mandatory,.required{width:100%}.mandatory:after,.required:after{content:"*";font-size:16px;margin-left:-1px;color:#f05153}a.default{color:rgba(0,0,0,.83)!important;text-decoration:none!important}.VueCarousel{width:100%;cursor:pointer}.VueCarousel .VueCarousel-inner{padding-top:5px}.VueCarousel .VueCarousel-slide:first-of-type .product-card-new{margin-left:5px}.navigation-hide .VueCarousel-navigation,.pagination-hide .VueCarousel-pagination{display:none}.layered-filter-wrapper,.scrollable{max-height:100%;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}.layered-filter-wrapper::-webkit-scrollbar,.scrollable::-webkit-scrollbar{width:0!important}button[disabled]{opacity:.5;cursor:not-allowed}.max-sm-img-dimention{max-width:110px;max-height:110px}.max-sm-img-dimention img{width:100%;height:100%}.max-width{width:1440px!important;margin:0 auto!important}.styled-select{appearance:none;-moz-appearance:none;-webkit-appearance:none}.styled-select+.select-icon-container{position:relative}.styled-select+.select-icon-container .select-icon{top:-24px;left:unset;right:10px;font-size:16px;position:absolute;pointer-events:none}.down-arrow-container{position:relative;color:rgba(0,0,0,.83);vertical-align:top;display:inline-block}.down-arrow-container .rango-arrow-down{top:10px;left:-5px;font-size:16px;position:absolute}.select-icon{top:5px;left:-7px;font-size:16px;position:relative}.normal-text{color:#141516}.normal-white-text{color:hsla(0,0%,100%,.83)}.display-table{display:table}.display-table .cell{display:table-cell;vertical-align:middle}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon,.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-right-icon,.account-content .sidebar .customer-sidebar .navigation li i.icon,.pagination .page-item.next .angle-left-icon,.pagination .page-item.next .angle-right-icon,.pagination .page-item.previous .angle-left-icon,.pagination .page-item.previous .angle-right-icon,.rango-default{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important}.max-height-350{max-height:350px}.border-normal{border:1px solid #dcdcdc}.has-error input,.has-error select,.has-error textarea{border-color:#f05153!important}.modal-parent{top:0;width:100%;height:100%;position:fixed;background:hsla(0,0%,100%,.9);z-index:125}.compare-icon,.wishlist-icon{height:38px;display:table;cursor:pointer;margin-left:10px}.compare-icon i,.wishlist-icon i{display:table-cell;vertical-align:middle}.qty-btn,.qty-btn>*{height:36px;display:inline-block}.qty-btn>*{padding:0 10px;border:1px solid #ccc;vertical-align:top;line-height:3.5rem}.qty-btn>:not(:first-child){border-left:none;position:relative}.qty-btn>:nth-child(2){left:-4px}.qty-btn>:nth-child(3){left:-7px}.btn-add-to-cart{padding:3px 14px!important;border-radius:0!important;color:#fff!important;border-color:#26a37c!important;background-color:#26a37c!important}.btn-add-to-cart.large{padding:12px 18px}.btn-add-to-cart .rango-cart-1{padding-right:5px}.accordian .accordian-header i.rango-arrow{float:right;font-size:24px}.accordian .accordian-header i.rango-arrow:before{content:"\E908"}.accordian.active .accordian-header i.rango-arrow:before{content:"\E906"}.accordian .accordian-header{width:100%;font-size:18px;cursor:pointer;color:#3a3a3a;margin-top:-1px;padding-bottom:20px;display:inline-block}.accordian .accordian-content{width:100%;display:none;padding-bottom:10px}.accordian.active .accordian-header{padding-bottom:10px}.accordian.active .accordian-content{display:inline-block}.review-page-container{padding:20px;position:relative}.review-page-container>div:first-child{top:40px;position:sticky;height:-webkit-max-content;height:-moz-max-content;height:max-content}.review-page-container .category-breadcrumb{margin-bottom:30px}.review-page-container h2{font-size:24px;font-weight:600}.review-page-container h3{font-size:20px;font-weight:600}.review-page-container h4{font-size:16px;font-weight:600}.review-page-container .customer-reviews>div.row{padding-bottom:30px;display:block}.review-page-container .submit-btn{font-weight:600}.review-page-container .submit-btn button{padding:10px 15px}.customer-rating .rating-container{padding:30px 0}.customer-rating a{color:#4d7ea8}.customer-rating a:hover{text-decoration:none}.customer-rating .col-lg-6:first-child{border-right:1px solid #ccc}.customer-rating .rating-bar{top:12px;padding:0;height:5px;position:relative;background-color:#f7f7f9}.customer-rating .rating-bar>div{width:0;height:100%;background-color:#111}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .customer-rating button.btn.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity .customer-rating button.page-item,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.light.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity .customer-rating button.light,.account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.btn.page-item,.account-content .account-layout .bottom-toolbar .pagination .customer-rating .page-item,.account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.page-item,.cart-details .customer-rating .light.continue-shopping-btn,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .quantity button.page-item,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.btn.page-item,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button.light,.customer-rating .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light.btn,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn.page-item,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .page-item,.customer-rating .account-content .account-layout .bottom-toolbar .pagination .quantity .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.customer-rating .cart-details .light.continue-shopping-btn,.customer-rating .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination button.page-item,.customer-rating .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.light,.customer-rating .quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.page-item,.customer-rating .theme-btn.light,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .bottom-toolbar .pagination .customer-rating button.page-item,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.light,.quantity .account-content .account-layout .bottom-toolbar .pagination .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .customer-rating button.page-item{margin-top:10px}.review-form{width:80%}.review-form>div{padding-top:30px}.review-form>div label{font-size:14px;font-weight:500;display:block}.review-form>div input,.review-form>div textarea{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;border:1px solid #ccc}.filters-container{margin:20px 0}.filters-container .toolbar-wrapper>div{margin:0 20px 0 0;display:inline-block}.filters-container .toolbar-wrapper>div label{font-weight:500;margin-right:10px}.filters-container .toolbar-wrapper>div select{cursor:pointer;padding:6px 16px;color:rgba(0,0,0,.83);background-color:#fff}.filters-container .toolbar-wrapper>div .down-icon-position{pointer-events:none;background-color:#fff}.filters-container .toolbar-wrapper>div:not(:first-child){vertical-align:super}.filters-container .toolbar-wrapper .limiter:after{margin-left:10px}.view-mode{margin-bottom:20px}.view-mode .rango-view-grid-container{width:36px;height:36px;cursor:pointer;color:rgba(0,0,0,.83);padding:6px 0 0 5px;display:inline-block}.view-mode .rango-view-grid-container.active{color:#fff;background-color:#26a37c}.view-mode .rango-view-list-container{width:36px;height:36px;cursor:pointer;color:rgba(0,0,0,.83);padding:6px 0 0 5px;display:inline-block}.view-mode .rango-view-list-container.active{color:#fff;background-color:#26a37c}.modal-container{left:50%;top:100px;z-index:11;width:600px;max-width:80%;max-height:80%;position:fixed;font-size:14px;overflow-y:auto;margin-left:-300px;background:#fff;-webkit-animation:jelly .5s ease-in-out;animation:jelly .5s ease-in-out;-webkit-animation:fade-in-white .3s ease-in-out;animation:fade-in-white .3s ease-in-out;border-radius:5px;-webkit-box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2);box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2)}.modal-container .modal-header{padding:20px}.modal-container .modal-header h3{display:inline-block;font-size:20px;color:rgba(0,0,0,.83);margin:0}.modal-container .modal-header .icon{float:right;cursor:pointer}.modal-container .modal-header .icon.remove-icon{width:24px;right:20px;height:24px;margin-right:0;position:absolute;background-image:url("../images/Icon-remove.svg")}.modal-container .modal-body{padding:20px}.modal-container .modal-body .control-group .control{width:100%}.product-card-new{width:12rem;height:385px;border:none!important;margin:0 5px 10px 10px}.product-card-new .category-product-image-container{margin:0 auto;height:190px;position:relative}.product-card-new .category-product-image-container img{max-width:100%;max-height:100%}.product-card-new .product-image-container{max-height:190px;position:relative}.product-card-new .product-image-container img{width:100%;min-height:190px;max-height:190px}.product-card-new .card-current-price{font-size:18px}.product-card-new .product-rating .stars{display:inline-block}.product-card-new .product-rating span{font-size:14px;vertical-align:middle}.product-card-new .product-rating .material-icons{font-size:16px}.product-card-new .card-body{cursor:default}.product-card-new .card-body>div:last-child{margin-top:10px}.product-card-new .card-body .product-name,.product-card-new .card-body .product-rating{width:15rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-card-new .sticker{display:block}.product-card-new .card-body .compare-icon,.product-card-new .card-body .wishlist-icon{left:0;top:10px;display:none;margin-left:5px;margin-right:5px;position:absolute}.product-card-new .card-body .compare-icon{right:0;left:unset}.product-card-new .card-body .add-to-cart-btn{width:100%;position:relative}.product-card-new .card-body .add-to-cart-btn .btn-add-to-cart{width:100%;max-width:140px;max-width:100%!important}.carousel-products.with-recent-viewed .product-card-new .card-body .add-to-cart-btn .btn-add-to-cart,.product-card-new .card-body .add-to-cart-btn .btn-add-to-cart.small-padding,.product-card-new .card-body .add-to-cart-btn .carousel-products.with-recent-viewed .btn-add-to-cart{max-width:130px}.quick-view-btn-container{left:-20px;width:100%;bottom:10px;display:none;position:absolute}.quick-view-btn-container span{left:32%;top:-26px;z-index:1;font-size:16px;color:#fff;position:absolute}.quick-view-btn-container button{left:30%;top:-36px;border:none;color:#fff;font-size:16px;padding:5px 10px 7px 24px;position:absolute;opacity:.8;background-color:#0d2438}.product-card-new:hover #quick-view-btn-container{display:block}.product-card-new:hover .category-product-image-container,.product-card-new:hover .product-image-container{overflow:hidden}.product-card-new:hover .category-product-image-container img,.product-card-new:hover .product-image-container img{-webkit-transition:all .5s;transition:all .5s;-webkit-transform:scale(1.05);transform:scale(1.05)}.product-card-new:hover .compare-icon,.product-card-new:hover .wishlist-icon{display:block}.product-card-new:hover .sticker{display:none}.lg-card-container:hover .product-image{overflow:hidden}.lg-card-container:hover .product-image img{-webkit-transition:all .5s;transition:all .5s;-webkit-transform:scale(1.05);transform:scale(1.05)}.quantity{width:100%;padding-bottom:10px;font-size:16px!important}.quantity label{float:left;padding:5px 15px 10px 0}.quantity button,.quantity input{height:35px;border-radius:2px;vertical-align:top;padding:0 10px!important;font-size:24px!important;font-weight:600!important;color:#111!important;background-color:#fff;border:1px solid #ccc!important}.quantity input{max-width:50px;cursor:default;font-size:16px!important;text-align:center;margin-left:-5px;margin-right:-5px}.quantity button:hover{background-color:#f5f5f5!important}.quantity button:active,.quantity button:focus,.quantity input:active,.quantity input:focus{outline:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.form-container .container{width:65%;margin:0 auto;padding-top:30px}.form-container .container .heading{width:100%;margin-bottom:35px;display:inline-block}.form-container .container .heading h2{line-height:4rem;display:inline-block}.form-container .container .heading .btn-new-customer{float:right;font-size:16px}.form-container .container .body{font-size:16px;padding:35px 55px;margin-bottom:60px;border:1px solid #ccc}.form-container .container .body .form-header{margin-bottom:20px}.form-container .container .body form>div{padding-bottom:20px}.form-container .container .body form>div input{border:1px solid #dcdcdc}.container-right>.recently-viewed{padding-top:20px}.rango-star{cursor:default}.customer-options{top:40px;float:right;padding:20px;width:200px!important}.customer-options .customer-session{padding:10px 20px 0}.customer-options .customer-session label{font-size:18px;color:#9e9e9e;text-transform:uppercase}.customer-options li{padding:3px 0;height:unset!important}.customer-options li a{display:block;padding:0 20px!important}.customer-options a{font-size:16px}.cart-btn-collection button[type=button].btn-secondary{border:none;font-size:16px;color:#111;background-color:#fff}.cart-btn-collection button[type=button].btn-secondary :hover{color:#111!important;background-color:#fff!important}.cart-btn-collection button[type=button].btn-secondary :active,.cart-btn-collection button[type=button].btn-secondary :focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.cart-btn-collection button[type=button].btn-secondary #cart-count{left:-20px;top:-15px;padding:4px;min-width:20px;border-radius:50%;position:relative;color:#fff;background:#21a179}.mini-cart-container #mini-cart{outline:none;-webkit-box-shadow:none;box-shadow:none;text-decoration:unset}.mini-cart-container #mini-cart .badge{border-radius:50%;top:-2px;left:15px;padding:4px;min-width:20px;position:absolute;color:#fff;background:#21a179}.dropdown-icon-custom:after{top:-5px;color:#000;font-size:16px;position:relative;display:inline-block;margin-left:1rem;vertical-align:middle;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}#cart-modal-content{top:44px;z-index:100;width:350px;left:-265px;position:absolute}#cart-modal-content .close{top:12px;right:15px;padding:0;position:relative}#cart-modal-content .mini-cart-container{height:100%;width:100%;font-size:14px;max-height:200px;overflow-y:scroll;padding:10px 15px 0 20px}#cart-modal-content .small-card-container{margin:0;width:100%;padding:0}#cart-modal-content .small-card-container .product-image-container{margin:10px 10px 10px 0;border:1px solid #ececec}#cart-modal-content .small-card-container input{width:30px;text-align:center;font-weight:500;border:1px solid #ececec}#cart-modal-content .small-card-container .card-total-price{float:right}#cart-modal-content .small-card-container .rango-close{top:-10px;left:-10px;padding:0 4px 3px 3px;font-size:10px;max-height:17px;line-height:1.3rem;text-align:center;position:absolute;border-radius:50%;color:#fff;background:#111}#cart-modal-content .small-card-container:hover{-webkit-box-shadow:none;box-shadow:none}#cart-modal-content .modal-footer{padding-right:15px}.cart-details{padding:40px 20px}.cart-details h1{margin-bottom:30px}.cart-details .cart-details-header h2{margin-bottom:20px}.cart-details .cart-details-header .cart-header{max-height:45px;margin-bottom:20px;padding-bottom:20px!important;border-bottom:2px solid #e5e5e5}.cart-details .cart-details-header .cart-header>h3{font-size:16px;font-weight:600}.cart-details .cart-content{padding:0}.cart-details .cart-content .product-quantity .quantity{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.cart-details .cart-content .product-quantity .quantity label{display:none!important}.cart-details .cart-content .cart-item-list>.row{margin-bottom:40px}.cart-details .cart-content .cart-item-list>.row:last-child{padding-bottom:20px;border-bottom:2px solid #e5e5e5}.cart-details .cart-content .cart-item-list .product-image-container{padding:0;max-width:110px;max-height:110px}.cart-details .cart-content .cart-item-list .wishlist-icon{margin:0;display:inline}.cart-details .cart-content .product-details-content{padding-left:20px}.cart-details .cart-content .product-details-content .row{font-size:16px}.cart-details .cart-content .product-details-content .row .card-current-price{font-size:18px}.cart-details .cart-content .product-details-content .row>a{line-height:20px}.cart-details .continue-shopping-btn{max-width:156px;margin-top:20px;margin-left:15px}.cart-details .coupon-container{margin-top:20px}.cart-details .coupon-container .control-error{padding:10px 0}.account-content .sidebar{height:100%}.account-content .sidebar .customer-sidebar{border-right:1px solid #e5e5e5}.account-content .sidebar .customer-sidebar .account-details{text-align:center;padding:25px 20px}.account-content .sidebar .customer-sidebar .account-details .customer-name{width:60px;height:60px;margin:0 auto;font-size:24px;margin-bottom:5px;display:inline-block}.account-content .sidebar .customer-sidebar .account-details .customer-name-text{color:rgba(0,0,0,.83)}.account-content .sidebar .customer-sidebar .account-details .customer-email{color:#9e9e9e}.account-content .sidebar .customer-sidebar .navigation,.account-content .sidebar .customer-sidebar .navigation li{width:100%}.account-content .sidebar .customer-sidebar .navigation li.active,.account-content .sidebar .customer-sidebar .navigation li:hover{color:#28557b;background-color:#ececec}.account-content .sidebar .customer-sidebar .navigation li i.icon{font-size:18px;padding-right:5px}.account-content .sidebar .customer-sidebar .navigation li i.icon.profile:before{content:"\E995"}.account-content .sidebar .customer-sidebar .navigation li i.icon.address:before{content:"\E949"}.account-content .sidebar .customer-sidebar .navigation li i.icon.reviews:before{content:"\E97D"}.account-content .sidebar .customer-sidebar .navigation li i.icon.wishlist:before{content:"\E93E"}.account-content .sidebar .customer-sidebar .navigation li i.icon.orders:before{content:"\E931"}.account-content .sidebar .customer-sidebar .navigation li i.icon.downloadables:before{content:"\E926"}.account-content .sidebar .customer-sidebar .navigation li i.icon.compare:before{content:"\E93B"}.account-content .sidebar .customer-sidebar .navigation li a{display:block;padding:10px 15px}.account-content .sidebar .customer-sidebar .navigation li:last-child{margin-bottom:0}.account-content .account-layout{color:rgba(0,0,0,.83);padding:15px 20px;padding-bottom:60px}.account-content .account-layout.right{padding-left:250px!important}.account-content .account-layout .account-head{margin-bottom:20px}.account-content .account-layout .account-heading{font-size:24px;font-weight:600}.account-content .account-layout .account-table-content .control-group,.account-content .account-layout .account-table-content>.row{margin-bottom:30px}.account-content .account-layout .account-table-content label{font-weight:500}.account-content .account-layout .account-table-content input,.account-content .account-layout .account-table-content select,.account-content .account-layout .account-table-content textarea{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;background:#fff;border:1px solid #ccc}.account-content .account-layout .account-table-content input[type=search]{padding-left:35px}.account-content .account-layout .account-table-content input:active,.account-content .account-layout .account-table-content input:focus,.account-content .account-layout .account-table-content select:active,.account-content .account-layout .account-table-content select:focus,.account-content .account-layout .account-table-content textarea:active,.account-content .account-layout .account-table-content textarea:focus{border-color:#26a37c}.account-content .account-layout .account-table-content .address-holder{margin-top:30px}.account-content .account-layout .account-table-content .address-holder>div{margin:5px 0;padding-left:0}.account-content .account-layout .account-table-content .address-holder .card{height:100%}.account-content .account-layout .account-table-content .address-holder .card ul li{display:inline-block}.account-content .account-layout .account-table-content .account-items-list{margin-bottom:40px}.account-content .account-layout .account-table-content #datagrid-filters{width:100%;margin-bottom:20px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.account-content .account-layout .account-table-content #datagrid-filters .filter-left .icon-wrapper .search-btn{background-size:cover;width:24px;height:24px;background-image:url("../images/icon-search.svg");position:relative;float:left;top:-32px;left:6px}.account-content .account-layout .account-table-content #datagrid-filters>*{display:inline-block;vertical-align:top}.account-content .account-layout .account-table-content #datagrid-filters>.search-filter{top:20px;max-width:200px;margin-right:20px;position:relative}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(2){width:calc(50% - 10px)}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(3){width:calc(50% - 220px)}.account-content .account-layout .account-table-content #datagrid-filters>:nth-of-type(3) .control-group{float:right;max-width:200px}.account-content .account-layout .account-table-content #datagrid-filters>* input,.account-content .account-layout .account-table-content #datagrid-filters>* select{height:38px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters{font-size:16px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .grid-dropdown-header{display:inline-block}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-list li{list-style:none}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-toggle:after{border:unset}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container{width:100%;display:inline-block!important}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button{display:block;font-size:14px;margin-top:10px;font-weight:600;padding:5px 10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container li:not(:last-child){margin-bottom:10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container li{width:150px;display:inline-block}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .control-group{margin-bottom:0}.account-content .account-layout .account-table-content #datagrid-filters~table.table thead{font-size:18px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody{font-size:16px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr td a{display:block}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .badge{padding:10px;font-size:12px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon{font-size:24px;padding-left:10px}.account-content .account-layout .account-table-content #datagrid-filters~table.table tbody tr .action .eye-icon:hover{color:#4d7ea8}.account-content .account-layout .account-table-content #datagrid-filters .filter-left{float:left}.account-content .account-layout .account-table-content #datagrid-filters .filter-right{top:-25px;width:70%;float:right;position:relative}.account-content .account-layout .account-table-content #datagrid-filters .filter-right .per-page{right:0;position:absolute}.account-content .account-layout .account-table-content .filtered-tags .filter-tag{font-size:16px;margin-right:20px}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon:before{top:1px;content:"\E91F";margin-left:4px;position:relative}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .cross-icon:hover{cursor:pointer}.account-content .account-layout .account-table-content .filtered-tags .filter-tag .wrapper{color:#000311;margin-left:10px;padding:5px 10px;background:#e7e7e7;letter-spacing:-.22px}.account-content .account-layout .account-table-content.profile-page-content .table{padding:0;width:800px;margin-bottom:15px}.account-content .account-layout .account-table-content.profile-page-content .table>table{width:100%;color:#5e5e5e;border:1px solid rgba(0,0,0,.125)}.account-content .account-layout .account-table-content.profile-page-content .table td{border:unset;padding:6px 12px}.account-content .account-layout .account-table-content .accordian .accordian-header{padding:10px 0;font-weight:600}.account-content .account-layout .account-table-content .image-wrapper{width:100%;margin-top:10px;margin-bottom:20px;display:inline-block}.account-content .account-layout .account-table-content .image-wrapper .image-item{width:200px;height:200px;position:relative;border-radius:3px;margin-right:20px;background:#f8f9fa;margin-bottom:20px;display:inline-block;background-position:50%;background-repeat:no-repeat;background-image:url(/vendor/webkul/ui/assets/images/placeholder-icon.svg)}.account-content .account-layout .account-table-content .image-wrapper .image-item .remove-image{left:0;bottom:0;width:100%;color:#fff;padding:10px;cursor:pointer;margin-bottom:0;text-align:center;position:absolute;margin-right:20px;border-radius:0 0 4px 4px;text-shadow:0 1px 2px rgba(0,0,0,.24);background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.08)),to(rgba(0,0,0,.24)));background-image:linear-gradient(-180deg,rgba(0,0,0,.08),rgba(0,0,0,.24))}.account-content .account-layout .account-table-content .image-wrapper .image-item input{display:none}.account-content .account-layout .account-table-content .image-wrapper .image-item img.preview{width:100%;height:100%}.account-content .account-layout .account-items-list.wishlist-container{width:100%;margin:0 auto}.account-content .account-layout .account-items-list.wishlist-container .product-card-new{width:19rem}.account-content .account-layout .max-sm-img-dimention{max-width:110px;max-height:110px}.account-content .account-layout .max-sm-img-dimention img{width:100%;height:100%}.account-content .account-layout .reviews-container>.row{margin-bottom:40px}.account-content .account-layout .bottom-toolbar .pagination{margin:0}.account-content .account-layout .bottom-toolbar .pagination a:not([href]).next,.account-content .account-layout .bottom-toolbar .pagination a:not([href]).previous{cursor:not-allowed;color:#9e9e9e!important}.account-content .account-layout .bottom-toolbar .pagination .page-item{border:none!important;box-shadow:unset!important;-webkit-box-shadow:unset!important}.account-content .account-layout .bottom-toolbar .pagination .page-item.active{border:1px solid #26a37c;color:#26a37c!important}.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon,.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-right-icon{margin:0;font-size:24px;background:unset;text-align:center}.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon:before{content:"\E908"}.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon:before{content:"\E907"}.account-content .account-layout .sale-container{font-size:16px}.account-content .account-layout .sale-container .tabs ul{font-weight:600;font-size:20px;list-style-type:none}.account-content .account-layout .sale-container .tabs ul li{cursor:pointer;padding:10px 15px;display:inline-block;border-bottom:2px solid transparent}.account-content .account-layout .sale-container .tabs ul li.active{cursor:default;border-bottom:2px solid #26a37c}.account-content .account-layout .sale-container .tabs-content .sale-section{padding:20px 0 10px;border-bottom:1px solid #ccc}.account-content .account-layout .sale-container .tabs-content .sale-section .section-title{font-size:18px;font-weight:600;padding-bottom:10px;color:#9e9e9e}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content label+span{font-weight:600;color:#9e9e9e}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals{width:100%;display:inline-block}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals .sale-summary{float:right}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .totals .sale-summary tbody tr td:first-child{width:200px}.account-content .account-layout .sale-container .tabs-content .sale-section .section-content .table table{width:100%}.account-content .account-layout .sale-container .order-box-container{padding:10px 0}.account-content .account-layout .sale-container .order-box-container .box{width:calc(25% - 5px);vertical-align:top;display:inline-block}.account-content .account-layout .sale-container .order-box-container .box .box-title{font-size:18px;padding:10px 0;font-weight:600;color:#9e9e9e}.account-content .select-icon{left:95%;top:-28px;font-size:22px;position:relative}#alert-container{top:50px;right:15px;z-index:100;position:fixed;font-size:16px}#alert-container .alert{max-width:400px!important;min-height:45px!important;max-height:100px!important}#alert-container .alert.alert-dismissible .close{font-size:23px;padding:.3rem 1.25rem}.wishlist-icon{vertical-align:middle}.wishlist-icon i{color:#111}.checkout-process{padding:40px 20px}.checkout-process .col-lg-7 .coupon-container,.checkout-process .col-lg-7>div:not(:first-child){margin-top:20px}.checkout-process h1{font-weight:600;margin-bottom:30px}.checkout-process .layered-filter-wrapper,.checkout-process .scrollable{padding-top:25px}.checkout-process .order-summary-container{top:75px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .checkout-process .order-summary-container button.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity .checkout-process .order-summary-container button,.account-content .account-layout .bottom-toolbar .pagination .checkout-process .order-summary-container .page-item,.cart-details .checkout-process .order-summary-container .continue-shopping-btn,.checkout-process .order-summary-container .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,.checkout-process .order-summary-container .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,.checkout-process .order-summary-container .account-content .account-layout .bottom-toolbar .pagination .page-item,.checkout-process .order-summary-container.bottom h3,.checkout-process .order-summary-container .cart-details .continue-shopping-btn,.checkout-process .order-summary-container .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,.checkout-process .order-summary-container .theme-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .checkout-process .order-summary-container button{display:none}.checkout-process input[type=radio]{transform:scale(1.3);-ms-transform:scale(1.3);-webkit-transform:scale(1.3)}.checkout-process .styled-select{cursor:pointer}.checkout-process .styled-select+.select-icon{top:55%;left:92%;font-size:20px;position:absolute}.checkout-process .coupon-container input{max-width:200px}.checkout-process .coupon-container button{margin:20px 0 30px}.checkout-process .coupon-container .applied-coupon-details{font-size:16px;margin-bottom:10px}.checkout-process .coupon-container .applied-coupon-details label:first-of-type{color:#26a37c}.checkout-process .coupon-container .rango-close{cursor:pointer;margin-left:5px}.address-container .address-holder{margin-top:15px}.address-container .address-holder>div{margin:5px 0;padding-left:0}.address-container .address-holder .card{height:100%}.address-container .address-holder .card h5{font-size:14px}.address-container .address-holder .card ul li{display:inline-block}.address-container .address-holder .card .add-address-button{height:100%;display:table;text-align:center}.address-container .address-holder .card .add-address-button>div{display:table-cell;vertical-align:middle}.address-container .address-holder .card .add-address-button>div span{vertical-align:super}.custom-form .form-field{padding:0;margin-bottom:30px}.custom-form label{font-weight:500}.custom-form input[type=password],.custom-form input[type=search],.custom-form input[type=text],.custom-form select{width:100%;resize:none;font-size:16px;padding:5px 16px;border-radius:1px;background:#fff;border:1px solid #ccc}.custom-form input[type=checkbox]{position:relative;top:3px}.custom-form input:active,.custom-form input:focus,.custom-form select:active,.custom-form select:focus{border-color:#26a37c}.payment-form .payment-methods>.row,.payment-form .shipping-methods>.row,.payment-form h3,.review-checkout-conainer .payment-methods>.row,.review-checkout-conainer .shipping-methods>.row,.review-checkout-conainer h3,.shipping-form .payment-methods>.row,.shipping-form .shipping-methods>.row,.shipping-form h3{margin-bottom:20px}.payment-form .payment-methods .instructions,.payment-form .shipping-methods .instructions,.review-checkout-conainer .payment-methods .instructions,.review-checkout-conainer .shipping-methods .instructions,.shipping-form .payment-methods .instructions,.shipping-form .shipping-methods .instructions{margin-top:5px;margin-left:-13px}.payment-form .payment-methods .instructions label,.payment-form .shipping-methods .instructions label,.review-checkout-conainer .payment-methods .instructions label,.review-checkout-conainer .shipping-methods .instructions label,.shipping-form .payment-methods .instructions label,.shipping-form .shipping-methods .instructions label{font-weight:600;font-size:14px}.payment-form .payment-methods .instructions p,.payment-form .shipping-methods .instructions p,.review-checkout-conainer .payment-methods .instructions p,.review-checkout-conainer .shipping-methods .instructions p,.shipping-form .payment-methods .instructions p,.shipping-form .shipping-methods .instructions p{margin:0;font-size:14px;color:#777;font-style:italic}.payment-form .address-summary li,.review-checkout-conainer .address-summary li,.shipping-form .address-summary li{display:inline-block}.payment-form .cart-item-list,.review-checkout-conainer .cart-item-list,.shipping-form .cart-item-list{padding:20px 0;border-bottom:1px solid #e5e5e5}.payment-form .cart-item-list h4,.review-checkout-conainer .cart-item-list h4,.shipping-form .cart-item-list h4{padding-bottom:20px;border-bottom:1px solid #e5e5e5;margin-bottom:20px!important}.payment-form .cart-item-list>.row:first-child,.review-checkout-conainer .cart-item-list>.row:first-child,.shipping-form .cart-item-list>.row:first-child{margin-top:50px}.payment-form .cart-item-list>.row,.review-checkout-conainer .cart-item-list>.row,.shipping-form .cart-item-list>.row{margin-bottom:20px}.payment-form .cart-details,.review-checkout-conainer .cart-details,.shipping-form .cart-details{padding:40px 0}.order-summary-container{top:50px;padding-top:25px;height:-webkit-max-content;height:-moz-max-content;height:max-content;position:sticky!important;max-width:500px!important}.order-summary-container>div{width:100%}.order-summary-container .order-summary{padding:25px 30px;border:1px solid #e5e5e5}.order-summary-container .order-summary>h3{margin-bottom:20px}.order-summary-container .order-summary>.row:not(:last-child){margin-bottom:10px}.order-summary-container .order-summary #grand-total-detail{margin-top:15px;padding-top:15px;margin-bottom:25px;border-top:1px solid #e5e5e5}.order-success-content{padding:40px 20px;font-size:16px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#address-section .form-header h3{margin-bottom:20px}.attached-products-wrapper{margin-top:20px}#related-products-carousel .product-card-new:first-child{margin-left:0!important}.price-label{margin-right:6px}.product-price{height:72px}.product-price .price-label{margin-right:6px}.product-price .regular-price{font-weight:500;margin-right:10px;text-decoration:line-through;display:block}.product-price .price-from .bundle-regular-price{font-size:12px!important;font-weight:500;margin-right:10px;text-decoration:line-through}.product-price .price-from .bundle-special-price{font-size:15px!important;font-weight:600}.product-price .price-from .bundle-to{display:block;font-size:15px!important;font-weight:500;margin-top:1px;margin-bottom:1px}.product-price span.price-label{font-size:16px}.product-price span.final-price{font-size:24px}.sticker{top:8px;left:8px;border:none;color:#fff;display:none;font-size:14px;font-weight:600;padding:2px 10px;position:absolute;border-radius:12px}.sticker.sale{padding:2px 14px;background-color:#f05153}.sticker.new{background-color:#26a37c;display:block}#app{min-height:65vh;position:relative}.main-container-wrapper .sticky-header{top:0;height:55px;z-index:100;position:sticky;background:#fff}.main-container-wrapper .sticky-header.header-shadow{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.search-container{padding:30px 20px}.search-container .lg-card-container.list-card{margin:0 15px}.search-container :first-child{margin-top:0}.method-sticker{font-size:13px;padding:4px 8px;margin-right:3px;margin-bottom:3px;text-align:center;border-radius:1px;display:inline-block;color:#cfcfd0;background-color:#141516}.sidebar{z-index:1000000;width:230px}.sidebar .category-content .category-title{top:-1px;font-weight:600;position:relative}.sidebar .category-content .rango-arrow-right{top:4px;position:relative}.sidebar .category-content .category-icon{width:25px;height:20px;padding-right:5px;display:inline-block}.sidebar .category-content .category-icon img{width:100%;height:100%;vertical-align:text-top}.sidebar li:hover>a>span{color:#28557b}.sidebar .sub-categories{display:none}.sidebar .sub-categories .category{padding:5px 0 4px 15px}.sidebar .sub-categories .category+.nested{color:rgba(0,0,0,.83)}.sidebar .sub-categories .category+.nested li a{padding-top:0}.sidebar .sub-categories .category+.nested li a .category-title{font-weight:500;padding-left:28px}.sidebar .sub-categories .category .category-title{vertical-align:top}.category-list-container{z-index:10;padding:0!important;background:#fff;position:absolute!important;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.category-list-container .category{width:100%;line-height:2.5rem;display:inline-block}.category-list-container .category span{top:-4px;position:relative}.category-list-container li a{padding:7px 0 5px 15px}.category-list-container li a:hover{background:#ececec}.category-list-container .sub-categories{top:-1px;left:100%;height:100%;min-height:330px;z-index:100;padding-top:10px;position:absolute;background:#fff;border-left:1px solid #ccc;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);overflow-y:auto}.category-list-container .sub-categories li:last-of-type{margin-bottom:10px}#sidebar-level-0{display:none;z-index:100000;border-top:1px solid #ccc}.grouped-product-container .grouped-product-list ul li{width:100%;font-size:18px;margin-bottom:10px;display:inline-block}.grouped-product-container .grouped-product-list ul li:last-child{margin-bottom:0}.grouped-product-container .grouped-product-list ul li:first-child span{font-weight:600}.grouped-product-container .grouped-product-list ul li:first-child span:last-child{float:right;width:50px;text-align:left}.grouped-product-container .grouped-product-list ul li .name{font-size:16px;vertical-align:middle;display:inline-block}.grouped-product-container .grouped-product-list ul li .qty{float:right}.grouped-product-container .grouped-product-list ul li .qty .control-group{height:45px;width:auto;border-top:0;padding-top:0;margin-bottom:0;max-width:none;text-align:center}.grouped-product-container .grouped-product-list ul li .qty .control-group label{display:none}.grouped-product-container .grouped-product-list ul li .qty .control-group .control{width:60px;text-align:center;line-height:38px}.grouped-product-container .grouped-product-list ul li .qty .control-group>*{height:100%}.bundle-options-wrapper .bundle-option-list{padding:15px 0;border-top:1px solid hsla(0,0%,64%,.2)}.bundle-options-wrapper .bundle-option-list h3{font-size:16px;margin:0;color:#242424}.bundle-options-wrapper .bundle-option-list .bundle-option-item{border-bottom:1px solid hsla(0,0%,64%,.2);padding:15px 0;width:100%;display:inline-block}.bundle-options-wrapper .bundle-option-list .bundle-option-item:last-child{border-bottom:0;padding-bottom:0}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group{margin-bottom:0;color:#5e5e5e}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group label{color:#242424}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group .control{color:#5e5e5e}.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity{border-top:0;padding-bottom:0}.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity.has-error button{border-color:#fc6868;color:#fc6868}.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-error{float:left;width:100%}.bundle-options-wrapper .bundle-option-list .bundle-option-item.has-error button{border-color:#fc6868;color:#fc6868}.bundle-options-wrapper .bundle-summary{padding:15px 0;border-top:1px solid hsla(0,0%,64%,.2)}.bundle-options-wrapper .bundle-summary h3{font-size:16px;margin:0;color:#242424}.bundle-options-wrapper .bundle-summary .quantity{border-top:0}.bundle-options-wrapper .bundle-summary .bundle-price{font-weight:600;font-size:24px;color:#ff6472;margin-top:10px}.bundle-options-wrapper .bundle-summary ul.bundle-items li{margin-bottom:20px}.bundle-options-wrapper .bundle-summary ul.bundle-items li:last-child{margin-bottom:0}.bundle-options-wrapper .bundle-summary ul.bundle-items li .selected-products{color:#5e5e5e}.category-container .grid-card,.search-container .grid-card{width:15rem}.downloadable-container .sample-list{padding:5px 0}.downloadable-container .sample-list h3{font-size:16px;margin-top:0}.downloadable-container .sample-list ul li{margin-bottom:5px}.downloadable-container .sample-list ul li:last-child{margin-bottom:0}.downloadable-container .link-list{padding:5px 0}.downloadable-container .link-list h3{font-size:16px;margin-top:0}.downloadable-container .link-list ul li{margin-bottom:15px}.downloadable-container .link-list ul li:last-child{margin-bottom:0}.downloadable-container .link-list ul li .checkbox input[type=checkbox]{width:15px!important;height:15px!important;margin-left:-24px}.downloadable-container .link-list ul li a{float:right;margin-top:3px}.category-container{min-height:670px;margin-left:15px;padding:40px 15px!important}.category-container .hero-image{display:inline-block}.category-container .hero-image img{width:100%;height:100%;max-height:500px;margin-bottom:30px}.vue-slider .vue-slider-rail{background-color:#ccc}.vue-slider .vue-slider-dot-handle{width:100%;height:100%;border-radius:50%;background-color:#fff;-webkit-box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32)}.vue-slider .vue-slider-dot-tooltip-inner,.vue-slider .vue-slider-dot-tooltip-text{border-color:#26a37c!important;background-color:#26a37c!important}.vue-slider .vue-slider-dot-tooltip-text{display:block;font-size:14px;min-width:20px;padding:2px 5px;text-align:center;border-radius:5px;white-space:nowrap;color:#fff}.vue-slider .vue-slider-dot-tooltip-text:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\0;border-top-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider .vue-slider-process{background-color:#26a37c!important}.full-content-wrapper>.container-fluid{padding:0!important;margin-bottom:60px!important}.full-content-wrapper>.container-fluid>.row{padding:0 15px!important}.full-content-wrapper div>.container-fluid,.full-content-wrapper p>.container-fluid{padding:0!important;margin-bottom:60px!important}.full-content-wrapper div>.container-fluid>.row,.full-content-wrapper p>.container-fluid>.row{padding:0 15px!important}.slides-container{position:relative}.slides-container .VueCarousel-pagination{display:none}.slides-container .VueCarousel-pagination button:active,.slides-container .VueCarousel-pagination button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.slides-container .VueCarousel-pagination .VueCarousel-dot{padding:5px!important}.slides-container .VueCarousel-dot--active{background-color:#26a37c!important}.slides-container .VueCarousel .VueCarousel-inner{padding-top:0}.slides-container .VueCarousel .VueCarousel-slide{position:relative}.slides-container .VueCarousel .VueCarousel-slide .show-content{top:0;left:0;width:100%;height:100%;display:table;text-align:center;position:absolute}.slides-container .VueCarousel .VueCarousel-slide .show-content p{display:table-cell;vertical-align:middle}.slides-container .VueCarousel .VueCarousel-slide:not(:first-of-type) img{display:none}.filter-attributes-item{margin-bottom:10px;border-bottom:1px solid #ccc}.filter-attributes-item.active .filter-attributes-content{display:block}.filter-attributes-item .filter-input{margin:10px 15px 13px -4px}.filter-attributes-item .filter-input input[type=text]{text-align:center;border:1px solid #26a37c;width:30%;background-color:#fff}.filter-attributes-item input[type=checkbox]+span{margin-left:10px!important}.filter-attributes-content{display:none;margin-left:7px}.layered-filter-wrapper{max-height:670px;overflow-x:hidden;margin-bottom:42px;padding:42px 10px 0}.layered-filter-wrapper .recently-viewed{margin-top:20px}.layered-filter-wrapper .recently-viewed h2{font-size:18px}.selective-div{width:150px;-webkit-appearance:none}.select-icon-margin{margin-top:10px;margin-left:96px}.down-icon-position{position:absolute}.select-icon-show-margin{margin-left:35px;margin-top:10px}.down-arrow-margin{margin-left:75px;margin-top:8px}.vc-header{z-index:10;margin:0!important;padding:0!important;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.23);box-shadow:0 1px 3px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.23)}.new-products-recent{top:-44px;position:relative}.recently-viewed-products-wrapper{padding:2px}.recently-viewed-products-wrapper .price-from .bundle-regular-price{display:none}.recently-viewed-products-wrapper .price-from .bundle-special-price{font-size:15px!important;font-weight:600}.recently-viewed-products-wrapper .price-from .bundle-to{display:unset;margin:0 2px;font-size:15px!important;font-weight:500}.pagination{width:100%}.pagination .page-item{padding:0 10px}.pagination .page-item.active{font-weight:600;color:#26a37c!important;border-bottom:2px solid #26a37c}.pagination .page-item.next .angle-left-icon,.pagination .page-item.next .angle-right-icon,.pagination .page-item.previous .angle-left-icon,.pagination .page-item.previous .angle-right-icon{margin:0;font-size:24px;background:unset;text-align:center}.pagination .page-item.next .angle-right-icon:before{content:"\E908"}.pagination .page-item.previous .angle-left-icon:before{content:"\E907"}.pagination a{color:unset!important;text-decoration:none!important}.pagination a i{top:2px;font-size:18px;position:relative}.pagination .angle-left-icon,.pagination .angle-right-icon{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important;background:unset}.pagination .angle-right-icon:before{content:"\E908"}.pagination .angle-left-icon:before{content:"\E907"}.carousel-products+.recently-viewed{top:-40px;position:relative}.carousel-products .VueCarousel-slide{cursor:default}.vue-slider{max-width:97%}.profile-update-form{width:800px}.compare-products{width:100%;cursor:pointer;overflow-x:auto;padding-bottom:20px;word-break:break-word;margin-left:0!important;margin-right:10px!important}.compare-products .active{cursor:grabbing;cursor:-webkit-grabbing;-webkit-transform:scale(1);transform:scale(1)}.compare-products tr{width:100%}.compare-products td{padding:15px;min-width:250px;max-width:250px;vertical-align:top}.compare-products .image-wrapper{width:100%}.compare-products .stars i{font-size:16px}.compare-products .action{position:relative}.compare-products .action .btn-add-to-cart{width:125px!important;white-space:pre-wrap}.compare-products .action .close-btn{right:0;top:6px;position:absolute;display:inline-block}.compare-products .action .close-btn:hover{font-weight:600}.compare-products .action .compare-icon{display:none}.compare-products .material-icons.cross{top:5px;right:20px;cursor:pointer;position:absolute}.compare-products .wishlist-icon{top:5px;right:60px;position:absolute;display:inline-block}.compare-products::-webkit-scrollbar{display:none}.compare-products{-ms-overflow-style:none;scrollbar-width:none}.cp-spinner{width:48px;height:48px;position:absolute;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;left:calc(50% - 24px);margin-top:calc(40% - 24px)}.overlay-loader{top:50%;left:50%;z-index:11;position:fixed;margin-top:-24px;margin-left:-24px}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}.cp-round:before{border-radius:50%;border:6px solid grey}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #26a37c;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.image-search-container{top:9px;right:45px;z-index:10;cursor:pointer;position:absolute;background:#fff;height:24px!important}.image-search-result{width:100%;padding:20px;border-radius:2px;margin-bottom:20px;display:inline-block;border:1px solid #0041ff;background-color:rgba(0,65,255,.1)}.image-search-result .searched-image{float:left}.image-search-result .searched-image img{width:150px;height:auto;-webkit-box-shadow:1px 1px 3px 0 rgba(0,0,0,.32);box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)}.image-search-result .searched-terms{margin-left:20px;display:inline-block}.image-search-result .searched-terms .term-list a{padding:5px 8px;margin-top:10px;background:#fff;margin-right:10px}.filtered-tags{margin-bottom:20px}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{scroll-behavior:smooth}body .container-margin{margin:auto 20px}.root-category-menu{border-bottom:1px solid #d8e6ed}.angle-right-icon{width:22px;height:20px;float:right;margin-right:10px;background-image:url("../images/Icon-Arrow-Right.svg")}.card-product-image-container{height:300px;min-height:100px;max-height:300px}.card-product-image-container img{width:100%;height:100%}.card-product-image-container .background-image-group{width:100%;height:100%;background-position:50%;background-repeat:no-repeat}.hide-text{white-space:nowrap;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden!important}.card-bottom-container{margin-top:12px}.card-actual-price{text-decoration:line-through}.card-discount{color:rgba(38,163,124,.83)}.no-border-shadow{border:none!important;box-shadow:none!important;-webkit-box-shadow:none!important}.card-bottom-container .rango-heart{float:right;margin-top:8px;cursor:pointer;font-size:20px}.disable-active:active,.disable-active:focus,header #search-form>:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.container-margin>.container-fluid{margin-bottom:60px}.v-mr-20{margin-right:2rem}.popular-product-categories .active{color:#4d7ea8;padding:0 10px 5px;display:inline-block;border-bottom:2px solid}.popular-product-categories .switch-buttons{top:-3px;position:relative}.align-vertical-super{vertical-align:super}.align-vertical-top{vertical-align:top}.card-sale-btn{top:5px}.star-rating>*{font-size:14px}.advertisement-four-container .offers-ct-panel>.row{padding:0 10px}.advertisement-four-container .offers-ct-panel a:first-child{padding-bottom:15px!important}.advertisement-four-container .offers-ct-panel .offers-ct-top{height:180px}.advertisement-four-container .offers-ct-panel .offers-ct-bottom{height:220px}.advertisement-four-container>.row:first-child{padding:0 10px!important}.advertisement-four-container .col-4:nth-child(2){padding-left:10px;padding-right:10px}.advertisement-four-container img{width:100%;height:100%;max-height:425px}.advertisement-four-container img:first-of-type,.advertisement-four-container img:last-child{padding:0}.advertisement-two-container img{width:100%}.advertisement-three-container img{height:100%}.advertisement-three-container .bottom-container img,.advertisement-three-container .top-container img{height:225px}.advertisement-three-container .bottom-container{padding-top:15px}.recently-viewed-items{padding-left:10px!important;padding:0!important}.product-policy-container .card{border:none;padding:20px 10px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.product-policy-container .card .policy{display:table;padding:0 10px}.product-policy-container .card .policy .left{margin-right:10px;display:inline-block}.product-policy-container .card .policy .right{display:table-cell;vertical-align:middle}.product-policy-container .product-policy-wrapper:first-of-type{padding-left:0}.product-policy-container .product-policy-wrapper:last-of-type{padding-right:0}.category-with-custom-options img{width:100%;max-width:100%;height:100%;max-height:100%}.category-with-custom-options .row:first-child{margin-bottom:0}.category-with-custom-options .row:first-child .category-image{height:350px}.category-with-custom-options .row:first-child > div{padding:0;background-repeat:no-repeat}.category-with-custom-options .row:first-child > div:first-child,.category-with-custom-options .row:first-child > div:nth-child(3){max-height:345px}.category-with-custom-options .row:nth-child(2) .category-image{height:350px}.category-with-custom-options .row:nth-child(2)>div{padding:0;background-repeat:no-repeat}.category-with-custom-options .row:nth-child(2)>div:nth-child(2),.category-with-custom-options .row:nth-child(2)>div:nth-child(4){max-height:345px}.category-with-custom-options .categories-collection{width:100%;height:100%;display:table;min-height:310px;max-height:345px;padding-left:36px;background:#2b2b2b}.category-with-custom-options .categories-collection h2{color:#fff}.category-with-custom-options .categories-collection li{color:hsla(0,0%,100%,.83)}.category-with-custom-options .categories-collection .category-text-content{height:100%;display:table-cell;vertical-align:middle}.hot-categories-container .hot-category-wrapper{padding:0 10px 0 0}.hot-categories-container .hot-category-wrapper .card{height:100%;padding:20px;border:none}.hot-categories-container .hot-category-wrapper .velocity-divide-page .left{width:30px;height:30px;margin-left:10px}.hot-categories-container .hot-category-wrapper .velocity-divide-page .left img{width:100%;height:100%}.hot-categories-container .hot-category-wrapper .velocity-divide-page .right{padding-left:50px!important}.hot-categories-container .hot-category-wrapper:nth-last-child(2){padding:0}.hot-categories-container .hot-category-wrapper:last-child{padding:0 0 0 10px}.hot-categories-container ul,.popular-categories-container ul{line-height:2.5rem}.hot-categories-container li,.popular-categories-container li{font-size:16px}.popular-categories-container .popular-category-wrapper{padding:0 8px}.popular-categories-container .popular-category-wrapper .card{height:100%;border:none}.popular-categories-container .popular-category-wrapper .card .category-image{height:180px}.popular-categories-container .popular-category-wrapper .card .category-image img{width:100%;height:100%}.popular-categories-container .popular-category-wrapper .card-image{height:180px;background-size:100% 100%;background-image:url("../images/man.png")}.popular-categories-container .popular-category-wrapper .card-description{padding:10px 20px}.popular-categories-container .popular-category-wrapper:first-child{padding-left:0}.popular-categories-container .popular-category-wrapper:nth-last-child(2){padding-right:0}.popular-categories-container .popular-category-wrapper:last-child{padding-left:16px;padding-right:0}.reviews-container .review-wrapper:first-of-type{padding:0 8px 0 0}.reviews-container .review-wrapper{padding:0 8px}.reviews-container .review-wrapper:nth-last-of-type(2){padding:0 0 0 8px}.reviews-container .review-wrapper:last-of-type{padding:0 0 0 16px}.reviews-container .card{border:none;height:100%;padding:20px;padding-left:15px;padding-right:15px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.reviews-container .card .customer-info>div{padding:0;display:inline-block}.reviews-container .card .customer-info>div:first-child{width:60px;margin-right:10px}.reviews-container .card .customer-info>div:last-child{width:calc(100% - 75px)}.reviews-container .card .review-info{height:100%;padding:20px 15px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.reviews-container .card .review-info>div:not(:last-child){margin-bottom:10px}.reviews-container .card .review-info .star-ratings{margin-bottom:5px!important}.main-content-wrapper,.reviews-container .product-info{display:inline-block}.main-content-wrapper>.row.disabled{cursor:not-allowed}.main-content-wrapper .main-category{padding:8px 15px;border-top:1px solid #ccc;border-bottom:5px solid transparent}.main-content-wrapper .content-list{margin:0;width:100%;height:42px;text-align:left;list-style:none;position:relative;vertical-align:top;display:inline-block}.main-content-wrapper .content-list ul{width:100%;height:100%;white-space:nowrap;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;background-color:#4d7ea8;overflow-x:auto}.main-content-wrapper .content-list ul li a{display:block;cursor:pointer;font-size:16px;font-weight:600;padding:8px 15px;letter-spacing:0;position:relative;color:#fff;text-decoration:none}.main-content-wrapper .content-list ul li:hover{background-color:#42719a}.velocity-divide-page{position:relative}.velocity-divide-page .left{z-index:1;width:230px;position:absolute}.velocity-divide-page .right{width:100%;padding-left:230px!important}.container-right{width:100%;display:inline-block}.container-right>:first-child{width:100%}.home-base{margin-bottom:60px}.broken-image{width:320px;height:160px;background-image:url("../images/static/broken-clock.png")}.velocity-icon{width:150px;height:150px;background-image:url("../images/static/v-icon.png")}.error-page{padding-top:30vh}.custom-circle{width:56px;height:54px;padding:14px;font-size:20px;color:#21a179;border-radius:50%;text-align:center;background:#fff;display:inline-block;vertical-align:middle;border:2px solid #21a179;font:18px josefin sans,arial}body:after{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(71,55,78,.8);opacity:0;-webkit-transition:opacity .3s 0s,visibility 0s .3s;transition:opacity .3s 0s,visibility 0s .3s}.cd-quick-view{top:100px;width:700px;z-index:101;padding:40px;display:none;position:absolute;margin-bottom:50px;left:calc(50% - 350px);background-color:#fff;-webkit-box-shadow:0 0 30px rgba(0,0,0,.2);box-shadow:0 0 30px rgba(0,0,0,.2);-webkit-transform:translateZ(0);transform:translateZ(0);backface-visibility:hidden;will-change:left,top,width;-webkit-backface-visibility:hidden}.cd-quick-view .cd-slider li.selected img{width:100%;height:100%;display:inline-block!important}.cd-quick-view .cd-slider img{display:none}.cd-quick-view .close-btn{top:15px;right:20px;font-weight:600;position:absolute}.cd-quick-view .action-buttons{padding-top:10px;margin-left:118px}.cd-quick-view .action-buttons>span{font-size:24px;margin-left:24px}.cd-quick-view .product-actions{display:inline-block}.cd-quick-view .product-actions .compare-icon,.cd-quick-view .product-actions .wishlist-icon{height:38px;display:inline-table;cursor:pointer;margin-left:10px}.cd-quick-view .product-actions .compare-icon i,.cd-quick-view .product-actions .wishlist-icon i{display:table-cell;vertical-align:middle}.cd-quick-view .product-actions .wishlist-icon{float:right}.cd-quick-view .product-actions .add-to-cart-btn{float:left}.cd-quick-view .quick-view-name{font-size:24px;line-height:25px}.cd-quick-view .product-price{margin-top:10px}.cd-quick-view .product-rating{display:table;margin:10px 0}.cd-quick-view .product-rating a,.cd-quick-view .product-rating span{vertical-align:top;display:table-cell}.cd-quick-view .product-gallery{top:10px;position:sticky}.cd-quick-view .product-gallery .VueCarousel-pagination button{padding:0!important;margin:3px!important;border:1px solid #dcdcdc!important;background-color:#fff!important}.cd-quick-view .product-gallery .VueCarousel-pagination button.VueCarousel-dot--active{background-color:#dcdcdc!important}.cd-quick-view .product-gallery .VueCarousel-pagination button.VueCarousel-dot--active:focus{outline:none}.cd-quick-view .description-text{word-break:break-word;overflow:auto}.container{max-width:1300px!important}.slider-container{min-height:400px}.category-page-wrapper,.remove-padding-margin{width:100%!important;margin:0!important;padding:0!important}.demo{border:1px solid red}.quick-addtocart-btn{margin-top:306px;margin-left:-82px}.model-display-block{display:block}.footer{width:100%;background-color:#fff;display:inline-block}.footer .footer-content .newsletter-subscription{color:#fff;padding:10px 130px;background-color:#4d7ea8}.footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{width:300px;border:none;height:38px;font-size:18px;max-width:250px;padding:10px 20px;color:rgba(0,0,0,.83)}.footer .footer-content .newsletter-subscription .newsletter-wrapper button.subscribe-btn{left:-2px;height:38px;font-size:18px;max-width:110px;line-height:10px;position:relative}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons{height:100%;padding:20px 0;color:#fff}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons i{margin:0;cursor:pointer}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons .within-circle{background:#4d7ea8;margin-right:2px;border:1px solid hsla(0,0%,100%,.52)}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons .within-circle:hover{opacity:.5}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons img{background:#4d7ea8;border:1px solid hsla(0,0%,100%,.52);padding-left:15px;padding-right:15px}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{text-align:right;padding:25px 0 30px}.footer .footer-content>.row{padding:60px 130px;background:#30383f}.footer .footer-content>.row .logo{width:auto;max-height:40px}.footer .footer-content>.row .footer-ct-content>div{margin:0;padding:0;font-size:14px;line-height:2.5rem}.footer .footer-content>.row .footer-ct-content>div ul{margin-bottom:0}.footer .footer-content>.row .footer-ct-content>div ul li{margin-bottom:5px}.footer .footer-content>.row .footer-ct-content>div ul li a{color:hsla(0,0%,100%,.83)}.footer .footer-content>.row .footer-rt-content{padding-right:0}.footer .footer-content>.row .footer-rt-content .row>div{width:100%;display:block}.footer .footer-content>.row .footer-rt-content .row .bg-image,.footer .footer-content>.row .footer-rt-content .row .small-card-container .product-image,.small-card-container .footer .footer-content>.row .footer-rt-content .row .product-image{width:42px;height:30px;display:inline-block;background-position:0}.footer .footer-content>.row .footer-rt-content .row .bg-image:not(:last-child),.footer .footer-content>.row .footer-rt-content .row .small-card-container .product-image:not(:last-child),.small-card-container .footer .footer-content>.row .footer-rt-content .row .product-image:not(:last-child){margin-right:3px}.footer .footer-content>.row .footer-rt-content .row .cash{background-image:url("../images/static/cash.png")}.footer .footer-content>.row .footer-rt-content .row .cheque{width:57px!important;background-image:url("../images/static/cheque.png")}.footer .footer-content>.row .footer-rt-content .row .visa{background-image:url("../images/static/visa.png")}.footer .footer-content>.row .footer-rt-content .row .master-card{background-image:url("../images/static/master-card.png")}.footer .footer-content>.row .footer-rt-content .row .paypal{background-image:url("../images/static/paypal.png")}.footer .footer-content>.row .footer-rt-content .row .discover{background-image:url("../images/static/discover.png")}.footer .footer-content>.row .footer-rt-content .row:not(:last-child){padding-bottom:20px}.footer .footer-content>.row .footer-rt-content h3{font-size:14px;color:hsla(0,0%,100%,.52)}.footer .footer-content .footer-statics .software-description{padding-left:0}.footer .footer-content .footer-statics .software-description p{font-size:14px}.footer .top-brands{padding:30px 130px}.footer .top-brands .top-brands-body ul{width:85%;display:inline-block}.footer .top-brands .top-brands-body ul li{margin-left:0;font-size:16px;padding:15px 0 0;display:inline-block}.footer .footer-copy-right{width:100%;height:60px;font-size:16px;line-height:6rem;text-align:center;background:#30383f;color:hsla(0,0%,100%,.83)}.footer .footer-copy-right p{padding:0 20px}.footer .footer-copy-right a{color:unset}.footer .footer-copy-right a:hover{color:#4d7ea8}.product-detail{padding-top:20px;margin-bottom:20px;padding-left:0!important;padding-right:0!important}.product-detail .right>div{border-bottom:1px solid #ccc}.product-detail .right>div.attributes .attribute{margin-bottom:20px}.product-detail .right>div.attributes .attribute:last-child{margin-bottom:30px}.product-detail .right .category-breadcrumb{margin-left:0;padding:0 15px}.product-detail .right .reviews{vertical-align:top}.product-detail .right .reviews>div{display:inline-block}.product-detail .right .info{margin-left:0}.product-detail .right .info>h2,.product-detail .right .info div{padding-left:0}.product-detail .right .info>*{margin-bottom:10px}.product-detail .right .info .availability button{border:none;color:#fff;font-weight:600;cursor:default;padding:2px 11px;background:#f05153}.product-detail .right .info .availability button.active{background:#4d7ea8}.product-detail .right .options .box{width:32px;height:32px;display:inline-block;background-color:#ccc}.product-detail .right h3{margin-bottom:0}.product-detail .right .row.reviews .reviews-text{line-height:3rem}.product-detail .right .add-to-cart-btn{padding:0}.product-detail .right .add-to-cart-btn button{text-transform:uppercase;padding:9px 15px!important}.product-detail .right .add-to-cart-btn button span{top:0;font-size:16px}.product-detail .right .product-price{height:unset}.product-detail .right .product-price .price-from .bundle-regular-price{font-size:20px!important;font-weight:500;margin-right:10px;text-decoration:line-through}.product-detail .right .product-price .price-from .bundle-special-price{font-size:20px!important;font-weight:600}.product-detail .right .product-price .price-from .bundle-to{display:block;font-size:20px!important;font-weight:500;margin-top:1px;margin-bottom:1px}.product-detail .right .quantity{width:unset}.product-detail .right .form-group label{display:block}.product-detail .right .form-group .radio{margin-right:10px}.product-detail .right .form-group .radio input[type=radio]{margin-left:0;position:static}.product-detail .right .form-group .radio .radio-view{display:none}.product-detail .thumb-list{left:15px;z-index:99;padding:0;overflow:hidden;margin-top:10px;position:relative}.product-detail .thumb-list .arrow{left:0;height:100%;z-index:1001;opacity:.5;margin-top:5px;cursor:pointer;position:absolute;line-height:13em;background:#dcdcdc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.product-detail .thumb-list .arrow.right{right:0;left:unset;line-height:13rem}.product-detail .thumb-list .thumb-frame{padding:1px;border:1px solid transparent}.product-detail .thumb-list .thumb-frame.active{border:1px solid #26a37c}.product-detail .thumb-list .small-card-container .thumb-frame>.product-image,.product-detail .thumb-list .thumb-frame>.bg-image,.small-card-container .product-detail .thumb-list .thumb-frame>.product-image{width:100%;height:110px;background-size:100% 100%;background-position-y:center}.product-detail .product-actions>div{display:inline-block}.product-detail .product-actions>div .add-to-cart-btn{float:left}.product-detail .product-actions>div .compare-icon,.product-detail .product-actions>div .wishlist-icon{height:46px;margin-left:0;padding-left:10px}.product-detail .product-actions>div .compare-icon i,.product-detail .product-actions>div .wishlist-icon i{display:table-cell;vertical-align:middle}.product-detail .product-actions>div .compare-icon{display:inline-table}.product-detail .product-actions>div .wishlist-icon{float:right}.product-detail #product-form,.product-detail .layouter{height:100%}.product-detail #product-form .form-container{height:100%;position:relative}.product-detail #product-form .form-container>.left{top:60px;padding:0;position:sticky}.product-detail #product-form .form-container>.left .product-image-group>div{margin:0;padding:0}.product-detail #product-form .form-container .right .swatch-container{margin-top:10px;display:block}.product-detail #product-form .form-container .right .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}.product-detail #product-form .form-container .right .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}.product-detail #product-form .form-container .right .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}.product-detail #product-form .form-container .right .swatch-container .swatch input:checked+img,.product-detail #product-form .form-container .right .swatch-container .swatch input:checked+span{border:1px solid #242424}.product-detail #product-form .form-container .right .swatch-container .swatch input{display:none}.product-detail #product-form .form-container .right .swatch-container .no-options{color:#fb3949}.product-detail .accordian.active .accordian-header{padding-bottom:0}.product-detail .accordian-content div,.product-detail .description{overflow:auto}.product-detail .full-description{font-size:14px}.product-detail .full-specifications tr td:first-child{width:100px}.product-detail select[disabled=disabled]{cursor:not-allowed;border-color:#dcdcdc;background-color:#dcdcdc}.store-meta-images{margin-top:20px}.store-meta-images img{width:100%;height:100%;max-height:300px}.related-products{margin-bottom:60px}.vc-small-screen{display:none!important}@media only screen and (max-width:1192px){.sticky-header,.vc-full-screen{display:block!important}.vc-small-screen{display:none!important}#main-category{display:block!important}.footer .footer-content .newsletter-subscription .newsletter-wrapper .social-icons{width:100%;padding:5px 0;text-align:center!important}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{width:100%;padding:10px 0;text-align:center}.footer .footer-content .footer-statics>div:not(:last-child){margin-bottom:30px}.slider-container{min-height:290px}}@media only screen and (max-width:992px){body.open-hamburger{color:#7f7f7f;opacity:.8;overflow:hidden}#webheader{position:fixed;background-color:#fff}#main-category,#webheader{display:none!important}#home-right-bar-container{position:relative;top:-48px}.sticky-header,.vc-full-screen{display:none!important}.vc-small-screen{display:block!important}.force-center{margin:0 auto!important}.main-content-wrapper{z-index:100;margin-bottom:25px;background-color:#fff}.main-content-wrapper .vc-header{top:0;margin:0;padding:0;width:100%;height:50px;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.main-content-wrapper .vc-header>div{display:none}.main-content-wrapper .vc-header>div.vc-small-screen{display:block}.main-content-wrapper .vc-header>div.vc-small-screen img{width:100%;height:100%;max-height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .hamburger-wrapper{display:inline-block;height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .hamburger-wrapper .hamburger{top:12px;font-size:24px;position:relative}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header{position:relative;z-index:2;display:table;text-align:right;height:50px}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header>a{display:table-cell;vertical-align:middle}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container,.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-wrapper{top:-32px;left:-12px;position:relative}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container .badge,.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-wrapper .badge{z-index:10;border-radius:50%;position:absolute;background:#26a37c}.main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container{left:4px;margin-right:10px}#top{display:none}.product-card-new{max-width:19rem}.product-card-new.grid-card .card-body .product-name{width:13rem}.product-card-new.grid-card .card-body .product-rating{display:none}.product-card-new.grid-card .card-body .add-to-cart-btn{padding:0;display:table}.carousel-products.with-recent-viewed .product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .btn-add-to-cart,.product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .carousel-products.with-recent-viewed .btn-add-to-cart,.product-card-new.grid-card .card-body .add-to-cart-btn .btn-add-to-cart .small-padding.btn-add-to-cart{padding:3px 14px!important}.product-card-new.grid-card .card-body .add-to-cart-btn~a{position:relative}.product-card-new.grid-card .card-body .add-to-cart-btn~a.compare-icon{right:0}.product-card-new.grid-card .card-body .add-to-cart-btn~a.wishlist-icon{padding:0;left:10px;max-width:25px}.product-card-new.grid-card #quick-view-btn-container{display:none}.advertisement-four-container .offers-ct-panel{padding:8px 0}.advertisement-four-container .offers-ct-panel a:first-child{padding-bottom:10px!important}.advertisement-three-container .bottom-container img,.advertisement-three-container .top-container img{padding:0;height:unset}.advertisement-three-container .second-panel{padding-top:10px}.advertisement-two-container a:nth-of-type(2){padding:15px 0 0}.category-with-custom-options{display:none}.category-with-custom-options.vc-small-screen{display:block}.category-with-custom-options.vc-small-screen .smart-category-container .col-12{padding:0}.category-with-custom-options.vc-small-screen .smart-category-container:not(:first-child){padding-top:20px}.footer .footer-content .newsletter-subscription{padding:10px 20px}.footer .footer-content .newsletter-subscription .newsletter-wrapper{margin:0;padding:0}.footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{width:200px}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter{text-align:left}.footer .footer-content .newsletter-subscription .newsletter-wrapper .subscribe-newsletter .subscriber-form-div{text-align:center}.footer .footer-content .footer-statics{padding:30px 50px}.footer .footer-content .footer-copy-right{font-size:14px}.popular-categories-container .popular-category-wrapper{padding:0}.popular-categories-container .popular-category-wrapper .card .category-image{height:100%}.popular-categories-container .popular-category-wrapper:last-child{padding-left:0}.slides-container .VueCarousel .VueCarousel-pagination button{width:5px!important;height:5px!important}.slides-container .VueCarousel .VueCarousel-pagination .VueCarousel-dot{padding:2px!important}.account-content .sidebar{display:none}.account-content .account-layout{padding:0}.account-content .account-layout.right{padding-right:20px!important;padding-left:20px!important}.account-content .account-layout .account-items-list.wishlist-container .product-card-new{width:calc(50% - 5px)}.account-content .account-layout .account-table-content #datagrid-filters>.search-filter{width:100%;max-width:100%;margin:0 0 10px}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters{width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters .control-group{width:100%;max-width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters .dropdown-container li{width:100%}.account-content .account-layout .account-table-content #datagrid-filters>.dropdown-filters:nth-of-type(2){margin-top:30px;margin-bottom:10px}.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters.per-page{margin-top:0;margin-bottom:10px;position:relative}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary{width:100%;font-size:17px}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary tbody tr td{width:50%!important}.account-content .account-layout .sale-container .tabs-content .totals .sale-summary tbody tr td:last-child{text-align:right}.account-content .account-layout .sale-container .order-box-container .box{width:100%;margin-bottom:20px}.account-content .account-layout .sale-container .order-box-container .box .box-title{padding-bottom:0}.account-content .account-layout .table table thead{display:none}.account-content .account-layout .table table tr{margin-bottom:20px;border:1px solid #ccc}.account-content .account-layout .table table tr td{width:100%;border-top:none;border-right:1px solid #ccc!important}.account-content .account-layout .table table tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block}.account-content .account-layout .table table tr td .action{display:inline-block}.account-content .account-layout .table table tr td:first-child{font-weight:700}.mini-cart-container{display:none}header .vc-small-screen .searchbar{padding-left:20px!important;padding-right:20px!important}header .vc-small-screen .searchbar .compare-btn,header .vc-small-screen .searchbar .wishlist-btn{display:none}header .vc-small-screen #search-form{background:transparent;width:100%}header .vc-small-screen #search-form .selectdiv{display:none}header .vc-small-screen #search-form .selectdiv+div input{width:calc(100% - 40px);border:1px solid #26a37c}.carousel-products.vc-full-screen{display:none}.carousel-products.vc-small-screen{display:block!important}.carousel-products+.recently-viewed{top:0;position:static}.reviews-container .review-wrapper,.reviews-container .review-wrapper:first-of-type,.reviews-container .review-wrapper:last-of-type,.reviews-container .review-wrapper:nth-last-of-type(2){padding:0}.reviews-container .review-wrapper:not(:last-child){margin-bottom:10px}.product-policy-wrapper{padding:0!important}.product-policy-wrapper:not(:last-child){margin-bottom:10px}.product-detail #product-form .form-container .left{top:0;position:relative;margin-bottom:20px}.product-detail #product-form .form-container .left .vc-small-product-image{width:100%}.product-detail .customer-rating>.row>div{margin-bottom:30px}.product-detail .arrow.left,.product-detail .arrow.right{display:none}.product-detail .thumb-list .small-card-container .thumb-frame>.product-image,.product-detail .thumb-list .thumb-frame>.bg-image,.small-card-container .product-detail .thumb-list .thumb-frame>.product-image{background-size:contain}.review-page-container>div{padding:0}.review-page-container>div:not(:last-child){position:relative;margin-bottom:60px}.customer-rating>.row>div:not(:last-child){margin-bottom:20px}.auth-content.form-container>.container{margin:0;width:100%}.auth-content.form-container>.container>div:first-child{padding:0}.auth-content.form-container>.container>div:first-child .body{padding:20px}.category-page-wrapper .layered-filter-wrapper{display:none}.category-page-wrapper .category-container{margin:0;margin-top:20px;padding-left:0!important;padding-right:0!important}.category-page-wrapper .category-container>div{padding:0 10px}.category-page-wrapper .category-container>div:first-child{padding:0 10px!important}.category-page-wrapper .category-container .filters-container{left:0;top:30px;padding:0;width:100%;z-index:9;position:fixed;padding-bottom:10px;background-color:#fff;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.21);box-shadow:0 2px 4px 0 rgba(0,0,0,.21)}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4{margin:0;padding:0;display:table;text-align:center}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 *{display:table-cell;vertical-align:middle}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 a{text-align:center;display:inline-block}.category-page-wrapper .category-container .filters-container .toolbar-wrapper>div.col-4 span{left:5px;position:relative}.nav-container{top:0;left:0;width:75%;opacity:1;z-index:9999;height:100vh;position:fixed;font-size:16px;overflow-y:scroll;-webkit-box-shadow:0 2px 8px 0;box-shadow:0 2px 8px 0;background-color:#fff}.nav-container .wrapper{position:relative}.nav-container .wrapper .category-title{width:100%;display:none;display:table;padding-left:10px;margin:13px 0}.nav-container .wrapper .category-title>i{font-size:26px;display:table-cell;vertical-align:middle}.nav-container .wrapper .category-title span{font-size:20px;display:table-cell;vertical-align:top}.nav-container .wrapper .category-title span i{float:left!important;margin:2px 2px 0 0!important}.nav-container .wrapper .greeting{top:0;width:100%;display:table;position:sticky;color:#111;background-color:#fff;border-bottom:1px solid #ccc}.nav-container .wrapper .greeting>i{font-size:26px;display:table-cell;vertical-align:middle}.nav-container .wrapper .greeting span{font-size:20px;display:table-cell;vertical-align:top}.nav-container .wrapper ul{font-weight:600;color:#111;border-top:1px solid #ccc}.nav-container .wrapper ul li{font-size:16px;padding:10px 0 10px 20px}.nav-container .wrapper ul li:hover{background-color:#ececec}.nav-container .wrapper ul li .category-logo,.nav-container .wrapper ul li .language-logo-wrapper{width:18px;height:18px;margin-right:5px;display:inline-block}.nav-container .wrapper ul li .rango-arrow-right{float:right;font-size:20px;padding-top:5px;padding-right:15px}.nav-container .wrapper ul li .nested-category{border-top:unset}.nav-container .wrapper ul li .nested-category li:last-child{padding-bottom:0}.nav-container .wrapper ul:first-of-type{border-top:unset}.nav-container .wrapper .category-wrapper li,.nav-container .wrapper .vc-customer-options li{font-size:14px}.nav-container .wrapper .category-wrapper li i.icon,.nav-container .wrapper .vc-customer-options li i.icon{speak:none;line-height:1;font-style:normal;font-weight:400;text-transform:none;font-variant:normal;-webkit-font-smoothing:antialiased;font-family:Webkul Rango!important;font-size:18px;padding-right:5px;display:contents}.nav-container .wrapper .category-wrapper li i.icon.profile:before,.nav-container .wrapper .vc-customer-options li i.icon.profile:before{content:"\E995"}.nav-container .wrapper .category-wrapper li i.icon.address:before,.nav-container .wrapper .vc-customer-options li i.icon.address:before{content:"\E949"}.nav-container .wrapper .category-wrapper li i.icon.reviews:before,.nav-container .wrapper .vc-customer-options li i.icon.reviews:before{content:"\E97D"}.nav-container .wrapper .category-wrapper li i.icon.wishlist:before,.nav-container .wrapper .vc-customer-options li i.icon.wishlist:before{content:"\E93E"}.nav-container .wrapper .category-wrapper li i.icon.compare:before,.nav-container .wrapper .vc-customer-options li i.icon.compare:before{content:"\E93B"}.nav-container .wrapper .category-wrapper li i.icon.orders:before,.nav-container .wrapper .vc-customer-options li i.icon.orders:before{content:"\E931"}.nav-container .wrapper .category-wrapper li i.icon.downloadables:before,.nav-container .wrapper .vc-customer-options li i.icon.downloadables:before{content:"\E926"}.nav-container .drawer-section{padding:15px}.nav-container .header.drawer-section{width:100%;display:table}.nav-container .header.drawer-section>*{display:table-cell;vertical-align:middle}.nav-container .header.drawer-section i{width:25px;padding-right:10px}.nav-container .layered-filter-wrapper{width:100%;display:block;padding-top:0;margin-bottom:0}.category-container .grid-card,.search-container .grid-card{width:45%}.category-container .grid-card:nth-child(odd),.search-container .grid-card:nth-child(odd){float:left}.category-container .grid-card:nth-child(2n),.search-container .grid-card:nth-child(2n){float:right}.cart-details.offset-1,.cart-details .order-summary-container.offset-1{margin-left:0;padding-left:0;padding-right:0}.cart-details .cart-details-header,.cart-details h1{padding:0}.cart-details h1{margin-bottom:20px}.cart-details .cart-header{display:none}.cart-details .cart-item-list>div{margin:0;padding:0}.cart-details .product-price .special-price,.cart-details .product-price span:first-child{font-size:18px}.cart-details .actions{margin-top:7px!important}.cart-details .continue-shopping,.cart-details .empty-cart-message{padding:0}.checkout-process{margin-left:0!important;padding-left:0!important;padding-right:0!important}.checkout-process>div,.checkout-process h1{padding:0}.checkout-process .accordian-header h3{margin-bottom:0!important}.checkout-process .billing-address{margin-bottom:20px}.address-holder>div{padding-right:0;padding-bottom:15px}.wishlist-container{width:100%!important;margin:0!important;padding:0!important}.wishlist-container .product-card-new{margin-left:0}.compare-products{padding:0!important}.compare-products .col,.compare-products .col-2{max-width:unset}.compare-icon,.wishlist-icon{margin-left:0}.image-search-result .searched-terms{margin-left:0;margin-top:20px}.image-search-result .searched-terms .term-list a{line-height:40px}#datagrid-filters.datagrid-filters{padding-top:20px}#sort-by.sorter select{top:2px;left:25px;padding:0 10px;position:absolute;display:inline-block}.slider-container{min-height:220px}}@media only screen and (max-width:768px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.modal-container{left:10%;max-width:80%;margin-left:0}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}.table{width:90%;margin-bottom:1rem;margin-top:68px;color:#212529;overflow-x:auto}.per-page{position:absolute;margin-top:66px;margin-right:-1px;margin-left:17px;width:151px}.filter-left{position:relative;margin-right:-6px!important}.dropdown-filters{margin-left:15px}.quantity button.btn-sm.btn-primary.apply-filter,button.btn.btn-sm.btn-primary.apply-filter{margin-top:10px;margin-left:-158px}.quick-view-btn-container span{left:24%;top:-24px;font-size:13px}.quick-view-in-list{display:none}.product-card-new{max-width:18rem}.slider-container{min-height:220px}}@media only screen and (max-width:420px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.slider-container{min-height:100px}.advertisement-four-container{min-height:992px}.advertisement-four-container .advertisement-container-block,.advertisement-four-container .offers-ct-panel{min-height:425px}}@media only screen and (max-width:320px){.sticky-header{display:none!important}#home-right-bar-container{position:unset;top:unset}.quick-view-in-list{display:none}.slider-container{min-height:100px}.advertisement-four-container{min-height:992px}.advertisement-four-container .advertisement-container-block,.advertisement-four-container .offers-ct-panel{min-height:425px}}body.rtl{text-align:right}.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:14px!important}body.rtl .order-summary-container{margin-left:0;margin-right:130px}body.rtl .velocity-divide-page .right{padding-left:0!important;padding-right:230px!important}body.rtl header #search-form #header-search-icon{float:right;border-radius:2px 0 0 2px}body.rtl header #search-form .btn-group select,body.rtl header #search-form .quantity select{border-left:0;border-right:1px solid #26a37c}body.rtl header #search-form .btn-group .selectdiv select,body.rtl header #search-form .quantity .selectdiv select{float:unset}body.rtl header #search-form .btn-group .selectdiv select~.select-icon-container,body.rtl header #search-form .quantity .selectdiv select~.select-icon-container{top:0;right:100px;position:absolute}body.rtl header #search-form .btn-group .selectdiv .select-icon,body.rtl header #search-form .quantity .selectdiv .select-icon{top:12px;left:8px}body.rtl header.sticky-header img{float:right}body.rtl header .mini-cart-container #mini-cart .badge{top:-8px;left:73%}body.rtl header .left-wrapper{float:left}body.rtl header .left-wrapper .compare-btn .badge-container .badge,body.rtl header .left-wrapper .wishlist-btn .badge-container .badge{top:-28px;left:-2px}body.rtl .main-content-wrapper .main-category{text-align:right}body.rtl .main-content-wrapper .main-category i{float:right;margin-left:10px}body.rtl .main-content-wrapper .vc-header>div.vc-small-screen .right-vc-header .badge-container{left:-4px}body.rtl .main-content-wrapper .vc-header .mini-cart-container #mini-cart .badge{top:-6px;left:90%}body.rtl .main-content-wrapper .vc-header .mini-cart-container #mini-cart .cart-text{left:24px;vertical-align:top}body.rtl .form-container .container .heading h2{float:right}body.rtl .form-container .container .heading a{float:left}body.rtl .sticker{left:unset;right:8px}body.rtl .subscriber-form-div{text-align:left}body.rtl .footer .footer-content .newsletter-subscription .newsletter-wrapper input.subscribe-field{left:-4px;position:relative}body.rtl #top #account .welcome-content{float:left}body.rtl #top #account .welcome-content i{text-align:left}body.rtl #top #account+.account-modal{width:100%!important;right:unset}body.rtl #top #account+.account-modal .modal-content{float:left}body.rtl #top .locale-icon~.select-icon-container{right:20px}body.rtl #cart-modal-content{left:0}body.rtl #cart-modal-content .small-card-container .rango-close{left:unset;right:-10px}body.rtl #cart-modal-content .small-card-container .card-total-price{float:left}body.rtl .category-list-container .sub-categories{left:-100%}body.rtl .category-list-container li a{padding:7px 15px 5px}body.rtl .category-list-container li ul.nested li a{padding-right:25px}body.rtl .filters-container .view-mode>div{padding-right:6px}body.rtl .filters-container .toolbar-wrapper>div label{margin-right:0;margin-left:10px}body.rtl .filter-attributes-content{margin-left:7px;margin-right:0}body.rtl .filter-attributes-item input[type=checkbox]+span{margin-right:10px}body.rtl .filter-attributes-item .filter-input{margin-right:0}body.rtl .product-card-new .card-body .cart-wish-wrap{margin-right:0!important}body.rtl .product-card-new .card-body .cart-wish-wrap .add-to-cart-btn{padding-left:35px!important}body.rtl .product-card-new .card-body .wishlist-icon{left:0;right:unset}body.rtl .product-card-new .card-body .product-name{width:unset}body.rtl .account-content .account-layout.right{width:calc(100% - 20px);padding-right:250px!important}body.rtl .account-content .account-layout .account-table-content .address-holder>div{padding-right:0;padding-left:15px}body.rtl .account-content .sidebar .customer-sidebar{border-left:1px solid #e5e5e5}body.rtl .account-content .sidebar .customer-sidebar .navigation li i.icon{padding-right:0;padding-left:5px}body.rtl .product-detail .right .info{margin-right:0}body.rtl .product-detail .right .info>h2,body.rtl .product-detail .right .info div{padding-right:0}body.rtl .product-detail .right .info .buynow{float:left;margin-right:10px}body.rtl .product-detail .thumb-list{left:0;margin-right:0}body.rtl .product-detail .wishlist-icon{padding-right:10px}body.rtl .zoomWindow{right:100%!important}body.rtl .modal-footer>:not(:last-child){margin-left:.25rem}body.rtl .compare-products .wishlist-icon{left:52px;right:unset}body.rtl .compare-products .material-icons.cross{left:20px;right:unset}body.rtl #alert-container{right:unset;left:15px}body.rtl .mini-cart-content~.down-arrow-container .rango-arrow-down{left:-15px}body.rtl .alert-dismissible .close{left:-8px}body.rtl .booking-information .book-slots .control-group-container .form-group:not(.quantity).date:after{left:40px;right:unset}body.rtl .full-content-wrapper>.container-fluid>.row.pl-26{padding-right:26%!important}body.rtl .image-search-container{left:45px;right:unset}body.rtl .product-policy-container .card .policy .left{margin-left:10px}body.rtl .account-content .account-layout .account-table-content #datagrid-filters .filter-left .icon-wrapper .search-btn{float:left;right:unset;left:5px}body.rtl .account-content .account-layout .account-table-content #datagrid-filters .per-page{left:0;right:unset}body.rtl .advertisement-three-container .second-panel{padding-right:30px}body.rtl .advertisement-two-container .row{padding:0!important}body.rtl .advertisement-two-container .row .pr0{padding-right:15px!important}body.rtl .downloadable-container .link-list ul li a{float:left;margin-top:3px}body.rtl .text-right{text-align:left!important}body.rtl .text-left{text-align:right!important}body.rtl .pr0{padding-left:0!important;padding-right:15px!important}body.rtl .pl0{padding-right:0!important}body.rtl .pl10{padding-right:10px!important}body.rtl .rango-arrow-right:before{content:"\E907"}body.rtl .styled-select+.select-icon-container .select-icon{left:6px;right:unset}body.rtl .ml15{margin-right:15px!important}body.rtl .pl30{padding-right:30px}body.rtl .ml-5{margin-right:3rem!important}.product-detail .right .options .buttons body.rtl :not(:last-child),.product-detail .right .options body.rtl .quantity>label,body.rtl .mr15,body.rtl .product-detail .right .options .buttons :not(:last-child),body.rtl .product-detail .right .options .quantity>label{margin-left:15px!important}body.rtl .ml5{margin-right:5px}@media only screen and (max-width:992px){body.rtl .order-summary-container{margin-right:0}body.rtl .nav-container ul li{padding:10px 20px 10px 0}body.rtl .nav-container ul li .rango-arrow-right{float:left;padding-left:40px}body.rtl .nav-container .wrapper .vc-customer-options li i.icon{float:right;padding-left:5px}body.rtl .account-content .account-layout.right,body.rtl .full-content-wrapper>.container-fluid>.row.pl-26{padding-right:20px!important}body.rtl .velocity-divide-page .left{right:35px;width:150px;top:4px}}@media only screen and (max-width:425px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:12px!important}}@media only screen and (max-width:375px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:10px!important}body.rtl .velocity-divide-page .right{padding:0 20px!important}}@media only screen and (max-width:320px){.account-content .account-layout .bottom-toolbar .pagination body.rtl .page-item,.product-detail body.rtl .right,body.rtl .account-content .account-layout .bottom-toolbar .pagination .page-item,body.rtl .fs16,body.rtl .product-detail .right{font-size:8px!important}}body.rtl .payment-methods .pl40{padding-right:40px!important;padding-left:0!important}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format("woff2")}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconsoutlined/v14/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2) format("woff2")}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconsround/v14/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmP.woff2) format("woff2")}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconssharp/v15/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvR.woff2) format("woff2")}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/materialiconstwotone/v13/hESh6WRmNCxEqUmNyh3JDeGxjVVyMg4tHGctNCu0.woff2) format("woff2")}.material-icons{font-family:Material Icons;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons,.material-icons-outlined{max-width:30px;overflow:hidden;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}.material-icons-outlined{font-family:Material Icons Outlined;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-round{font-family:Material Icons Round;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-round,.material-icons-sharp{font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}.material-icons-sharp{font-family:Material Icons Sharp;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}*{margin:0;padding:0;font-family:Source Sans Pro,sans-serif}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}::-webkit-scrollbar{width:3px;height:5px}::-webkit-scrollbar-track{background:#d8d8d8}::-webkit-scrollbar-thumb{background:#666}::-webkit-input-placeholder{font-family:Source Sans Pro,sans-serif}input[type=checkbox]{width:24px;height:15px;margin-right:10px}.form-control:focus{-webkit-box-shadow:0 0 8px 1px rgba(105,221,157,.25);box-shadow:0 0 8px 1px rgba(105,221,157,.25)}button,input,optgroup,select,textarea{font-family:Source Sans Pro,sans-serif;color:rgba(0,0,0,.83)}textarea{resize:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}body{padding:0;margin:0;font-weight:400;color:rgba(0,0,0,.83);font-size:12px;line-height:20px;width:100%;background:#fff;font-family:Source Sans Pro,sans-serif}.btn:hover,.quantity button:hover,.quantity input:hover{text-decoration:none}.btn:active:hover,.btn:focus,.quantity button:active:hover,.quantity button:focus,.quantity input:active:hover,.quantity input:focus{outline:none;outline-offset:0}.btn-link{color:rgba(0,0,0,.83);padding:6px 5px}.btn-link:focus,.btn-link:hover{color:rgba(0,0,0,.83);text-decoration:none}#top{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.24);box-shadow:0 0 0 0 rgba(0,0,0,.24);margin:0;min-height:32px;color:rgba(0,0,0,.83);border-bottom:1px solid #ccc}#top .btn,#top .quantity button,#top .quantity input,.quantity #top button,.quantity #top input{font-family:Source Sans Pro,sans-serif;font-size:14px;letter-spacing:0;text-align:center;border-radius:0;text-decoration:none}#top .btn:hover,#top .quantity button:hover,#top .quantity input:hover,.quantity #top button:hover,.quantity #top input:hover{text-decoration:none}#top .btn:active:hover,#top .btn:focus,#top .quantity button:active:hover,#top .quantity button:focus,#top .quantity input:active:hover,#top .quantity input:focus,.quantity #top button:active:hover,.quantity #top button:focus,.quantity #top input:active:hover,.quantity #top input:focus{outline:none;outline-offset:0}#top .btn-normal{background:#21a179;border-color:#269c77;color:#fff;font-weight:600}#top .btn-normal:active:focus,#top .btn-normal:active:hover,#top .btn-normal:hover{background:#fff;border-color:#21a179;color:#21a179}#top .btn-link{color:rgba(0,0,0,.83)}#top .dropdown-menu-large{min-width:250px;left:-100px}#top .customer-name{font-size:16px;font-weight:600;padding:0 10px;color:rgba(0,0,0,.83)}#top #account{font-size:14px}#top #account .select-icon{top:0;left:0;padding-left:5px}#top #account .welcome-content{display:table;min-width:150px;cursor:pointer;float:right;text-align:right;padding-top:5px}#top #account .welcome-content *{display:table-cell;vertical-align:middle}#top #account+.account-modal{top:40px;right:10px;z-index:101;height:-webkit-max-content;height:-moz-max-content;height:max-content;width:290px!important;position:absolute!important}#top #account+.account-modal .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity button,#top #account+.account-modal .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button.btn,#top #account+.account-modal .account-content .account-layout .bottom-toolbar .pagination .page-item,#top #account+.account-modal .cart-details .continue-shopping-btn,#top #account+.account-modal .quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container button,#top #account+.account-modal .theme-btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container #top #account+.account-modal button.btn,.account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container .quantity #top #account+.account-modal button,.account-content .account-layout .bottom-toolbar .pagination #top #account+.account-modal .page-item,.cart-details #top #account+.account-modal .continue-shopping-btn,.quantity .account-content .account-layout .account-table-content #datagrid-filters .dropdown-filters .dropdown-container #top #account+.account-modal button{padding:.5rem .9rem}#top #account+.account-modal .modal-footer{-webkit-box-pack:unset;-ms-flex-pack:unset;justify-content:unset}#top #account+.account-modal .modal-content{top:0;padding:0}#top #account+.account-modal .modal-content ul li:hover{background-color:#ececec}#top #account+.account-modal .modal-content ul li a{padding:10px 20px}#top #account+.account-modal .modal-content ul li:last-child{margin-bottom:5px}#top>div:last-child{height:32px}#top>div .default{padding:5px;font-size:14px}#top .locale-icon{width:20px;display:inline-block}#top .locale-icon img{width:100%}#top .locale-switcher{padding-left:5px;position:relative;padding-right:15px}#top .dropdown{margin-right:15px}#top .dropdown .select-icon-container .select-icon{right:0}.dropdown-menu{border-top:3px solid #269c77;border-radius:0;background:#fff;-webkit-box-shadow:11px 10px 17px 0 rgba(0,0,0,.21);box-shadow:11px 10px 17px 0 rgba(0,0,0,.21)}.dropdown-menu li a .dropdown-menu li a:focus,.dropdown-menu li a:focus,.dropdown-menu li a:hover{background:#21a179;color:#fff}.no-padding,.product-detail .right h3{padding:0!important}.btn-normal{background:#21a179;border-color:#269c77;color:#fff;font-weight:600;border-radius:0}.btn-normal:active:focus,.btn-normal:active:hover,.btn-normal:hover{background:#fff;border-color:#21a179;color:#21a179}.btn-secondary{background:#fff;border-color:#fff;color:#21a179}.btn-secondary:active:focus,.btn-secondary:active:hover,.btn-secondary:focus,.btn-secondary:hover{background:#21a179;border-color:#21a179}.btn-danger{color:#fff}.btn-danger,.btn-danger:active:focus,.btn-danger:active:hover,.btn-danger:focus,.btn-danger:hover{background:#f05153;border-color:#f05153}header .logo{height:50px;padding-left:10px}header #search-form{height:40px;margin:5px 0;background:#fff}header #search-form *{height:100%}header #search-form .btn-group,header #search-form .quantity{max-width:550px}header #search-form .btn-group .selectdiv,header #search-form .quantity .selectdiv{width:210px}header #search-form .btn-group .selectdiv .select-icon,header #search-form .quantity .selectdiv .select-icon{top:-30px;right:8px;z-index:10;font-size:18px;background-color:#fff;height:20px}header #search-form .btn-group select,header #search-form .quantity select{width:100%;height:100%;cursor:pointer;border-radius:2px 0 0 2px;border:1px solid #26a37c;border-right:0;font-family:Source Sans Pro,sans-serif;-webkit-appearance:none;-moz-appearance:none;appearance:none}header #search-form .btn-group select::-ms-expand,header #search-form .quantity select::-ms-expand{display:none}header #search-form input{border-radius:0;height:100%;font-size:14px;padding:0 10px;line-height:20px;letter-spacing:0;border:1px solid #26a37c;border-left:1px solid #ccc}.quantity header #search-form button:hover,.quantity header #search-form input:hover,header #search-form .btn:hover,header #search-form .quantity button:hover,header #search-form .quantity input:hover{text-decoration:none}.quantity header #search-form button:active:hover,.quantity header #search-form button:focus,.quantity header #search-form input:active:hover,.quantity header #search-form input:focus,header #search-form .btn:active:hover,header #search-form .btn:focus,header #search-form .quantity button:active:hover,header #search-form .quantity button:focus,header #search-form .quantity input:active:hover,header #search-form .quantity input:focus{outline:none;outline-offset:0}header #search-form #header-search-icon{min-width:40px;border-radius:0 2px 2px 0;background-color:#26a37c}header #search-form #header-search-icon i{color:#fff}header .mini-cart-container{height:50px;padding:5px 17px;display:inline-block}header .mini-cart-container #mini-cart .mini-cart-content{font-size:16px;font-weight:600;text-align:right;margin-right:7px;letter-spacing:0;position:relative;color:rgba(0,0,0,.83);display:inline-block}header .mini-cart-container #mini-cart .mini-cart-content i+span.cart-text{padding-left:0;vertical-align:text-bottom}header .mini-cart-container #mini-cart .mini-cart-content .cart-text{padding-left:5px}header .mini-cart-container #mini-cart .mini-cart-content+.down-arrow-container .rango-arrow-down{top:8px}header .left-wrapper{float:right}header .left-wrapper .compare-btn,header .left-wrapper .wishlist-btn{height:50px;font-size:18px;font-weight:600;padding:10px 16px 6px}header .left-wrapper .compare-btn i,header .left-wrapper .wishlist-btn i{margin-right:5px;vertical-align:middle}header .left-wrapper .compare-btn .badge-container,header .left-wrapper .wishlist-btn .badge-container{position:relative;display:inline-block}header .left-wrapper .compare-btn .badge-container .badge,header .left-wrapper .wishlist-btn .badge-container .badge{border-radius:50%;top:-23px;left:-15px;padding:4px;min-width:20px;position:absolute;color:hsla(0,0%,100%,.83);background:#21a179}header .left-wrapper .compare-btn span,header .left-wrapper .wishlist-btn span{top:2px;position:relative}header .dropdown-menu-large{min-width:280px;left:-180px}header .dropdown-menu-large .dropdown-content{width:100%;max-height:300px;overflow-y:auto}header .dropdown-menu-large .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px}header .dropdown-menu-large .dropdown-content .item .item-image{position:relative}header .dropdown-menu-large .dropdown-content .item .item-image .material-icons{position:absolute;left:-6px;top:-6px;font-size:16px;cursor:pointer}header .dropdown-menu-large .dropdown-content .item .item-image .thumbnail{width:75px;height:75px;margin:0;border-radius:0;border:1px solid #ccc}header .dropdown-menu-large .dropdown-content .item .item-name{font-weight:600;font-size:18px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-content .item .item-details{padding:0 10px;height:auto}header .dropdown-menu-large .dropdown-content .item .item-details .item-options{font-family:Source Sans Pro,sans-serif;font-size:13px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price{padding:5px 0;display:inline-block}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price .item-qty{font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:left}header .dropdown-menu-large .dropdown-content .item .item-details .item-qty-price .item-price{font-weight:600;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:right}header .dropdown-menu-large .dropdown-header{padding:10px 10px 5px;border-top:1px solid #ccc}header .dropdown-menu-large .dropdown-header .sub-total-text{font-weight:600;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-header .cart-sub-total{font-weight:700;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;text-align:right}header .dropdown-menu-large .dropdown-footer{padding:10px 10px 0;border-top:1px solid #ccc;font-weight:700;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0}header .dropdown-menu-large .dropdown-footer .cart-link{text-align:left}header .dropdown-menu-large .dropdown-footer .cart-link a{vertical-align:middle}header .dropdown-menu-large .dropdown-footer .checkout-link{text-align:right}#nav-menu{margin:0;-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.24);box-shadow:0 0 0 0 rgba(0,0,0,.24);background-color:#fff}#nav-menu .navbar{margin:0;font-family:SourceSansPro-Semibold;font-size:16px;color:rgba(0,0,0,.83);letter-spacing:0;cursor:pointer;min-height:40px;position:relative}#nav-menu .navbar .navbar-header{width:100%;display:inline-block}#nav-menu .navbar .navbar-header .main-category{width:100%;overflow:hidden;position:relative;display:inline-block;padding:5px 5px 5px 35px}#nav-menu .navbar .navbar-header .main-category .material-icons{position:absolute;left:0;top:2px;font-size:28px}#nav-menu .navbar .category-dropdown{position:absolute;top:40px;background:#fff;left:0;width:100%;height:525px}#nav-menu .navbar .category-dropdown li.category-list{width:100%;display:inline-block;background:#fff;position:relative}#nav-menu .navbar .category-dropdown li.category-list a{padding:10px 0;position:relative;font-size:14px;color:rgba(0,0,0,.83);letter-spacing:0;font-weight:600;display:block}#nav-menu .navbar .category-dropdown li.category-list a .material-icons{position:absolute;right:0;top:8px}#nav-menu .navbar .category-dropdown li.category-list a:hover{color:#28557b;text-decoration:none;background-color:#f7f7f9}#nav-menu .navbar .category-dropdown li.category-list .child-container{position:absolute;top:0;background-color:#ccc;left:283px;width:250px;height:350px}#nav-menu .secondary-navbar{background-color:#4d7ea8;min-height:40px;padding:5px;vertical-align:middle;text-align:left;margin:0;list-style:none;height:auto;display:inline-block;width:100%}#nav-menu .secondary-navbar li{float:left}#nav-menu .secondary-navbar li a{display:block;cursor:pointer;font-size:16px;font-weight:600;letter-spacing:0;position:relative;color:#fff;text-decoration:none;padding:5px 20px 5px 5px}.viewed-products .viewed-products-listing{border:1px solid #fff;background-color:#f6f6f6}.viewed-products .viewed-products-listing .product-description,.viewed-products .viewed-products-listing .product-image{display:inline-block}.viewed-products .viewed-products-listing .product-description div{padding-top:2px}.customer-reviews .first-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.customer-reviews .second-row{width:100%;display:inline-block}.customer-reviews .second-row .reviews-listing{background:#fff;padding-right:10px;-webkit-box-shadow:0 4px 17px 0 rgba(0,0,0,.11);box-shadow:0 4px 17px 0 rgba(0,0,0,.11)}.customer-reviews .second-row .review-grid{display:grid;width:345px;height:262px;padding-top:40px;padding-left:10px;padding-right:10px}.categories-grid-customizable .category-grid{padding-right:5px;padding-left:5px;padding-bottom:10px}.categories-grid-customizable .category-grid .category-image{border:1px solid red}.categories-grid-customizable .category-grid .category-details{border:1px solid blue}.categories-grid-customizable .category-grid .category-details h3{color:#fff;text-align:center}.categories-grid-customizable .category-grid .category-details li{color:#fff;text-align:center;list-style-type:none}.product-policy{padding:30px 0 50px;border:1px solid maroon;text-align:center}.popular-products{height:auto;width:100%;padding-right:10px}.popular-products .second-row .popular-products-listing{border:1px solid red}.popular-products .second-row .popular-products-listing .product-buttons .add-to-cart-button .btn-primary{border:#26a37c!important;border-radius:0}.popular-products .second-row .popular-products-listing .product-buttons .add-to-cart-button .addtocart{text-transform:uppercase;background-color:#26a37c}.customer-name{display:table-cell;height:54px;width:56px;text-align:center;vertical-align:middle;border-radius:50%;background:#21a179;color:#fff;padding:16px;font:18px josefin sans,arial}.spacing{margin:5px 0}i.within-circle{display:inline-block;border-radius:50%;-webkit-box-shadow:0 0 2px #888;box-shadow:0 0 2px #888;padding:12px;margin:15px 0;width:50px;height:50px}.center_div{margin:0 auto;width:80%}.form-style{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0}.label-style{display:inline-block!important;max-width:100%!important;margin-bottom:5px!important;font-weight:100!important;font-size:16px!important}.btn-white{color:#fff;height:36px;width:133px}.w3-card-2{width:133px}.w3-card-2,.w3-card-login{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);float:right;height:36px}.w3-card-login{width:71px}.btn-new-customer-login{color:#26a37c!important;font-size:16px;padding:11px;text-decoration:none!important}.btn-dark-green{color:#fff;background-color:#26a37c;border-color:#26a37c;height:36px;border-radius:0!important}.login-text{height:65px;width:575px;border:1px #e5e5e5;margin:0 auto}.row:after,.row:before{display:none!important}.image-wrapper{margin-bottom:20px;margin-top:10px;display:inline-block;width:100%}.image-wrapper .image-item{width:150px;height:150px;margin-right:20px;background:#f8f9fa;border-radius:3px;display:inline-block;position:relative;background-image:url("../images/placeholder-icon.svg");background-repeat:no-repeat;background-position:50%;margin-bottom:20px;float:left;background-size:75%}.image-wrapper .image-item img.preview{width:100%;height:100%}.image-wrapper .image-item input{display:none}.image-wrapper .image-item .remove-image{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.08)),to(rgba(0,0,0,.24)));background-image:linear-gradient(-180deg,rgba(0,0,0,.08),rgba(0,0,0,.24));border-radius:0 0 4px 4px;position:absolute;bottom:0;width:100%;padding:10px;text-align:center;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.24);margin-right:20px;cursor:pointer}.image-wrapper .image-item:hover .remove-image{display:block}.image-wrapper .image-item.has-image{background-image:none}.btn-primary{background-color:#26a37c!important;border-color:#26a37c!important} \ No newline at end of file diff --git a/packages/Webkul/Velocity/publishable/assets/js/velocity-core.js b/packages/Webkul/Velocity/publishable/assets/js/velocity-core.js index 9466c7aec..b47e494d4 100644 --- a/packages/Webkul/Velocity/publishable/assets/js/velocity-core.js +++ b/packages/Webkul/Velocity/publishable/assets/js/velocity-core.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}({0:function(t,e,n){n("ozob"),n("EH7/"),t.exports=n("MT9B")},"162o":function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n("mypn"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n("DuR2"))},"21It":function(t,e,n){"use strict";var r=n("FtD3");t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},"5VQ+":function(t,e,n){"use strict";var r=n("cGG2");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},"7GwW":function(t,e,n){"use strict";var r=n("cGG2"),i=n("21It"),o=n("p1b6"),a=n("DQCr"),s=n("Oi+a"),c=n("oJlt"),l=n("GHBc"),u=n("FtD3");t.exports=function(t){return new Promise(function(e,n){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(h+":"+v)}var m=s(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),a(m,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:t,request:d};i(e,n,o),d=null}},d.onabort=function(){d&&(n(u("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(u("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(u(e,t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=(t.withCredentials||l(m))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;g&&(p[t.xsrfHeaderName]=g)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),r.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),n(t),d=null)}),f||(f=null),d.send(f)})}},"7t+N":function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,c=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,u=o.indexOf,f={},p=f.toString,d=f.hasOwnProperty,h=d.toString,v=h.call(Object),m={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function C(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?f[p.call(t)]||"object":typeof t}var T=function(t,e){return new T.fn.init(t,e)};function $(t){var e=!!t&&"length"in t&&t.length,n=C(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}T.fn=T.prototype={jquery:"3.6.0",constructor:T,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=T.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return T.each(this,t)},map:function(t){return this.pushStack(T.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(T.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+P+")"+P+"*"),z=new RegExp(P+"|>"),V=new RegExp(H),G=new RegExp("^"+M+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},at=wt(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{j.apply(O=L.call(x.childNodes),x.childNodes),O[x.childNodes.length].nodeType}catch(t){j={apply:O.length?function(t,e){D.apply(t,L.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,l,u,f,h,g,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&(p(e),e=e||d,v)){if(11!==x&&(f=Z.exec(t)))if(o=f[1]){if(9===x){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(f[2])return j.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!A[t+" "]&&(!m||!m.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===x&&(z.test(t)||W.test(t))){for((y=tt.test(t)&>(e.parentNode)||e)===e&&n.scope||((u=e.getAttribute("id"))?u=u.replace(rt,it):e.setAttribute("id",u=w)),s=(h=a(t)).length;s--;)h[s]=(u?"#"+u:":scope")+" "+bt(h[s]);g=h.join(",")}try{return j.apply(r,y.querySelectorAll(g)),r}catch(e){A(t,!0)}finally{u===w&&e.removeAttribute("id")}}}return c(t.replace(B,"$1"),e,r,i)}function ct(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[w]=!0,t}function ut(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function pt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ht(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function vt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return lt(function(e){return e=+e,lt(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!J.test(e||n&&n.nodeName||"HTML")},p=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:x;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,v=!o(d),x!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ut(function(t){return h.appendChild(t).appendChild(d.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length}),n.attributes=ut(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=ut(function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(d.getElementsByClassName),n.getById=ut(function(t){return h.appendChild(t).id=w,!d.getElementsByName||!d.getElementsByName(w).length}),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&v)return e.getElementsByClassName(t)},g=[],m=[],(n.qsa=Y.test(d.querySelectorAll))&&(ut(function(t){var e;h.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+R+")"),t.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(e=d.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),ut(function(t){t.innerHTML="";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Y.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ut(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),e=Y.test(h.compareDocumentPosition),b=e||Y.test(h.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==d||t.ownerDocument==x&&b(x,t)?-1:e==d||e.ownerDocument==x&&b(x,e)?1:u?I(u,t)-I(u,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==d?-1:e==d?1:i?-1:o?1:u?I(u,t)-I(u,e):0;if(i===o)return pt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pt(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&v&&!A[e+" "]&&(!g||!g.test(e))&&(!m||!m.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){A(e,!0)}return st(e,d,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=d&&p(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=d&&p(t);var i=r.attrHandle[e.toLowerCase()],o=i&&E.call(r.attrHandle,e.toLowerCase())?i(t,e,!v):void 0;return void 0!==o?o:n.attributes||!v?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(S),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return u=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:lt,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=$[t+" "];return e||(e=new RegExp("(^|"+P+")"+t+"("+P+"|$)"))&&$(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,c){var l,u,f,p,d,h,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!c&&!s,b=!1;if(m){if(o){for(;v;){for(p=e;p=p[v];)if(s?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(d=(l=(u=(f=(p=m)[w]||(p[w]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===C&&l[1])&&l[2],p=d&&m.childNodes[d];p=++d&&p&&p[v]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===e){u[t]=[C,d,b];break}}else if(y&&(b=d=(l=(u=(f=(p=e)[w]||(p[w]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===C&&l[1]),!1===b)for(;(p=++d&&p&&p[v]||(b=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++b||(y&&((u=(f=p[w]||(p[w]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]=[C,b]),p!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt(function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=I(t,o[a])]=!(n[r]=o[a])}):function(t){return i(t,0,n)}):i}},pseudos:{not:lt(function(t){var e=[],n=[],r=s(t.replace(B,"$1"));return r[w]?lt(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:lt(function(t){return function(e){return st(t,e).length>0}}),contains:lt(function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}}),lang:lt(function(t){return G.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:vt(!1),disabled:vt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return Q.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:mt(function(){return[0]}),last:mt(function(t,e){return[e-1]}),eq:mt(function(t,e,n){return[n<0?n+e:n]}),even:mt(function(t,e){for(var n=0;ne?e:n;--r>=0;)t.push(r);return t}),gt:mt(function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function Ct(t,e,n,r,i){for(var o,a=[],s=0,c=t.length,l=null!=e;s-1&&(o[l]=!(a[l]=f))}}else g=Ct(g===a?g.splice(h,g.length):g),i?i(null,a,g,c):j.apply(a,g)})}function $t(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],c=a?1:0,u=wt(function(t){return t===e},s,!0),f=wt(function(t){return I(e,t)>-1},s,!0),p=[function(t,n,r){var i=!a&&(r||n!==l)||((e=n).nodeType?u(t,n,r):f(t,n,r));return e=null,i}];c1&&xt(p),c>1&&bt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(B,"$1"),n,c0,i=t.length>0,o=function(o,a,s,c,u){var f,h,m,g=0,y="0",b=o&&[],w=[],x=l,T=o||i&&r.find.TAG("*",u),$=C+=null==x?1:Math.random()||.1,_=T.length;for(u&&(l=a==d||a||u);y!==_&&null!=(f=T[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!v);m=t[h++];)if(m(f,a||d,s)){c.push(f);break}u&&(C=$)}n&&((f=!m&&f)&&g--,o&&b.push(f))}if(g+=y,n&&y!==g){for(h=0;m=e[h++];)m(b,w,a,s);if(o){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=N.call(c));w=Ct(w)}j.apply(c,w),u&&!o&&w.length>0&&g+e.length>1&&st.uniqueSort(c)}return u&&(C=$,l=x),b};return n?lt(o):o}(o,i))).selector=t}return s},c=st.select=function(t,e,n,i){var o,c,l,u,f,p="function"==typeof t&&t,d=!i&&a(t=p.selector||t);if(n=n||[],1===d.length){if((c=d[0]=d[0].slice(0)).length>2&&"ID"===(l=c[0]).type&&9===e.nodeType&&v&&r.relative[c[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=X.needsContext.test(t)?0:c.length;o--&&(l=c[o],!r.relative[u=l.type]);)if((f=r.find[u])&&(i=f(l.matches[0].replace(et,nt),tt.test(c[0].type)&>(e.parentNode)||e))){if(c.splice(o,1),!(t=i.length&&bt(c)))return j.apply(n,i),n;break}}return(p||s(t,d))(i,e,!v,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!f,p(),n.sortDetached=ut(function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))}),ut(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ft("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&&ut(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ft("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),ut(function(t){return null==t.getAttribute("disabled")})||ft(R,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),st}(n);T.find=_,T.expr=_.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=_.uniqueSort,T.text=_.getText,T.isXMLDoc=_.isXML,T.contains=_.contains,T.escapeSelector=_.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&T(t).is(n))break;r.push(t)}return r},A=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},S=T.expr.match.needsContext;function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(t,e,n){return g(e)?T.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?T.grep(t,function(t){return t===e!==n}):"string"!=typeof e?T.grep(t,function(t){return u.call(e,t)>-1!==n}):T.filter(e,t,n)}T.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?T.find.matchesSelector(r,t)?[r]:[]:T.find.matches(t,T.grep(e,function(t){return 1===t.nodeType}))},T.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(T(t).filter(function(){for(e=0;e1?T.uniqueSort(n):n},filter:function(t){return this.pushStack(N(this,t||[],!1))},not:function(t){return this.pushStack(N(this,t||[],!0))},is:function(t){return!!N(this,"string"==typeof t&&S.test(t)?T(t):t||[],!1).length}});var D,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||D,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:j.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof T?e[0]:e,T.merge(this,T.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),O.test(r[1])&&T.isPlainObject(e))for(r in e)g(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,D=T(b);var L=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var e=T(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&T.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?u.call(T(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(E(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},function(t,e){T.fn[t]=function(n,r){var i=T.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(I[t]||T.uniqueSort(i),L.test(t)&&i.reverse()),this.pushStack(i)}});var P=/[^\x20\t\r\n\f]+/g;function M(t){return t}function F(t){throw t}function H(t,e,n,r){var i;try{t&&g(i=t.promise)?i.call(t).done(e).fail(n):t&&g(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return T.each(t.match(P)||[],function(t,n){e[n]=!0}),e}(t):T.extend({},t);var e,n,r,i,o=[],a=[],s=-1,c=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},T.extend({Deferred:function(t){var e=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return T.Deferred(function(n){T.each(e,function(e,r){var i=g(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){var o=0;function a(t,e,r,i){return function(){var s=this,c=arguments,l=function(){var n,l;if(!(t=o&&(r!==F&&(s=void 0,c=[n]),e.rejectWith(s,c))}};t?u():(T.Deferred.getStackHook&&(u.stackTrace=T.Deferred.getStackHook()),n.setTimeout(u))}}return T.Deferred(function(n){e[0][3].add(a(0,n,g(i)?i:M,n.notifyWith)),e[1][3].add(a(0,n,g(t)?t:M)),e[2][3].add(a(0,n,g(r)?r:F))}).promise()},promise:function(t){return null!=t?T.extend(t,i):i}},o={};return T.each(e,function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=T.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(H(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],a(n),o.reject);return o.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&q.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},T.readyException=function(t){n.setTimeout(function(){throw t})};var B=T.Deferred();function U(){b.removeEventListener("DOMContentLoaded",U),n.removeEventListener("load",U),T.ready()}T.fn.ready=function(t){return B.then(t).catch(function(t){T.readyException(t)}),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||B.resolveWith(b,[T]))}}),T.ready.then=B.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(T.ready):(b.addEventListener("DOMContentLoaded",U),n.addEventListener("load",U));var W=function(t,e,n,r,i,o,a){var s=0,c=t.length,l=null==n;if("object"===C(n))for(s in i=!0,n)W(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(e.call(t,r),e=null):(l=e,e=function(t,e,n){return l.call(T(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){Y.remove(this,t)})}}),T.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=T.queue(t,e),r=n.length,i=n.shift(),o=T._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){T.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:T.Callbacks("once memory").add(function(){Q.remove(t,[e+"queue",n])})})}}),T.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;dt=b.createDocumentFragment().appendChild(b.createElement("div")),(ht=b.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),dt.appendChild(ht),m.checkClone=dt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.innerHTML="",m.noCloneChecked=!!dt.cloneNode(!0).lastChild.defaultValue,dt.innerHTML="",m.option=!!dt.lastChild;var yt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function bt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?T.merge([t],n):n}function wt(t,e){for(var n=0,r=t.length;n",""]);var xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,a,s,c,l,u,f=e.createDocumentFragment(),p=[],d=0,h=t.length;d-1)i&&i.push(o);else if(l=at(o),a=bt(f.appendChild(o),"script"),l&&wt(a),n)for(u=0;o=a[u++];)gt.test(o.type||"")&&n.push(o);return f}var Tt=/^([^.]*)(?:\.(.+)|)/;function $t(){return!0}function _t(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)At(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=_t;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return T().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),t.each(function(){T.event.add(this,e,i,r,n)})}function St(t,e,n){n?(Q.set(t,e,!1),T.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(T.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&T.event.add(t,e,$t)}T.event={global:{},add:function(t,e,n,r,i){var o,a,s,c,l,u,f,p,d,h,v,m=Q.get(t);if(J(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(ot,i),n.guid||(n.guid=T.guid++),(c=m.events)||(c=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;l--;)d=v=(s=Tt.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},u=T.extend({type:d,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=c[d])||((p=c[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,u):p.push(u),T.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,c,l,u,f,p,d,h,v,m=Q.hasData(t)&&Q.get(t);if(m&&(c=m.events)){for(l=(e=(e||"").match(P)||[""]).length;l--;)if(d=v=(s=Tt.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=T.event.special[d]||{},p=c[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)u=p[o],!i&&v!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(p.splice(o,1),u.selector&&p.delegateCount--,f.remove&&f.remove.call(t,u));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,m.handle)||T.removeEvent(t,d,m.handle),delete c[d])}else for(d in c)T.event.remove(t,d+e[l],n,r,!0);T.isEmptyObject(c)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),c=T.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[c.type]||[],u=T.event.special[c.type]||{};for(s[0]=c,e=1;e=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:T.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,c\s*$/g;function Dt(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&T(t).children("tbody")[0]||t}function jt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Lt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function It(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(i in Q.remove(e,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!m.checkClone&&Ot.test(h))return t.each(function(i){var o=t.eq(i);v&&(e[0]=h.call(this,i,o.html())),Rt(o,e,n,r)});if(p&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=T.map(bt(i,"script"),jt)).length;f0&&wt(a,!f&&bt(t,"script")),u},cleanData:function(t){for(var e,n,r,i=T.event.special,o=0;void 0!==(n=t[o]);o++)if(J(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),T.fn.extend({detach:function(t){return Pt(this,t,!0)},remove:function(t){return Pt(this,t)},text:function(t){return W(this,function(t){return void 0===t?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Rt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Dt(this,t).appendChild(t)})},prepend:function(){return Rt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Dt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(T.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return T.clone(this,t,e)})},html:function(t){return W(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Et.test(t)&&!yt[(mt.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;n=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-s-.5))||0),c}function te(t,e,n){var r=Ft(t),i=(!m.boxSizingReliable()||n)&&"border-box"===T.css(t,"boxSizing",!1,r),o=i,a=Bt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Mt.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&E(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===T.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===T.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+Zt(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ee(t,e,n,r,i){return new ee.prototype.init(t,e,n,r,i)}T.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Bt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=X(e),c=Jt.test(e),l=t.style;if(c||(e=Gt(s)),a=T.cssHooks[e]||T.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];"string"===(o=typeof n)&&(i=rt.exec(n))&&i[1]&&(n=lt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(c?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=X(e);return Jt.test(e)||(e=Gt(s)),(a=T.cssHooks[e]||T.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Bt(t,e,r)),"normal"===i&&e in Qt&&(i=Qt[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(t,e){T.cssHooks[e]={get:function(t,n,r){if(n)return!Xt.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?te(t,e,r):Ht(t,Kt,function(){return te(t,e,r)})},set:function(t,n,r){var i,o=Ft(t),a=!m.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===T.css(t,"boxSizing",!1,o),c=r?Zt(t,e,r,s,o):0;return s&&a&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-Zt(t,e,"border",!1,o)-.5)),c&&(i=rt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=T.css(t,e)),Yt(0,n,c)}}}),T.cssHooks.marginLeft=Ut(m.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Bt(t,"marginLeft"))||t.getBoundingClientRect().left-Ht(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(t,e){T.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+it[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(T.cssHooks[t+e].set=Yt)}),T.fn.extend({css:function(t,e){return W(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ft(t),i=e.length;a1)}}),T.Tween=ee,ee.prototype={constructor:ee,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||T.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var t=ee.propHooks[this.prop];return t&&t.get?t.get(this):ee.propHooks._default.get(this)},run:function(t){var e,n=ee.propHooks[this.prop];return this.options.duration?this.pos=e=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ee.propHooks._default.set(this),this}},ee.prototype.init.prototype=ee.prototype,ee.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=T.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||!T.cssHooks[t.prop]&&null==t.elem.style[Gt(t.prop)]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},ee.propHooks.scrollTop=ee.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},T.fx=ee.prototype.init,T.fx.step={};var ne,re,ie=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;function ae(){re&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ae):n.setTimeout(ae,T.fx.interval),T.fx.tick())}function se(){return n.setTimeout(function(){ne=void 0}),ne=Date.now()}function ce(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=it[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function le(t,e,n){for(var r,i=(ue.tweeners[e]||[]).concat(ue.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each(function(){T.removeAttr(this,t)})}}),T.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,e,n):(1===o&&T.isXMLDoc(t)||(i=T.attrHooks[e.toLowerCase()]||(T.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void T.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=T.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&E(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(P);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?T.removeAttr(t,n):t.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(t,e){var n=pe[e]||T.find.attr;pe[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=pe[a],pe[a]=i,i=null!=n(t,e,r)?a:null,pe[a]=o),i}});var de=/^(?:input|select|textarea|button)$/i,he=/^(?:a|area)$/i;function ve(t){return(t.match(P)||[]).join(" ")}function me(t){return t.getAttribute&&t.getAttribute("class")||""}function ge(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(P)||[]}T.fn.extend({prop:function(t,e){return W(this,T.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[T.propFix[t]||t]})}}),T.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(e=T.propFix[e]||e,i=T.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=T.find.attr(t,"tabindex");return e?parseInt(e,10):de.test(t.nodeName)||he.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(T.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,c=0;if(g(t))return this.each(function(e){T(this).addClass(t.call(this,e,me(this)))});if((e=ge(t)).length)for(;n=this[c++];)if(i=me(n),r=1===n.nodeType&&" "+ve(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ve(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,c=0;if(g(t))return this.each(function(e){T(this).removeClass(t.call(this,e,me(this)))});if(!arguments.length)return this.attr("class","");if((e=ge(t)).length)for(;n=this[c++];)if(i=me(n),r=1===n.nodeType&&" "+ve(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ve(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):g(t)?this.each(function(n){T(this).toggleClass(t.call(this,n,me(this),e),e)}):this.each(function(){var e,i,o,a;if(r)for(i=0,o=T(this),a=ge(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=me(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ve(me(n))+" ").indexOf(e)>-1)return!0;return!1}});var ye=/\r/g;T.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,T(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(t){return null==t?"":t+""})),(e=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ye,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(t){var e=T.find.attr(t,"value");return null!=e?e:ve(T.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],c=a?o+1:i.length;for(r=o<0?c:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=T.inArray(T(t).val(),e)>-1}},m.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),m.focusin="onfocusin"in n;var be=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,e,r,i){var o,a,s,c,l,u,f,p,h=[r||b],v=d.call(t,"type")?t.type:t,m=d.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!be.test(v+T.event.triggered)&&(v.indexOf(".")>-1&&(v=(m=v.split(".")).shift(),m.sort()),l=v.indexOf(":")<0&&"on"+v,(t=t[T.expando]?t:new T.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:T.makeArray(e,[t]),f=T.event.special[v]||{},i||!f.trigger||!1!==f.trigger.apply(r,e))){if(!i&&!f.noBubble&&!y(r)){for(c=f.delegateType||v,be.test(c+v)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?c:f.bindType||v,(u=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&u.apply(a,e),(u=l&&a[l])&&u.apply&&J(a)&&(t.result=u.apply(a,e),!1===t.result&&t.preventDefault());return t.type=v,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),e)||!J(r)||l&&g(r[v])&&!y(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=v,t.isPropagationStopped()&&p.addEventListener(v,we),r[v](),t.isPropagationStopped()&&p.removeEventListener(v,we),T.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=T.extend(new T.Event,n,{type:t,isSimulated:!0});T.event.trigger(r,null,e)}}),T.fn.extend({trigger:function(t,e){return this.each(function(){T.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return T.event.trigger(t,e,n,!0)}}),m.focusin||T.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){T.event.simulate(e,t.target,T.event.fix(t))};T.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}});var xe=n.location,Ce={guid:Date.now()},Te=/\?/;T.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return r=e&&e.getElementsByTagName("parsererror")[0],e&&!r||T.error("Invalid XML: "+(r?T.map(r.childNodes,function(t){return t.textContent}).join("\n"):t)),e};var $e=/\[\]$/,_e=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;function Se(t,e,n,r){var i;if(Array.isArray(e))T.each(e,function(e,i){n||$e.test(t)?r(t,i):Se(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==C(e))r(t,e);else for(i in e)Se(t+"["+i+"]",e[i],n,r)}T.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,function(){i(this.name,this.value)});else for(n in t)Se(n,t[n],e,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&Ae.test(this.nodeName)&&!ke.test(t)&&(this.checked||!vt.test(t))}).map(function(t,e){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(t){return{name:e.name,value:t.replace(_e,"\r\n")}}):{name:e.name,value:n.replace(_e,"\r\n")}}).get()}});var Ee=/%20/g,Oe=/#.*$/,Ne=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,je=/^(?:GET|HEAD)$/,Le=/^\/\//,Ie={},Re={},Pe="*/".concat("*"),Me=b.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(P)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function He(t,e,n,r){var i={},o=t===Re;function a(s){var c;return i[s]=!0,T.each(t[s]||[],function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(c=l):void 0:(e.dataTypes.unshift(l),a(l),!1)}),c}return a(e.dataTypes[0])||!i["*"]&&a("*")}function qe(t,e){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&T.extend(!0,t,r),t}Me.href=xe.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?qe(qe(t,T.ajaxSettings),e):qe(T.ajaxSettings,t)},ajaxPrefilter:Fe(Ie),ajaxTransport:Fe(Re),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,c,l,u,f,p,d=T.ajaxSetup({},e),h=d.context||d,v=d.context&&(h.nodeType||h.jquery)?T(h):T.event,m=T.Deferred(),g=T.Callbacks("once memory"),y=d.statusCode||{},w={},x={},C="canceled",$={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=De.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)$.always(t[$.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||C;return r&&r.abort(e),_(0,e),this}};if(m.promise($),d.url=((t||d.url||xe.href)+"").replace(Le,xe.protocol+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(P)||[""],null==d.crossDomain){c=b.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=Me.protocol+"//"+Me.host!=c.protocol+"//"+c.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),He(Ie,d,e,$),l)return $;for(f in(u=T.event&&d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!je.test(d.type),i=d.url.replace(Oe,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Ee,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Te.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ne,"$1"),p=(Te.test(i)?"&":"?")+"_="+Ce.guid+++p),d.url=i+p),d.ifModified&&(T.lastModified[i]&&$.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&$.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&$.setRequestHeader("Content-Type",d.contentType),$.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Pe+"; q=0.01":""):d.accepts["*"]),d.headers)$.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,$,d)||l))return $.abort();if(C="abort",g.add(d.complete),$.done(d.success),$.fail(d.error),r=He(Re,d,e,$)){if($.readyState=1,u&&v.trigger("ajaxSend",[$,d]),l)return $;d.async&&d.timeout>0&&(s=n.setTimeout(function(){$.abort("timeout")},d.timeout));try{l=!1,r.send(w,_)}catch(t){if(l)throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,a,c){var f,p,b,w,x,C=e;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=c||"",$.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}if(c[0]in n)o=c[0];else{for(i in n){if(!c[0]||t.converters[i+" "+c[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==c[0]&&c.unshift(o),n[o]}(d,$,a)),!f&&T.inArray("script",d.dataTypes)>-1&&T.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,a,s,c,l={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=u.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=u.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(a=l[c+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[c+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(d,w,$,f),f?(d.ifModified&&((x=$.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=x),(x=$.getResponseHeader("etag"))&&(T.etag[i]=x)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=w.state,p=w.data,f=!(b=w.error))):(b=C,!t&&C||(C="error",t<0&&(t=0))),$.status=t,$.statusText=(e||C)+"",f?m.resolveWith(h,[p,C,$]):m.rejectWith(h,[$,C,b]),$.statusCode(y),y=void 0,u&&v.trigger(f?"ajaxSuccess":"ajaxError",[$,d,f?p:b]),g.fireWith(h,[$,C]),u&&(v.trigger("ajaxComplete",[$,d]),--T.active||T.event.trigger("ajaxStop")))}return $},getJSON:function(t,e,n){return T.get(t,e,n,"json")},getScript:function(t,e){return T.get(t,void 0,e,"script")}}),T.each(["get","post"],function(t,e){T[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:t,type:e,dataType:i,data:n,success:r},T.isPlainObject(t)&&t))}}),T.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),T._evalUrl=function(t,e,n){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){T.globalEval(t,e,n)}})},T.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return g(t)?this.each(function(e){T(this).wrapInner(t.call(this,e))}):this.each(function(){var e=T(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=g(t);return this.each(function(n){T(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Be={0:200,1223:204},Ue=T.ajaxSettings.xhr();m.cors=!!Ue&&"withCredentials"in Ue,m.ajax=Ue=!!Ue,T.ajaxTransport(function(t){var e,r;if(m.cors||Ue&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Be[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),T.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return T.globalEval(t),t}}}),T.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),T.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=T("