diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md new file mode 100644 index 000000000..4a073e0be --- /dev/null +++ b/CHANGELOG for v1.x.x.md @@ -0,0 +1,75 @@ +# CHANGELOG for v1.x.x + +#### This changelog consists the bug & security fixes and new features being included in the releases listed below. + +## **v0.1.0(28th of January 2020)** - *Release* + +* [feature] Updated to laravel version 6. + +* [feature] Added four new product types - Group, Bundle, Downloadable and Virtaul. + +* [feature] Povided default theme (Velocity). + +* #1971 [fixed] - Filter is not working properly for id column in autogenerated coupon codes in cart rule. + +* #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. + +* #1983 [fixed] - Getting exception on deleting admin logo. + +* #1986 [fixed] - Subscribe to newsletter does not work. + +* #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. + +* #2045 [fixed] - Login option is not coming while checkout with existing customer mail id. + +* #2051 [fixed] - Forgot password not working due to recent changes in mail keys. + +* #2054 [fixed] -Automatically 1st item of bundle is getting selected as a default after saving product. + +* #2058 [fixed] - Not getting any validation message if entered admin credentials are wrong. + +* #2066 [fixed] - Exception while writing product review. + +* #2071 [fixed] - Customer is not getting forget password email. + +* #2074 [fixed] - Getting exception while creating bundle type product. + +* #2075 [fixed] - Getting exception if trying to select any parent category of root. + +* #2087 [fixed] - Getting exception while adding configurable/bundle/grouped/Downloadable Type product to cart. + +* #2088 [fixed] - Getting exception on customer login. + +* #2089 [fixed] - Info missing on printing invoice at customer and admin end. + +* #2114 [fixed] - getting exception while recovering admin password in case admin did not enter the details in env. + +* #2118 [fixed] - Installation issue, getting exception on migrate command. + +* #2119 [fixed] - confirm password is not matching even if admin is entering similar password in password and confirm password. + +* #2120 [fixed] - Not able to add new user as while creating user password its giving error confirm password doesn't match. + +* #2124 [fixed] - Able to make all product as default while creating bundle product in select type option. + +* #2128 [fixed] - Click on add attribute, error is thrown. + +* #2132 [fixed] - Price range slider not displaying. + +* #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.. + +* #2168 [fixed] - locale direction drop down always select ltr. \ No newline at end of file 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/Admin/src/DataGrids/AddressDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php index e41c82191..f397ee46e 100644 --- a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php @@ -52,7 +52,7 @@ class AddressDataGrid extends DataGrid $queryBuilder = DB::table('customer_addresses as ca') ->leftJoin('countries', 'ca.country', '=', 'countries.code') ->leftJoin('customers as c', 'ca.customer_id', '=', 'c.id') - ->addSelect('ca.id as address_id', 'ca.company_name', 'ca.vat_id', 'ca.address1', 'ca.country', DB::raw('' . DB::getTablePrefix() . 'countries.name as country_name'), 'ca.state', 'ca.city', 'ca.postcode', 'ca.phone', 'ca.default_address') + ->addSelect('ca.id as address_id', 'ca.company_name', 'ca.address1', 'ca.country', DB::raw('' . DB::getTablePrefix() . 'countries.name as country_name'), 'ca.state', 'ca.city', 'ca.postcode', 'ca.phone', 'ca.default_address') ->where('c.id', $customer->id); $queryBuilder = $queryBuilder->leftJoin('country_states', function($qb) { @@ -66,7 +66,6 @@ class AddressDataGrid extends DataGrid $this->addFilter('address_id', 'ca.id'); $this->addFilter('company_name', 'ca.company_name'); - $this->addFilter('vat_id', 'ca.vat_id'); $this->addFilter('address1', 'ca.address1'); $this->addFilter('city', 'ca.city'); $this->addFilter('state_name', DB::raw(DB::getTablePrefix() . 'country_states.default_name')); @@ -134,15 +133,6 @@ class AddressDataGrid extends DataGrid 'filterable' => true ]); - $this->addColumn([ - 'index' => 'vat_id', - 'label' => trans('admin::app.customers.addresses.vat_id'), - 'type' => 'string', - 'searchable' => true, - 'sortable' => true, - 'filterable' => true - ]); - $this->addColumn([ 'index' => 'default_address', 'label' => trans('admin::app.customers.addresses.default-address'), 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 0e78f1f20..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,20 +19,48 @@ 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', 'product_flat.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'); - $this->addFilter('product_sku', 'product_flat.sku'); + $this->addFilter('product_sku', 'products.sku'); $this->addFilter('status', 'product_flat.status'); $this->addFilter('product_type', 'products.type'); $this->addFilter('attribute_family', 'attribute_families.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/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; ?>