From 3f6ce2473858917b5ef788171cde8d4ae1e37587 Mon Sep 17 00:00:00 2001 From: "shubhammehrotra.symfony@webkul.com" Date: Tue, 31 Dec 2019 12:34:28 +0530 Subject: [PATCH] https://github.com/shubhwebkul/bagisto/pull/3 merged --- .../src/Http/Controllers/SearchController.php | 4 +- packages/Webkul/Velocity/package.json | 25 +++++------- .../publishable/assets/css/velocity.css | 30 +++++++++++--- .../publishable/assets/js/velocity.js | 38 ++++++++++-------- ..._164544_add_footer_content_in_channels.php | 32 --------------- ...12_30_155256_create_velocity_meta_data.php | 1 + .../Seeders/VelocityMetaDataSeeder.php | 3 ++ .../Admin/ConfigurationController.php | 10 +++-- .../src/Providers/VelocityServiceProvider.php | 2 - .../Product/ProductRepository.php | 35 ---------------- .../js/UI/components/content-header.vue | 2 +- .../Resources/assets/sass/components/app.scss | 22 ++++++++-- .../assets/sass/components/home.scss | 10 ++++- .../assets/sass/components/product-view.scss | 6 +++ .../Velocity/src/Resources/lang/en/app.php | 2 +- .../views/admin/meta-info/meta-data.blade.php | 27 +++++++++---- .../advertisement-one.blade.php | 2 +- .../views/home/featured-products.blade.php | 3 +- .../footer-links/footer-right.blade.php | 39 ++++++++++++++---- .../footer/newsletter-subscription.blade.php | 2 +- .../products/view/bundle-options.blade.php | 6 +-- .../view/configurable-options.blade.php | 6 +-- .../products/view/downloadable.blade.php | 6 +-- .../products/view/grouped-products.blade.php | 2 +- .../Resources/views/search/search.blade.php | 40 ++++++++----------- 25 files changed, 183 insertions(+), 172 deletions(-) delete mode 100644 packages/Webkul/Velocity/src/Database/Migrations/2019_12_24_164544_add_footer_content_in_channels.php diff --git a/packages/Webkul/Shop/src/Http/Controllers/SearchController.php b/packages/Webkul/Shop/src/Http/Controllers/SearchController.php index 1ecf1ec1c..a238cbca2 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/SearchController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/SearchController.php @@ -41,8 +41,8 @@ use Webkul\Product\Repositories\SearchRepository; /** * Index to handle the view loaded with the search results - * - * @return \Illuminate\View\View + * + * @return \Illuminate\View\View */ public function index() { diff --git a/packages/Webkul/Velocity/package.json b/packages/Webkul/Velocity/package.json index 95f65da74..4ecbf27ad 100644 --- a/packages/Webkul/Velocity/package.json +++ b/packages/Webkul/Velocity/package.json @@ -1,30 +1,23 @@ { "private": true, "scripts": { - "dev": "npm run development", - - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - - "watch-poll": "npm run watch -- --watch-poll", - - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - - "prod": "npm run production", - - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, - "devDependencies": { "axios": "^0.18", "cross-env": "^5.1.4", "laravel-mix": "^2.1", "laravel-mix-merge-manifest": "^0.1.1", "jquery": "^3.2", - "vue": "^2.1.10" + "vue": "^2.1.10", + "vue-carousel": "^0.18.0" }, - "dependencies": { "bootstrap-sass": "^3.4.1", "font-awesome": "^4.7.0", diff --git a/packages/Webkul/Velocity/publishable/assets/css/velocity.css b/packages/Webkul/Velocity/publishable/assets/css/velocity.css index e95ada43e..776174dad 100644 --- a/packages/Webkul/Velocity/publishable/assets/css/velocity.css +++ b/packages/Webkul/Velocity/publishable/assets/css/velocity.css @@ -1496,13 +1496,18 @@ right: 15px !important; top: 50px !important; z-index: 100 !important; - font-size: 14px !important; + font-size: 16px !important; position: fixed !important; max-width: 400px !important; - min-height: 40px !important; + min-height: 45px !important; max-height: 100px !important; } +.alert.alert-dismissible .close { + font-size: 23px; + padding: .3rem 1.25rem; +} + #home-right-bar-container.col-12 .category-container { padding: 30px 0; } @@ -1720,8 +1725,11 @@ margin-left: 0px !important; } +.product-price .price-label { + margin-right: 6px; +} + .product-price .sticker { - display: none; top: 0; left: 0; border: none; @@ -1746,6 +1754,12 @@ text-decoration: line-through; } +.method-sticker { + background-color: grey; + display: block; + color: white; +} + /* @author Shubham Mehrotra */ body { overflow-x: hidden; @@ -1930,8 +1944,8 @@ header #search-form > *:focus { font-size: 14px; } -.container-fluid > .row:first-child { - margin-bottom: 20px; +.container > .container-fluid { + margin-bottom: 60px; } /* advertisement-one */ @@ -2617,7 +2631,7 @@ body::after { padding-left: 40px !important; } -.pr0 { +.pr0, .container > .container-fluid > .row { padding-right: 0px !important; } @@ -3360,6 +3374,10 @@ button[disabled] { font-size: 16px; } +.product-detail .right .product-price .sticker { + display: none; +} + .product-detail .thumb-list { left: 15px; z-index: 1000; diff --git a/packages/Webkul/Velocity/publishable/assets/js/velocity.js b/packages/Webkul/Velocity/publishable/assets/js/velocity.js index 0645b79e1..d0e031771 100644 --- a/packages/Webkul/Velocity/publishable/assets/js/velocity.js +++ b/packages/Webkul/Velocity/publishable/assets/js/velocity.js @@ -36724,24 +36724,28 @@ var render = function() { "div", { class: "row " + (_vm.isEnabled == "0" ? "disabled" : "") }, [ - _c("div", { staticClass: "main-category fs20 pt10 col-2 pl30" }, [ - _c("i", { - class: - "rango-view-list " + - (_vm.isEnabled == "0" ? "" : "cursor-pointer") + - " align-vertical-top", - on: { - click: function($event) { - _vm.isEnabled == "0" ? "" : _vm.toggleSidebar() + _c( + "div", + { staticClass: "main-category fs20 pt10 col-2 pl30 unselectable" }, + [ + _c("i", { + class: + "rango-view-list " + + (_vm.isEnabled == "0" ? "" : "cursor-pointer") + + " align-vertical-top", + on: { + click: function($event) { + _vm.isEnabled == "0" ? "" : _vm.toggleSidebar() + } } - } - }), - _vm._v(" "), - _c("span", { - staticClass: "text-up", - domProps: { textContent: _vm._s(_vm.heading) } - }) - ]), + }), + _vm._v(" "), + _c("span", { + staticClass: "text-up", + domProps: { textContent: _vm._s(_vm.heading) } + }) + ] + ), _vm._v(" "), _c("div", { staticClass: "content-list row no-margin col-10" }, [ _c( diff --git a/packages/Webkul/Velocity/src/Database/Migrations/2019_12_24_164544_add_footer_content_in_channels.php b/packages/Webkul/Velocity/src/Database/Migrations/2019_12_24_164544_add_footer_content_in_channels.php deleted file mode 100644 index 7cdd26b52..000000000 --- a/packages/Webkul/Velocity/src/Database/Migrations/2019_12_24_164544_add_footer_content_in_channels.php +++ /dev/null @@ -1,32 +0,0 @@ -text('subscription_bar_content')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('channels', function($table) { - $table->dropColumn('subscription_bar_content'); - }); - } -} diff --git a/packages/Webkul/Velocity/src/Database/Migrations/2019_12_30_155256_create_velocity_meta_data.php b/packages/Webkul/Velocity/src/Database/Migrations/2019_12_30_155256_create_velocity_meta_data.php index 6f386994e..5e4d84023 100644 --- a/packages/Webkul/Velocity/src/Database/Migrations/2019_12_30_155256_create_velocity_meta_data.php +++ b/packages/Webkul/Velocity/src/Database/Migrations/2019_12_30_155256_create_velocity_meta_data.php @@ -20,6 +20,7 @@ class CreateVelocityMetaData extends Migration $table->text('footer_left_content'); $table->text('footer_middle_content'); $table->boolean('slider')->default(0); + $table->text('subscription_bar_content')->nullable(); $table->timestamps(); }); diff --git a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php index 71eeb63a1..7cfd09540 100644 --- a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php +++ b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php @@ -21,6 +21,9 @@ class VelocityMetaDataSeeder extends Seeder 'footer_middle_content' => '', 'slider' => 1, + + 'subscription_bar_content' => '
+
' ]); } } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php b/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php index 7055b3af5..0e39e1492 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php @@ -48,14 +48,18 @@ class ConfigurationController extends Controller public function storeMetaData($id) { - if (! request()->get('slider')) { + if (request()->get('slides') == "on") { + $params = request()->all() + [ + 'slider' => 1 + ]; + } else { $params = request()->all() + [ 'slider' => 0 ]; - } else { - $params = request()->all(); } + unset($params['slides']); + $product = $this->velocityMetaDataRepository->update($params, $id); session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Velocity Theme'])); diff --git a/packages/Webkul/Velocity/src/Providers/VelocityServiceProvider.php b/packages/Webkul/Velocity/src/Providers/VelocityServiceProvider.php index 918ccf545..74ace0799 100644 --- a/packages/Webkul/Velocity/src/Providers/VelocityServiceProvider.php +++ b/packages/Webkul/Velocity/src/Providers/VelocityServiceProvider.php @@ -39,8 +39,6 @@ class VelocityServiceProvider extends ServiceProvider $this->publishes([ __DIR__ . '/../Resources/views/' => resource_path('themes/velocity/views'), - - dirname(__DIR__) . '/Resources/views/admin/settings/channels/edit.blade.php' => base_path('resources/views/vendor/admin/settings/channels/edit.blade.php') ]); $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'velocity'); diff --git a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php index 28d5e916c..07fc8acad 100644 --- a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php @@ -2,46 +2,11 @@ namespace Webkul\Velocity\Repositories\Product; -use DB; -use Illuminate\Container\Container as App; -use Illuminate\Support\Facades\Event; -use Illuminate\Database\Eloquent\ModelNotFoundException; -use Webkul\Attribute\Repositories\AttributeRepository; use Webkul\Core\Eloquent\Repository; use Webkul\Product\Repositories\ProductFlatRepository; -use Webkul\Product\Models\ProductAttributeValue; -/** - * Product Repository - * - * @author Jitendra Singh - * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) - */ class ProductRepository extends Repository { - /** - * AttributeRepository object - * - * @var array - */ - protected $attributeRepository; - - /** - * Create a new controller instance. - * - * @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository - * @return void - */ - public function __construct( - AttributeRepository $attributeRepository, - App $app - ) - { - $this->attributeRepository = $attributeRepository; - - parent::__construct($app); - } - /** * Specify Model class name * diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue index 39f1fca47..cfee988c1 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue @@ -1,7 +1,7 @@