diff --git a/.env.testing b/.env.testing index 299f945da..e87932525 100644 --- a/.env.testing +++ b/.env.testing @@ -42,4 +42,4 @@ MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" SHOP_MAIL_FROM=test@example.com -ADMIN_MAIL_TO=test@example.com \ No newline at end of file +ADMIN_MAIL_TO=test@example.com diff --git a/.gitignore b/.gitignore index e8f92823e..a19a6d127 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ yarn.lock .php_cs.cache storage/ storage/*.key +/docker-compose-collection/ +/resources/themes/velocity/* diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 4a073e0be..1a822a2ff 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -12,23 +12,35 @@ * #1971 [fixed] - Filter is not working properly for id column in autogenerated coupon codes in cart rule. +* #1976 [fixed] - Default attribute set should be selected in root category. + * #1977 [fixed] - On editing the product, selected category for that product is not checked. * #1978 [fixed] - Getting exception if changing the locale from cart page, if translation is not written for that product. * #1979 [fixed] - Wrong calculation at customer as well as at admin end in due amount and grandtotal. +* #1980 [fixed] - UI issue in cart on changing locale. + * #1983 [fixed] - Getting exception on deleting admin logo. * #1986 [fixed] - Subscribe to newsletter does not work. +* #1987 [fixed] - MySQL query very slow if products in category is around 3000 + +* #1988 [fixed] - Country and City Names in Create Address is not coming based on Locale + +* #1994 [fixed] - Tax rate should only depend on zip code, state field should not be mandatory. + * #1997 [fixed] - Getting exception on adding attribute or creating product in bagisto on php version 7.4 . * #1998 [fixed] - Showing product sale amount as zero when creating a product, and a existing catalog rule apply on it. * #2001 [fixed] - php artisan route:list throws error. -* #2012 [fixed] - FGetting exception when clicking on view all under review section at product page. +* #2012 [fixed] - Getting exception when clicking on view all under review section at product page. + +* #2033 [fixed] - API route for products throws error * #2045 [fixed] - Login option is not coming while checkout with existing customer mail id. @@ -66,10 +78,64 @@ * #2132 [fixed] - Price range slider not displaying. +* #2139 [fixed] - Logic error in exchange rate calculation + +* #2143 [fixed] - Attributes filterable checkbox - those who do not know will think that a bug! + * #2145 [fixed] - Emails don't work on registration. * #2146 [fixed] - Getting exception on creating bundle product without any option. -* #2147 [fixed] - Sort order of bundle product doesn't work.. +* #2147 [fixed] - Sort order of bundle product doesn't work. -* #2168 [fixed] - locale direction drop down always select ltr. \ No newline at end of file +* #2149 [fixed] - Ui issue when installing through installer.Getting issue on all steps. + +* #2162 [fixed] - product's special price should not greater than price + +* #2164 [fixed] - Redirect to incorrect url when click on finish button after installing through installer. + +* #2165 [fixed] - Incorrect error message for password field of email configuration. + +* #2167 [fixed] - Translation issue in Payment description field. + +* #2168 [fixed] - locale direction drop down always select ltr. + +* #2173 [fixed] - While creating locales value in direction dropdown is in small letters, but when you edit any locale it display in caps. + +* #2176 [fixed] - product price section is not getting highlighted if the warning exists + +* #2177 [fixed] - Category image can be add from anywhere + +* #2181 [fixed] - Getting exception when creating/editing customer address from Admin end. + +* #2182 [fixed] - missing option in Customer's Gender at admin end + +* #2183 [fixed] - Add toolkit for add address. + +* #2185 [fixed] - Issue with configurable product in case of multi-locale. Variation option are not visible. + +* #2186 [fixed] - Ui issue in cart for pt_BR locale. Quantity is not visible properly. + +* #2190 [fixed] - sku should be shown in product list if new product created + +* #2192 [fixed] - For all grid of sales section when you export data in csv file order id heading is mentioned as increment id. + +* #2196 [fixed] - No data is visible in state field, issue exist at all section where state field is used. + +* #2198 [fixed] - Remove vat id column from customer address list + +* #2202 [fixed] - catalog rule is not applied on product if product's special price date expired + +* #2203 [fixed] - saved categories are not checked in condition of catalog/cart rule + +* #2204 [fixed] - category tree view doesn't visible in catalog rule condition + +* #2207 [fixed] - Unable to delete Category. + +* #2226 [fixed] - Wrong price of product in case of multiple exchange rates. + +* #2225 [fixed] - Not able to export products according to locale. + +* #2227 [fixed] - Grand total column is not visible in invoice pdf, also getting incorrect currency symbol for grand total. + +* #2237 [fixed] - Error when trying to login with app.php locale set to ja \ No newline at end of file diff --git a/composer.json b/composer.json index 918317d36..74f093097 100755 --- a/composer.json +++ b/composer.json @@ -100,7 +100,8 @@ "Webkul\\CatalogRule\\": "packages/Webkul/CatalogRule/src", "Webkul\\CartRule\\": "packages/Webkul/CartRule/src", "Webkul\\Rule\\": "packages/Webkul/Rule/src", - "Webkul\\CMS\\": "packages/Webkul/CMS/src" + "Webkul\\CMS\\": "packages/Webkul/CMS/src", + "Webkul\\Velocity\\": "packages/Webkul/Velocity/src" } }, diff --git a/config/app.php b/config/app.php index 4efe78849..3a6ec6903 100755 --- a/config/app.php +++ b/config/app.php @@ -265,7 +265,8 @@ return [ Webkul\CatalogRule\Providers\CatalogRuleServiceProvider::class, Webkul\CartRule\Providers\CartRuleServiceProvider::class, Webkul\Rule\Providers\RuleServiceProvider::class, - Webkul\CMS\Providers\CMSServiceProvider::class + Webkul\CMS\Providers\CMSServiceProvider::class, + Webkul\Velocity\Providers\VelocityServiceProvider::class, ], /* diff --git a/config/themes.php b/config/themes.php index f7db9b62b..d6610d7e9 100755 --- a/config/themes.php +++ b/config/themes.php @@ -16,5 +16,12 @@ return [ // 'name' => 'Bliss', // 'parent' => 'default' // ] + + 'velocity' => [ + 'views_path' => 'resources/themes/velocity/views', + 'assets_path' => 'public/themes/velocity/assets', + 'name' => 'Velocity', + 'parent' => 'default' + ], ] ]; \ No newline at end of file diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 76e33f47d..4b94fd2d1 100755 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,6 +1,7 @@ call(BagistoDatabaseSeeder::class); + $this->call(VelocityMetaDataSeeder::class); } } diff --git a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php index 74cd3a83b..c32816dbb 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php @@ -4,11 +4,13 @@ namespace Webkul\API\Http\Controllers\Shop; use Illuminate\Support\Facades\Event; use Webkul\Customer\Repositories\CustomerRepository; +use Webkul\Customer\Repositories\CustomerGroupRepository; /** * Customer controller * * @author Jitendra Singh + * @author Vivek Sharma @vivek-webkul * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ class CustomerController extends Controller @@ -28,13 +30,28 @@ class CustomerController extends Controller protected $customerRepository; /** - * @param CustomerRepository object $customer + * Repository object + * + * @var array */ - public function __construct(CustomerRepository $customerRepository) - { + protected $customerGroupRepository; + + /** + * Create a new controller instance. + * + * @param \Webkul\Customer\Repositories\CustomerRepository $customerRepository + * @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroupRepository + * @return void + */ + public function __construct( + CustomerRepository $customerRepository, + CustomerGroupRepository $customerGroupRepository + ) { $this->_config = request('_config'); $this->customerRepository = $customerRepository; + + $this->customerGroupRepository = $customerGroupRepository; } /** @@ -56,10 +73,11 @@ class CustomerController extends Controller $data = array_merge($data, [ 'password' => bcrypt($data['password']), 'channel_id' => core()->getCurrentChannel()->id, - 'is_verified' => 1, - 'customer_group_id' => 1 + 'is_verified' => 1 ]); + $data['customer_group_id'] = $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id; + Event::dispatch('customer.registration.before'); $customer = $this->customerRepository->create($data); diff --git a/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php b/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php index 700bdfb34..be3eeb84f 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php @@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Event; use Webkul\Customer\Repositories\WishlistRepository; use Webkul\Product\Repositories\ProductRepository; use Webkul\API\Http\Resources\Customer\Wishlist as WishlistResource; +use Webkul\API\Http\Resources\Checkout\Cart as CartResource; use Cart; /** @@ -109,8 +110,10 @@ class WishlistController extends Controller if ($result) { Cart::collectTotals(); + $cart = Cart::getCart(); + return response()->json([ - 'data' => 1, + 'data' => $cart ? new CartResource($cart) : null, 'message' => trans('shop::app.wishlist.moved') ]); } else { diff --git a/packages/Webkul/API/Http/routes.php b/packages/Webkul/API/Http/routes.php index 04ded4af9..c6ec10827 100755 --- a/packages/Webkul/API/Http/routes.php +++ b/packages/Webkul/API/Http/routes.php @@ -70,6 +70,12 @@ Route::group(['prefix' => 'api'], function ($router) { Route::post('reviews/{id}/create', 'ReviewController@store'); + Route::delete('reviews/{id}', 'ResourceController@destroy')->defaults('_config', [ + 'repository' => 'Webkul\Product\Repositories\ProductReviewRepository', + 'resource' => 'Webkul\API\Http\Resources\Catalog\ProductReview', + 'authorization_required' => true + ]); + //Channel routes Route::get('channels', 'ResourceController@index')->defaults('_config', [ diff --git a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index 3a779b910..59f13d130 100755 --- a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -59,7 +59,14 @@ class LocalesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, + 'closure' => true, + 'wrapper' => function ($value) { + if ($value->direction == 'ltr') + return trans('admin::app.datagrid.ltr'); + else + return trans('admin::app.datagrid.rtl'); + } ]); } diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index a4b9add01..04d81be0f 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -3,7 +3,7 @@ namespace Webkul\Admin\DataGrids; use Webkul\Ui\DataGrid\DataGrid; -use DB; +use Illuminate\Support\Facades\DB; /** * ProductDataGrid Class @@ -19,16 +19,44 @@ class ProductDataGrid extends DataGrid protected $itemsPerPage = 10; + protected $locale = 'all'; + + protected $channel = 'all'; + + public function __construct() + { + parent::__construct(); + + $this->locale = request()->get('locale') ?? 'all'; + $this->channel = request()->get('channel') ?? 'all'; + } + public function prepareQueryBuilder() { $queryBuilder = DB::table('product_flat') ->leftJoin('products', 'product_flat.product_id', '=', 'products.id') ->leftJoin('attribute_families', 'products.attribute_family_id', '=', 'attribute_families.id') ->leftJoin('product_inventories', 'product_flat.product_id', '=', 'product_inventories.product_id') - ->select('product_flat.product_id as product_id', 'products.sku as product_sku', 'product_flat.name as product_name', 'products.type as product_type', 'product_flat.status', 'product_flat.price', 'attribute_families.name as attribute_family', DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')) - ->where('channel', core()->getCurrentChannelCode()) - ->where('locale', app()->getLocale()) - ->groupBy('product_flat.product_id'); + ->select( + 'product_flat.product_id as product_id', + 'products.sku as product_sku', + 'product_flat.name as product_name', + 'products.type as product_type', + 'product_flat.status', + 'product_flat.price', + 'attribute_families.name as attribute_family', + DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity') + ); + + if ($this->locale !== 'all') { + $queryBuilder->where('locale', $this->locale); + } + + if ($this->channel !== 'all') { + $queryBuilder->where('channel', $this->channel); + } + + $queryBuilder->groupBy('product_flat.product_id'); $this->addFilter('product_id', 'product_flat.product_id'); $this->addFilter('product_name', 'product_flat.name'); diff --git a/packages/Webkul/Admin/src/Resources/lang/ar/app.php b/packages/Webkul/Admin/src/Resources/lang/ar/app.php index 0287d9194..f08c39d6e 100644 --- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php @@ -150,7 +150,9 @@ return [ 'role' => 'الدور', 'sub-total' => 'المجموع الفرعي', 'no-of-products' => 'عدد المنتجات', - 'refunded' => 'Refunded' + 'refunded' => 'Refunded', + 'rtl' => 'RTL', + 'ltr' => 'LTR', ], 'account' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 25a79fa1a..e745bfc5c 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -213,7 +213,9 @@ return [ 'times-used' => 'Times Used', 'created-date' => 'Created Date', 'expiration-date' => 'Expiration Date', - 'delete' => 'Delete' + 'delete' => 'Delete', + 'rtl' => 'RTL', + 'ltr' => 'LTR', ], 'account' => [ @@ -776,7 +778,8 @@ return [ 'seo' => 'Home page SEO', 'seo-title' => 'Meta title', 'seo-description' => 'Meta description', - 'seo-keywords' => 'Meta keywords' + 'seo-keywords' => 'Meta keywords', + ], 'sliders' => [ @@ -1263,7 +1266,9 @@ return [ 'order-number-length' => 'Order Number Length', 'order-number-suffix' => 'Order Number Suffix', 'default' => 'Default', - 'sandbox' => 'Sandbox' + 'sandbox' => 'Sandbox', + 'all-channels' => 'All', + 'all-locales' => 'All' ] ] ]; diff --git a/packages/Webkul/Admin/src/Resources/lang/fa/app.php b/packages/Webkul/Admin/src/Resources/lang/fa/app.php index 8a0eb3992..db6b8c70a 100644 --- a/packages/Webkul/Admin/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/fa/app.php @@ -167,7 +167,9 @@ return [ 'disc_quantity' => 'مقدار استفاده نشده', 'disc_threshold' => 'آستانه استفاده نشده', 'use_coupon' => 'استافده از کوپن', - 'refunded' => 'Refunded' + 'refunded' => 'Refunded', + 'rtl' => 'RTL', + 'ltr' => 'LTR', ], 'account' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php index 5c11fd620..d1d98d358 100755 --- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php @@ -155,7 +155,9 @@ return [ 'per-cust' => 'Por cliente', 'usage-throttle' => 'Tempos de uso', 'for-guest' => 'Para convidados', - 'refunded' => 'Refunded' + 'refunded' => 'Refunded', + 'rtl' => 'RTL', + 'ltr' => 'LTR', ], 'account' => [ 'title' => 'Minha Conta', diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php index 680837501..c0ba24c98 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php @@ -139,7 +139,7 @@
- +
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/categories.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/categories.blade.php index 4565d27b8..62303d041 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/categories.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/categories.blade.php @@ -4,7 +4,7 @@
- + {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.categories.controls.before', ['product' => $product]) !!} diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php index 60c77b361..f01b54c2b 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php @@ -6,9 +6,45 @@ @section('content')
+ get('locale') ?: null; ?> + get('channel') ?: null; ?>