diff --git a/packages/Webkul/Admin/src/Http/Controllers/Sales/InvoiceController.php b/packages/Webkul/Admin/src/Http/Controllers/Sales/InvoiceController.php index 40ba5609e..ebda162a7 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Sales/InvoiceController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Sales/InvoiceController.php @@ -55,7 +55,6 @@ class InvoiceController extends Controller $this->orderRepository = $orderRepository; $this->invoiceRepository = $invoiceRepository; - } /** diff --git a/packages/Webkul/Core/src/Http/Controllers/ChannelController.php b/packages/Webkul/Core/src/Http/Controllers/ChannelController.php index 49299e30c..d4c1235c7 100755 --- a/packages/Webkul/Core/src/Http/Controllers/ChannelController.php +++ b/packages/Webkul/Core/src/Http/Controllers/ChannelController.php @@ -71,9 +71,9 @@ class ChannelController extends Controller 'code' => ['required', 'unique:channels,code', new \Webkul\Core\Contracts\Validations\Code], 'name' => 'required', 'locales' => 'required|array|min:1', - 'default_locale_id' => 'required', + 'default_locale_id' => 'required|in_array:locales.*', 'currencies' => 'required|array|min:1', - 'base_currency_id' => 'required', + 'base_currency_id' => 'required|in_array:currencies.*', 'root_category_id' => 'required', 'logo.*' => 'mimes:jpeg,jpg,bmp,png', 'favicon.*' => 'mimes:jpeg,jpg,bmp,png', @@ -134,9 +134,9 @@ class ChannelController extends Controller 'name' => 'required', 'locales' => 'required|array|min:1', 'inventory_sources' => 'required|array|min:1', - 'default_locale_id' => 'required', + 'default_locale_id' => 'required|in_array:locales.*', 'currencies' => 'required|array|min:1', - 'base_currency_id' => 'required', + 'base_currency_id' => 'required|in_array:currencies.*', 'root_category_id' => 'required', 'logo.*' => 'mimes:jpeg,jpg,bmp,png', 'favicon.*' => 'mimes:jpeg,jpg,bmp,png', diff --git a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php index e8eca232c..0b202253d 100755 --- a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php +++ b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php @@ -54,7 +54,7 @@ abstract class AbstractShipping * * @return array */ - public function getDecription() + public function getDescription() { return $this->getConfigData('decription'); } diff --git a/packages/Webkul/Shipping/src/Shipping.php b/packages/Webkul/Shipping/src/Shipping.php index 44675b89d..a012b1843 100755 --- a/packages/Webkul/Shipping/src/Shipping.php +++ b/packages/Webkul/Shipping/src/Shipping.php @@ -107,4 +107,29 @@ class Shipping return $rates; } + + /** + * Returns active shipping methods + * + * @return array + */ + public function getShippingMethods() + { + $methods = []; + + foreach (Config::get('carriers') as $shippingMethod) { + $object = new $shippingMethod['class']; + + if (! $object->isAvailable()) + continue; + + $methods[] = [ + 'method' => $object->getCode(), + 'method_title' => $object->getTitle(), + 'description' => $object->getDescription() + ]; + } + + return $methods; + } } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php index 18722a531..388fd1d95 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php @@ -60,7 +60,7 @@ -
+
@@ -83,19 +83,19 @@ core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1 ) -
- @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) + @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) +
- @endfor -
+
+ @endfor @endif -
+
@@ -321,7 +321,7 @@
-
+
@@ -345,19 +345,19 @@ core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1 ) -
- @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) - - @endfor -
+ @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) +
+ +
+ @endfor @endif -
+
@@ -510,9 +510,9 @@ - {{ __('shop::app.checkout.onepage.save_as_address') }} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php index e7e02335a..e35d3d737 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php @@ -57,11 +57,11 @@
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1) -
- @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) + @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) +
- @endfor -
+
+ @endfor @endif @include ('shop::customers.account.address.country-state', ['countryCode' => old('country'), 'stateCode' => old('state')]) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php index 8be94aeef..b82de5902 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php @@ -31,19 +31,19 @@
- + @{{ errors.first('first_name') }}
- + @{{ errors.first('last_name') }}
-
- + @{{ errors.first('address1[]') }}
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1) -
- @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) + @for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++) +
- @endfor -
+
+ @endfor @endif @include ('shop::customers.account.address.country-state', ['countryCode' => old('country') ?? $address->country, 'stateCode' => old('state') ?? $address->state])
- + @{{ errors.first('city') }}
- + @{{ errors.first('postcode') }}
- + @{{ errors.first('phone') }}
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php index f79cb0bff..ba66a4bec 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php @@ -6,11 +6,9 @@ @section('page-detail-wrapper')