From 8f28bd162ebfd636aa9e7e44a18fd29317897600 Mon Sep 17 00:00:00 2001 From: prashant-webkul Date: Thu, 20 Sep 2018 19:54:33 +0530 Subject: [PATCH 1/3] Fixed errors in providers file and composer version bag which was allowing composer to autoload even when paths in provider and composer files were not correct --- composer.json | 1 + config/app.php | 4 +-- .../2018_09_05_150444_create_cart_table.php | 16 +++++++++++ ...8_09_05_150915_create_cart_items_table.php | 9 ++++++ .../assets/js/components/cart-dropdown.vue | 2 -- public/themes/default/assets/js/shop.js | 28 ++++++++++++------- 6 files changed, 45 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index cc67bf6ff..ec0706a90 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ "webkul/laravel-attribute": "self.version", "webkul/laravel-cart": "self.version", "webkul/laravel-customer": "self.version", + "webkul/laravel-inventory": "self.version", "webkul/laravel-category": "self.version", "webkul/laravel-product": "self.version", "webkul/laravel-shop": "self.version", diff --git a/config/app.php b/config/app.php index fd2e405f9..c649dc388 100644 --- a/config/app.php +++ b/config/app.php @@ -180,15 +180,13 @@ return [ Webkul\User\Providers\UserServiceProvider::class, Webkul\Admin\Providers\AdminServiceProvider::class, Webkul\Ui\Providers\UiServiceProvider::class, - // Webkul\Category\Providers\CategoryServiceProvider::class, + Webkul\Category\Providers\CategoryServiceProvider::class, Webkul\Attribute\Providers\AttributeServiceProvider::class, Webkul\Core\Providers\CoreServiceProvider::class, Webkul\Shop\Providers\ShopServiceProvider::class, Webkul\Customer\Providers\CustomerServiceProvider::class, Webkul\Inventory\Providers\InventoryServiceProvider::class, Webkul\Product\Providers\ProductServiceProvider::class, - Webkul\Shop\Providers\ShopServiceProvider::class, - Webkul\Customer\Providers\CustomerServiceProvider::class, Webkul\Theme\Providers\ThemeServiceProvider::class, Webkul\Cart\Providers\CartServiceProvider::class, Webkul\Shipping\Providers\ShippingServiceProvider::class, diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php index 6a2195acc..9809f692d 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php @@ -22,6 +22,22 @@ class CreateCartTable extends Migration $table->foreign('channel_id')->references('id')->on('channels'); $table->string('coupon_code')->nullable(); $table->boolean('is_gift')->nullable(); + $table->integer('items_count')->nullable(); + $table->decimal('items_qty', 12, 4)->nullable(); + $table->string('global_currency_code')->nullable(); + $table->string('base_currency_code')->nullable(); + $table->string('store_currency_code')->nullable(); + $table->string('quote_currency_code')->nullable(); + $table->decimal('grand_total', 12, 4)->nullable(); + $table->decimal('base_grand_total', 12, 4)->nullable(); + $table->decimal('sub_total', 12, 4)->nullable(); + $table->decimal('base_sub_total', 12, 4)->nullable(); + $table->decimal('sub_total_with_discount', 12, 4)->nullable(); + $table->decimal('base_sub_total_with_discount', 12, 4)->nullable(); + $table->string('checkout_method')->nullable(); + $table->boolean('is_guest')->nullable(); + $table->string('customer_full_name')->nullable(); + $table->dateTime('conversion_time')->nullable(); $table->timestamps(); }); } diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php index 0ab6260f7..c3c69ed87 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php @@ -23,6 +23,15 @@ class CreateCartProductsTable extends Migration $table->integer('tax_category_id')->unsigned()->nullable(); $table->foreign('tax_category_id')->references('id')->on('tax_categories'); $table->string('coupon_code')->nullable(); + $table->decimal('weight', 12,4)->nullable(); + $table->decimal('price', 12,4)->nullable(); + $table->decimal('base_price', 12,4)->nullable(); + $table->decimal('custom_price', 12,4)->nullable(); + $table->decimal('discount_percent', 12,4)->nullable(); + $table->decimal('discount_amount', 12,4)->nullable(); + $table->decimal('base_discount_amount', 12,4)->nullable(); + $table->boolean('no_discount')->nullable()->default(0); + $table->json('additional')->nullable(); $table->timestamps(); }); } diff --git a/packages/Webkul/Shop/src/Resources/assets/js/components/cart-dropdown.vue b/packages/Webkul/Shop/src/Resources/assets/js/components/cart-dropdown.vue index 570197b9d..bea9aa806 100644 --- a/packages/Webkul/Shop/src/Resources/assets/js/components/cart-dropdown.vue +++ b/packages/Webkul/Shop/src/Resources/assets/js/components/cart-dropdown.vue @@ -34,7 +34,6 @@ -