From 5e15e05c78f1d597975abc879fc4c71115b6f20a Mon Sep 17 00:00:00 2001
From: rahul shukla
Date: Tue, 9 Apr 2019 16:15:04 +0530
Subject: [PATCH 01/11] tax category message change
---
.../Webkul/Tax/src/Http/Controllers/TaxCategoryController.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php
index aedb59132..66e6d5a9d 100755
--- a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php
+++ b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php
@@ -182,7 +182,7 @@ class TaxCategoryController extends Controller
Event::fire('tax.tax_category.delete.after', $id);
- session()->flash('success', trans('admin::app.response.delete-failed', ['name' => 'Tax Category']));
+ session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Tax Category']));
return response()->json(['message' => true], 200);
} catch(Exception $e) {
From fb6ffaa9d929ca21cd1e5cc7b5d16959867c6b54 Mon Sep 17 00:00:00 2001
From: jitendra
Date: Tue, 9 Apr 2019 16:27:33 +0530
Subject: [PATCH 02/11] JWT implemented for customer api authorization
---
composer.json | 3 ++-
config/auth.php | 2 +-
config/debugbar.php | 2 +-
config/tinker.php | 15 ------------
config/translatable.php | 4 ++--
.../Webkul/Customer/src/Models/Customer.php | 23 ++++++++++++++++++-
.../views/vendor/mail/html/message.blade.php | 2 +-
.../vendor/mail/markdown/message.blade.php | 2 +-
.../vendor/notifications/email.blade.php | 2 +-
9 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/composer.json b/composer.json
index aace66d41..48c2fa1f2 100755
--- a/composer.json
+++ b/composer.json
@@ -29,7 +29,8 @@
"maatwebsite/excel": "3.1.x-dev",
"nwidart/laravel-modules": "^3.2",
"prettus/l5-repository": "^2.6",
- "propaganistas/laravel-intl": "^2.0"
+ "propaganistas/laravel-intl": "^2.0",
+ "tymon/jwt-auth": "dev-develop"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
diff --git a/config/auth.php b/config/auth.php
index caa89e114..6b8c92e4b 100755
--- a/config/auth.php
+++ b/config/auth.php
@@ -13,7 +13,7 @@ return [
],
'api' => [
- 'driver' => 'token',
+ 'driver' => 'jwt',
'provider' => 'customers',
],
diff --git a/config/debugbar.php b/config/debugbar.php
index c7c9ceee3..8350e1c8d 100755
--- a/config/debugbar.php
+++ b/config/debugbar.php
@@ -16,7 +16,7 @@ return [
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
- 'telescope*'
+ //
],
/*
diff --git a/config/tinker.php b/config/tinker.php
index 181f0fdbd..1341c1b03 100755
--- a/config/tinker.php
+++ b/config/tinker.php
@@ -2,21 +2,6 @@
return [
- /*
- |--------------------------------------------------------------------------
- | Console Commands
- |--------------------------------------------------------------------------
- |
- | This option allows you to add additional Artisan commands that should
- | be available within the Tinker environment. Once the command is in
- | this array you may execute the command in Tinker using its name.
- |
- */
-
- 'commands' => [
- // App\Console\Commands\ExampleCommand::class,
- ],
-
/*
|--------------------------------------------------------------------------
| Alias Blacklist
diff --git a/config/translatable.php b/config/translatable.php
index 17bf04aac..1ef910d3e 100755
--- a/config/translatable.php
+++ b/config/translatable.php
@@ -54,7 +54,7 @@ return [
| $useTranslationFallback when defined
|
*/
- 'use_fallback' => true,
+ 'use_fallback' => false,
/*
|--------------------------------------------------------------------------
@@ -113,4 +113,4 @@ return [
|
*/
'to_array_always_loads_translations' => true,
-];
\ No newline at end of file
+];
diff --git a/packages/Webkul/Customer/src/Models/Customer.php b/packages/Webkul/Customer/src/Models/Customer.php
index 367101395..b49329a39 100755
--- a/packages/Webkul/Customer/src/Models/Customer.php
+++ b/packages/Webkul/Customer/src/Models/Customer.php
@@ -4,13 +4,14 @@ namespace Webkul\Customer\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
+use Tymon\JWTAuth\Contracts\JWTSubject;
use Webkul\Checkout\Models\CartProxy;
use Webkul\Sales\Models\OrderProxy;
use Webkul\Product\Models\ProductReviewProxy;
use Webkul\Customer\Notifications\CustomerResetPassword;
use Webkul\Customer\Contracts\Customer as CustomerContract;
-class Customer extends Authenticatable implements CustomerContract
+class Customer extends Authenticatable implements CustomerContract, JWTSubject
{
use Notifiable;
@@ -103,4 +104,24 @@ class Customer extends Authenticatable implements CustomerContract
public function all_orders() {
return $this->hasMany(OrderProxy::modelClass(), 'customer_id');
}
+
+ /**
+ * Get the identifier that will be stored in the subject claim of the JWT.
+ *
+ * @return mixed
+ */
+ public function getJWTIdentifier()
+ {
+ return $this->getKey();
+ }
+
+ /**
+ * Return a key value array, containing any custom claims to be added to the JWT.
+ *
+ * @return array
+ */
+ public function getJWTCustomClaims()
+ {
+ return [];
+ }
}
diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php
index 1ae9ed8f1..2ad23a66e 100755
--- a/resources/views/vendor/mail/html/message.blade.php
+++ b/resources/views/vendor/mail/html/message.blade.php
@@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
- © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
+ © {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent
diff --git a/resources/views/vendor/mail/markdown/message.blade.php b/resources/views/vendor/mail/markdown/message.blade.php
index 1ae9ed8f1..b409c71cb 100755
--- a/resources/views/vendor/mail/markdown/message.blade.php
+++ b/resources/views/vendor/mail/markdown/message.blade.php
@@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
- © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
+ © {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent
diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php
index e2c68be68..fe3889532 100755
--- a/resources/views/vendor/notifications/email.blade.php
+++ b/resources/views/vendor/notifications/email.blade.php
@@ -56,7 +56,7 @@
'into your web browser: [:actionURL](:actionURL)',
[
'actionText' => $actionText,
- 'actionURL' => $actionUrl,
+ 'actionURL' => $actionUrl
]
)
@endcomponent
From b0296a02e0328ac7dcf680c885285ce1878b6a59 Mon Sep 17 00:00:00 2001
From: naresh verma
Date: Tue, 9 Apr 2019 17:04:20 +0530
Subject: [PATCH 03/11] inventory source mail
---
config/debugbar.php | 2 +-
config/excel.php | 96 ++++++++++--
config/tinker.php | 4 +-
config/translatable.php | 18 ++-
config/trustedproxy.php | 15 +-
packages/Webkul/Admin/src/Listeners/Order.php | 5 +-
.../Mail/NewInventorySourceNotification.php | 51 ++++++
.../Webkul/Shop/src/Resources/lang/en/app.php | 5 +-
.../new-inventorysource-shipment.blade.php | 145 ++++++++++++++++++
.../views/emails/sales/new-shipment.blade.php | 65 ++++----
10 files changed, 347 insertions(+), 59 deletions(-)
create mode 100644 packages/Webkul/Admin/src/Mail/NewInventorySourceNotification.php
create mode 100644 packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
diff --git a/config/debugbar.php b/config/debugbar.php
index c7c9ceee3..72ccd7bd3 100755
--- a/config/debugbar.php
+++ b/config/debugbar.php
@@ -143,7 +143,7 @@ return [
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
- 'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
+ 'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
diff --git a/config/excel.php b/config/excel.php
index af3e8bb99..37695184f 100755
--- a/config/excel.php
+++ b/config/excel.php
@@ -3,6 +3,7 @@
use Maatwebsite\Excel\Excel;
return [
+
'exports' => [
/*
@@ -16,17 +17,6 @@ return [
*/
'chunk_size' => 1000,
- /*
- |--------------------------------------------------------------------------
- | Temporary path
- |--------------------------------------------------------------------------
- |
- | When exporting files, we use a temporary file, before storing
- | or downloading. Here you can customize that path.
- |
- */
- 'temp_path' => sys_get_temp_dir(),
-
/*
|--------------------------------------------------------------------------
| Pre-calculate formulas during export
@@ -69,6 +59,23 @@ return [
*/
'formatter' => 'slug',
],
+
+ /*
+ |--------------------------------------------------------------------------
+ | CSV Settings
+ |--------------------------------------------------------------------------
+ |
+ | Configure e.g. delimiter, enclosure and line ending for CSV imports.
+ |
+ */
+ 'csv' => [
+ 'delimiter' => ',',
+ 'enclosure' => '"',
+ 'line_ending' => PHP_EOL,
+ 'use_bom' => false,
+ 'include_separator_line' => false,
+ 'excel_compatibility' => false,
+ ],
],
/*
@@ -109,4 +116,71 @@ return [
*/
'pdf' => Excel::DOMPDF,
],
+
+ 'value_binder' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Value Binder
+ |--------------------------------------------------------------------------
+ |
+ | PhpSpreadsheet offers a way to hook into the process of a value being
+ | written to a cell. In there some assumptions are made on how the
+ | value should be formatted. If you want to change those defaults,
+ | you can implement your own default value binder.
+ |
+ */
+ 'default' => Maatwebsite\Excel\DefaultValueBinder::class,
+ ],
+
+ 'transactions' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Transaction Handler
+ |--------------------------------------------------------------------------
+ |
+ | By default the import is wrapped in a transaction. This is useful
+ | for when an import may fail and you want to retry it. With the
+ | transactions, the previous import gets rolled-back.
+ |
+ | You can disable the transaction handler by setting this to null.
+ | Or you can choose a custom made transaction handler here.
+ |
+ | Supported handlers: null|db
+ |
+ */
+ 'handler' => 'db',
+ ],
+
+ 'temporary_files' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Local Temporary Path
+ |--------------------------------------------------------------------------
+ |
+ | When exporting and importing files, we use a temporary file, before
+ | storing reading or downloading. Here you can customize that path.
+ |
+ */
+ 'local_path' => sys_get_temp_dir(),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Remote Temporary Disk
+ |--------------------------------------------------------------------------
+ |
+ | When dealing with a multi server setup with queues in which you
+ | cannot rely on having a shared local temporary path, you might
+ | want to store the temporary file on a shared disk. During the
+ | queue executing, we'll retrieve the temporary file from that
+ | location instead. When left to null, it will always use
+ | the local path. This setting only has effect when using
+ | in conjunction with queued imports and exports.
+ |
+ */
+ 'remote_disk' => null,
+
+ ],
];
diff --git a/config/tinker.php b/config/tinker.php
index 181f0fdbd..0d2bf00e7 100755
--- a/config/tinker.php
+++ b/config/tinker.php
@@ -28,6 +28,8 @@ return [
|
*/
- 'dont_alias' => [],
+ 'dont_alias' => [
+ 'App\Nova',
+ ],
];
diff --git a/config/translatable.php b/config/translatable.php
index 17bf04aac..87f898b4e 100755
--- a/config/translatable.php
+++ b/config/translatable.php
@@ -39,6 +39,8 @@ return [
| As a default locale, Translatable takes the locale of Laravel's
| translator. If for some reason you want to override this,
| you can specify what default should be used here.
+ | If you set a value here it will only use the current config value
+ | and never fallback to the translator one.
|
*/
'locale' => null,
@@ -54,7 +56,7 @@ return [
| $useTranslationFallback when defined
|
*/
- 'use_fallback' => true,
+ 'use_fallback' => false,
/*
|--------------------------------------------------------------------------
@@ -80,6 +82,18 @@ return [
*/
'fallback_locale' => 'en',
+ /*
+ |--------------------------------------------------------------------------
+ | Translation Model Namespace
+ |--------------------------------------------------------------------------
+ |
+ | Defines the default 'Translation' class namespace. For example, if
+ | you want to use App\Translations\CountryTranslation instead of App\CountryTranslation
+ | set this to 'App\Translations'.
+ |
+ */
+ 'translation_model_namespace' => null,
+
/*
|--------------------------------------------------------------------------
| Translation Suffix
@@ -113,4 +127,4 @@ return [
|
*/
'to_array_always_loads_translations' => true,
-];
\ No newline at end of file
+];
diff --git a/config/trustedproxy.php b/config/trustedproxy.php
index acda8d51a..e242b0da5 100755
--- a/config/trustedproxy.php
+++ b/config/trustedproxy.php
@@ -15,19 +15,20 @@ return [
* of your proxy (e.g. if using ELB or similar).
*
*/
- 'proxies' => null, // [,], '*'
+ 'proxies' => null, // [,], '*', ','
/*
* To trust one or more specific proxies that connect
- * directly to your server, use an array of IP addresses:
+ * directly to your server, use an array or a string separated by comma of IP addresses:
*/
- # 'proxies' => ['192.168.1.1'],
+ // 'proxies' => ['192.168.1.1'],
+ // 'proxies' => '192.168.1.1, 192.168.1.2',
/*
* Or, to trust all proxies that connect
* directly to your server, use a "*"
*/
- # 'proxies' => '*',
+ // 'proxies' => '*',
/*
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
@@ -36,10 +37,14 @@ return [
*
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
+ * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
+ *
+ * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
+ * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
+ * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
*
* @link https://symfony.com/doc/current/deployment/proxies.html
*/
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
-
];
diff --git a/packages/Webkul/Admin/src/Listeners/Order.php b/packages/Webkul/Admin/src/Listeners/Order.php
index 377b4fbdd..bd4df32cc 100755
--- a/packages/Webkul/Admin/src/Listeners/Order.php
+++ b/packages/Webkul/Admin/src/Listeners/Order.php
@@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Mail;
use Webkul\Admin\Mail\NewOrderNotification;
use Webkul\Admin\Mail\NewInvoiceNotification;
use Webkul\Admin\Mail\NewShipmentNotification;
+use Webkul\Admin\Mail\NewInventorySourceNotification;
/**
* Order event handler
@@ -18,7 +19,7 @@ class Order {
/**
* @param mixed $order
*
- * Send new order confirmation mail to the customer
+ * Send new shipment mail to the customer and inventory source
*/
public function sendNewOrderMail($order)
{
@@ -52,6 +53,8 @@ class Order {
{
try {
Mail::send(new NewShipmentNotification($shipment));
+
+ Mail::send(new NewInventorySourceNotification($shipment));
} catch (\Exception $e) {
}
diff --git a/packages/Webkul/Admin/src/Mail/NewInventorySourceNotification.php b/packages/Webkul/Admin/src/Mail/NewInventorySourceNotification.php
new file mode 100644
index 000000000..7fda9cd25
--- /dev/null
+++ b/packages/Webkul/Admin/src/Mail/NewInventorySourceNotification.php
@@ -0,0 +1,51 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class NewInventorySourceNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The shipment instance.
+ *
+ * @var Shipment
+ */
+ public $shipment;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param mixed $shipment
+ * @return void
+ */
+ public function __construct($shipment)
+ {
+ $this->shipment = $shipment;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ { $order = $this->shipment->order;
+ $inventory = $this->shipment->inventory_source;
+
+ return $this->to($inventory->contact_email, $inventory->name)
+ ->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->id]))
+ ->view('shop::emails.sales.new-inventorysource-shipment');
+ }
+}
diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php
index 5eea36989..759572152 100755
--- a/packages/Webkul/Shop/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php
@@ -479,11 +479,12 @@ return [
'summary' => 'Summary of Invoice',
],
'shipment' => [
- 'heading' => 'Your Shipment #:shipment_id for Order #:order_id',
+ 'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
'subject' => 'Shipment for your order #:order_id',
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
- 'tracking-number' => 'Tracking Number'
+ 'tracking-number' => 'Tracking Number',
+ 'greeting' => 'An Order :order_id has been placed on :created_at',
],
'forget-password' => [
'dear' => 'Dear :name',
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
new file mode 100644
index 000000000..1b86b2525
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
@@ -0,0 +1,145 @@
+@component('shop::emails.layouts.master')
+
+
+ order; ?>
+ inventory_source; ?>
+
+
+
+
+ {{ __('shop::app.mail.shipment.heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
+
+
+
+ {{ __('shop::app.mail.order.dear', ['customer_name' => $inventory->name]) }},
+
+
+
+ {!! __('shop::app.mail.shipment.greeting', [
+ 'order_id' => '#' . $order->id . ' ',
+ 'created_at' => $order->created_at
+ ])
+ !!}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-address') }}
+
+
+
+ {{ $order->shipping_address->name }}
+
+
+
+ {{ $order->shipping_address->address1 }}, {{ $order->shipping_address->state }}
+
+
+
+ {{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.shipping') }}
+
+
+
+
+ {{ $order->shipping_title }}
+
+
+
+ {{ __('shop::app.mail.shipment.carrier') }} : {{ $shipment->carrier_title }}
+
+
+
+ {{ __('shop::app.mail.shipment.tracking-number') }} : {{ $shipment->track_number }}
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.billing-address') }}
+
+
+
+ {{ $order->billing_address->name }}
+
+
+
+ {{ $order->billing_address->address1 }}, {{ $order->billing_address->state }}
+
+
+
+ {{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.payment') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+ @foreach ($shipment->items as $item)
+
+ {{ $item->child ? $item->child->sku : $item->sku }}
+ {{ $item->name }}
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+ {{ $item->qty }}
+
+ @endforeach
+
+
+
+
+
+ {{--
--}}
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
index f05837942..811fd20b4 100755
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
@@ -21,7 +21,7 @@
{!! __('shop::app.mail.order.greeting', [
'order_id' => '#' . $order->id . ' ',
'created_at' => $order->created_at
- ])
+ ])
!!}
@@ -51,7 +51,7 @@
---
- {{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
@@ -93,7 +93,7 @@
---
- {{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
@@ -106,46 +106,39 @@
- @foreach ($shipment->items as $item)
-
-
- {{ $item->name }}
-
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
-
-
- {{ __('shop::app.mail.order.price') }}
-
-
- {{ core()->formatPrice($item->price, $order->order_currency_code) }}
-
-
-
-
-
- {{ __('shop::app.mail.order.quantity') }}
-
-
- {{ $item->qty }}
-
-
-
- @if ($html = $item->getOptionDetailHtml())
-
-
- {{ $html }}
-
-
- @endif
+
+ @foreach ($shipment->items as $item)
+
+ {{ $item->child ? $item->child->sku : $item->sku }}
+ {{ $item->name }}
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+ {{ $item->qty }}
+
+ @endforeach
+
+
- @endforeach
+
- {!!
+ {!!
__('shop::app.mail.order.help', [
'support_email' => '' . config('mail.from.address'). ' '
- ])
+ ])
!!}
From 642ef2b1c15b37914803419a1fa2b5f1b4ba167f Mon Sep 17 00:00:00 2001
From: naresh verma
Date: Tue, 9 Apr 2019 17:23:37 +0530
Subject: [PATCH 04/11] reverting config changes
---
config/debugbar.php | 8 ++--
config/excel.php | 98 +++++------------------------------------
config/tinker.php | 6 +--
config/translatable.php | 18 +-------
config/trustedproxy.php | 21 ++++-----
5 files changed, 28 insertions(+), 123 deletions(-)
diff --git a/config/debugbar.php b/config/debugbar.php
index 72ccd7bd3..d5a8dbd67 100755
--- a/config/debugbar.php
+++ b/config/debugbar.php
@@ -9,7 +9,7 @@ return [
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
- |
+ |
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
@@ -79,7 +79,7 @@ return [
|
*/
'error_handler' => false,
-
+
/*
|--------------------------------------------------------------------------
| Clockwork integration
@@ -143,7 +143,7 @@ return [
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
- 'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
+ 'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
@@ -198,4 +198,4 @@ return [
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
-];
+];
\ No newline at end of file
diff --git a/config/excel.php b/config/excel.php
index 37695184f..28cf95fd1 100755
--- a/config/excel.php
+++ b/config/excel.php
@@ -3,7 +3,6 @@
use Maatwebsite\Excel\Excel;
return [
-
'exports' => [
/*
@@ -17,6 +16,17 @@ return [
*/
'chunk_size' => 1000,
+ /*
+ |--------------------------------------------------------------------------
+ | Temporary path
+ |--------------------------------------------------------------------------
+ |
+ | When exporting files, we use a temporary file, before storing
+ | or downloading. Here you can customize that path.
+ |
+ */
+ 'temp_path' => sys_get_temp_dir(),
+
/*
|--------------------------------------------------------------------------
| Pre-calculate formulas during export
@@ -59,23 +69,6 @@ return [
*/
'formatter' => 'slug',
],
-
- /*
- |--------------------------------------------------------------------------
- | CSV Settings
- |--------------------------------------------------------------------------
- |
- | Configure e.g. delimiter, enclosure and line ending for CSV imports.
- |
- */
- 'csv' => [
- 'delimiter' => ',',
- 'enclosure' => '"',
- 'line_ending' => PHP_EOL,
- 'use_bom' => false,
- 'include_separator_line' => false,
- 'excel_compatibility' => false,
- ],
],
/*
@@ -116,71 +109,4 @@ return [
*/
'pdf' => Excel::DOMPDF,
],
-
- 'value_binder' => [
-
- /*
- |--------------------------------------------------------------------------
- | Default Value Binder
- |--------------------------------------------------------------------------
- |
- | PhpSpreadsheet offers a way to hook into the process of a value being
- | written to a cell. In there some assumptions are made on how the
- | value should be formatted. If you want to change those defaults,
- | you can implement your own default value binder.
- |
- */
- 'default' => Maatwebsite\Excel\DefaultValueBinder::class,
- ],
-
- 'transactions' => [
-
- /*
- |--------------------------------------------------------------------------
- | Transaction Handler
- |--------------------------------------------------------------------------
- |
- | By default the import is wrapped in a transaction. This is useful
- | for when an import may fail and you want to retry it. With the
- | transactions, the previous import gets rolled-back.
- |
- | You can disable the transaction handler by setting this to null.
- | Or you can choose a custom made transaction handler here.
- |
- | Supported handlers: null|db
- |
- */
- 'handler' => 'db',
- ],
-
- 'temporary_files' => [
-
- /*
- |--------------------------------------------------------------------------
- | Local Temporary Path
- |--------------------------------------------------------------------------
- |
- | When exporting and importing files, we use a temporary file, before
- | storing reading or downloading. Here you can customize that path.
- |
- */
- 'local_path' => sys_get_temp_dir(),
-
- /*
- |--------------------------------------------------------------------------
- | Remote Temporary Disk
- |--------------------------------------------------------------------------
- |
- | When dealing with a multi server setup with queues in which you
- | cannot rely on having a shared local temporary path, you might
- | want to store the temporary file on a shared disk. During the
- | queue executing, we'll retrieve the temporary file from that
- | location instead. When left to null, it will always use
- | the local path. This setting only has effect when using
- | in conjunction with queued imports and exports.
- |
- */
- 'remote_disk' => null,
-
- ],
-];
+];
\ No newline at end of file
diff --git a/config/tinker.php b/config/tinker.php
index 0d2bf00e7..f8e4b58b1 100755
--- a/config/tinker.php
+++ b/config/tinker.php
@@ -28,8 +28,6 @@ return [
|
*/
- 'dont_alias' => [
- 'App\Nova',
- ],
+ 'dont_alias' => [],
-];
+];
\ No newline at end of file
diff --git a/config/translatable.php b/config/translatable.php
index 87f898b4e..17bf04aac 100755
--- a/config/translatable.php
+++ b/config/translatable.php
@@ -39,8 +39,6 @@ return [
| As a default locale, Translatable takes the locale of Laravel's
| translator. If for some reason you want to override this,
| you can specify what default should be used here.
- | If you set a value here it will only use the current config value
- | and never fallback to the translator one.
|
*/
'locale' => null,
@@ -56,7 +54,7 @@ return [
| $useTranslationFallback when defined
|
*/
- 'use_fallback' => false,
+ 'use_fallback' => true,
/*
|--------------------------------------------------------------------------
@@ -82,18 +80,6 @@ return [
*/
'fallback_locale' => 'en',
- /*
- |--------------------------------------------------------------------------
- | Translation Model Namespace
- |--------------------------------------------------------------------------
- |
- | Defines the default 'Translation' class namespace. For example, if
- | you want to use App\Translations\CountryTranslation instead of App\CountryTranslation
- | set this to 'App\Translations'.
- |
- */
- 'translation_model_namespace' => null,
-
/*
|--------------------------------------------------------------------------
| Translation Suffix
@@ -127,4 +113,4 @@ return [
|
*/
'to_array_always_loads_translations' => true,
-];
+];
\ No newline at end of file
diff --git a/config/trustedproxy.php b/config/trustedproxy.php
index e242b0da5..6f8257058 100755
--- a/config/trustedproxy.php
+++ b/config/trustedproxy.php
@@ -15,36 +15,31 @@ return [
* of your proxy (e.g. if using ELB or similar).
*
*/
- 'proxies' => null, // [,], '*', ','
+ 'proxies' => null, // [,], '*'
/*
* To trust one or more specific proxies that connect
- * directly to your server, use an array or a string separated by comma of IP addresses:
+ * directly to your server, use an array of IP addresses:
*/
- // 'proxies' => ['192.168.1.1'],
- // 'proxies' => '192.168.1.1, 192.168.1.2',
+ # 'proxies' => ['192.168.1.1'],
/*
* Or, to trust all proxies that connect
* directly to your server, use a "*"
*/
- // 'proxies' => '*',
+ # 'proxies' => '*',
/*
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
- *
+ *
* Options include:
- *
+ *
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
- * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
*
- * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
- * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
- * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
- *
* @link https://symfony.com/doc/current/deployment/proxies.html
*/
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
-];
+
+];
\ No newline at end of file
From e5d71fa280ec396452f6bcf97e2612e4f4ad044a Mon Sep 17 00:00:00 2001
From: rahul shukla
Date: Tue, 9 Apr 2019 17:59:58 +0530
Subject: [PATCH 05/11] change in jquery for wishlist icon for zoom
---
packages/Webkul/Shop/src/Resources/assets/sass/app.scss | 4 ++++
.../src/Resources/views/products/view/gallery.blade.php | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
index 52a805476..9aa6262f0 100755
--- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
+++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
@@ -3487,6 +3487,10 @@ section.review {
}
}
+.show-wishlist {
+ z-index: -1 !important;
+}
+
/// rtl css start here
.rtl {
direction: rtl;
diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
index 33b25dcb9..af4db244f 100755
--- a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
@@ -161,12 +161,12 @@
});
$(document).mousemove(function(event) {
- if ( (event.pageX - $('.product-hero-image').offset().left > 440 ) && (event.pageX - $('.product-hero-image').offset().left < 465) && (event.pageY - $('.product-hero-image').offset().top > 16) && (event.pageY - $('.product-hero-image').offset().top < 38)) {
+ if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
- $('.zoomContainer').attr('style', 'z-index: -1 !important');
+ $(".zoomContainer").addClass("show-wishlist");
} else {
- $('.zoomContainer').css({"position": "absolute", "z-index": "999" });
+ $(".zoomContainer").removeClass("show-wishlist");
}
});
})
From b6a1a05e66e81a3e1e4dd0238b21dcfcad9fedd7 Mon Sep 17 00:00:00 2001
From: rahul shukla
Date: Tue, 9 Apr 2019 18:52:03 +0530
Subject: [PATCH 06/11] added permission of add & delete in acl
---
packages/Webkul/Admin/src/Config/acl.php | 189 ++++++++++++++++--
.../Admin/src/Resources/lang/ar/app.php | 2 +
.../Admin/src/Resources/lang/en/app.php | 2 +
.../Admin/src/Resources/lang/pt_BR/app.php | 2 +
4 files changed, 183 insertions(+), 12 deletions(-)
diff --git a/packages/Webkul/Admin/src/Config/acl.php b/packages/Webkul/Admin/src/Config/acl.php
index 56cc3663e..86805a05d 100755
--- a/packages/Webkul/Admin/src/Config/acl.php
+++ b/packages/Webkul/Admin/src/Config/acl.php
@@ -36,41 +36,81 @@ return [
'name' => 'admin::app.acl.products',
'route' => 'admin.catalog.products.index',
'sort' => 1
+ ], [
+ 'key' => 'catalog.products.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.catalog.products.create',
+ 'sort' => 1
], [
'key' => 'catalog.products.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.catalog.products.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'catalog.products.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.catalog.products.delete',
+ 'sort' => 3
], [
'key' => 'catalog.categories',
'name' => 'admin::app.acl.categories',
'route' => 'admin.catalog.categories.index',
'sort' => 2
+ ], [
+ 'key' => 'catalog.categories.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.catalog.categories.create',
+ 'sort' => 1
], [
'key' => 'catalog.categories.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.catalog.categories.edit',
'sort' => 2
+ ], [
+ 'key' => 'catalog.categories.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.catalog.categories.delete',
+ 'sort' => 3
], [
'key' => 'catalog.attributes',
'name' => 'admin::app.acl.attributes',
'route' => 'admin.catalog.attributes.index',
'sort' => 3
+ ], [
+ 'key' => 'catalog.attributes.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.catalog.attributes.create',
+ 'sort' => 1
], [
'key' => 'catalog.attributes.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.catalog.attributes.edit',
+ 'sort' => 2
+ ], [
+ 'key' => 'catalog.attributes.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.catalog.attributes.delete',
'sort' => 3
], [
'key' => 'catalog.families',
'name' => 'admin::app.acl.attribute-families',
'route' => 'admin.catalog.families.index',
'sort' => 4
+ ], [
+ 'key' => 'catalog.families.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.catalog.families.create',
+ 'sort' => 1
], [
'key' => 'catalog.families.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.catalog.families.edit',
- 'sort' => 4
+ 'sort' => 2
+ ], [
+ 'key' => 'catalog.families.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.catalog.families.delete',
+ 'sort' => 3
], [
'key' => 'customers',
'name' => 'admin::app.acl.customers',
@@ -81,21 +121,41 @@ return [
'name' => 'admin::app.acl.customers',
'route' => 'admin.customer.index',
'sort' => 1
+ ], [
+ 'key' => 'customers.customers.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.customer.create',
+ 'sort' => 1
], [
'key' => 'customers.customers.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.customer.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'customers.customers.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.customer.delete',
+ 'sort' => 3
], [
'key' => 'customers.groups',
'name' => 'admin::app.acl.groups',
'route' => 'admin.groups.index',
'sort' => 2
+ ], [
+ 'key' => 'customers.groups.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.groups.create',
+ 'sort' => 1
], [
'key' => 'customers.groups.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.groups.edit',
'sort' => 2
+ ], [
+ 'key' => 'customers.groups.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.groups.delete',
+ 'sort' => 3
], [
'key' => 'customers.reviews',
'name' => 'admin::app.acl.reviews',
@@ -105,7 +165,12 @@ return [
'key' => 'customers.reviews.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.customer.review.edit',
- 'sort' => 3
+ 'sort' => 1
+ ], [
+ 'key' => 'customers.reviews.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.customer.review.delete',
+ 'sort' => 2
], [
'key' => 'configuration',
'name' => 'admin::app.acl.configure',
@@ -121,51 +186,101 @@ return [
'name' => 'admin::app.acl.locales',
'route' => 'admin.locales.index',
'sort' => 1
+ ], [
+ 'key' => 'settings.locales.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.locales.create',
+ 'sort' => 1
], [
'key' => 'settings.locales.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.locales.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.locales.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.locales.delete',
+ 'sort' => 3
], [
'key' => 'settings.currencies',
'name' => 'admin::app.acl.currencies',
'route' => 'admin.currencies.index',
'sort' => 2
+ ], [
+ 'key' => 'settings.currencies.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.currencies.create',
+ 'sort' => 1
], [
'key' => 'settings.currencies.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.currencies.edit',
'sort' => 2
+ ], [
+ 'key' => 'settings.currencies.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.currencies.delete',
+ 'sort' => 3
], [
'key' => 'settings.exchange_rates',
'name' => 'admin::app.acl.exchange-rates',
'route' => 'admin.exchange_rates.index',
'sort' => 3
+ ], [
+ 'key' => 'settings.exchange_rates.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.exchange_rates.create',
+ 'sort' => 1
], [
'key' => 'settings.exchange_rates.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.exchange_rates.edit',
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.exchange_rates.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.exchange_rates.delete',
'sort' => 3
], [
'key' => 'settings.inventory_sources',
'name' => 'admin::app.acl.inventory-sources',
'route' => 'admin.inventory_sources.index',
'sort' => 4
+ ], [
+ 'key' => 'settings.inventory_sources.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.inventory_sources.create',
+ 'sort' => 1
], [
'key' => 'settings.inventory_sources.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.inventory_sources.edit',
- 'sort' => 4
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.inventory_sources.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.inventory_sources.delete',
+ 'sort' => 3
], [
'key' => 'settings.channels',
'name' => 'admin::app.acl.channels',
'route' => 'admin.channels.index',
'sort' => 5
+ ], [
+ 'key' => 'settings.channels.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.channels.create',
+ 'sort' => 1
], [
'key' => 'settings.channels.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.channels.edit',
- 'sort' => 5
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.channels.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.channels.delete',
+ 'sort' => 3
], [
'key' => 'settings.users',
'name' => 'admin::app.acl.users',
@@ -176,31 +291,61 @@ return [
'name' => 'admin::app.acl.users',
'route' => 'admin.users.index',
'sort' => 1
+ ], [
+ 'key' => 'settings.users.users.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.users.create',
+ 'sort' => 1
], [
'key' => 'settings.users.users.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.users.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.users.users.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.users.delete',
+ 'sort' => 3
], [
'key' => 'settings.users.roles',
'name' => 'admin::app.acl.roles',
'route' => 'admin.roles.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.users.roles.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.roles.create',
'sort' => 1
], [
'key' => 'settings.users.roles.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.roles.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.users.roles.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.roles.delete',
+ 'sort' => 3
], [
'key' => 'settings.sliders',
'name' => 'admin::app.acl.sliders',
'route' => 'admin.sliders.index',
'sort' => 7
+ ], [
+ 'key' => 'settings.sliders.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.sliders.create',
+ 'sort' => 1
], [
'key' => 'settings.sliders.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.sliders.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.sliders.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.sliders.delete',
+ 'sort' => 3
], [
'key' => 'settings.taxes',
'name' => 'admin::app.acl.taxes',
@@ -211,21 +356,41 @@ return [
'name' => 'admin::app.acl.tax-categories',
'route' => 'admin.tax-categories.index',
'sort' => 1
+ ], [
+ 'key' => 'settings.taxes.tax-categories.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.tax-categories.create',
+ 'sort' => 1
], [
'key' => 'settings.taxes.tax-categories.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.tax-categories.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.taxes.tax-categories.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.tax-categories.delete',
+ 'sort' => 3
], [
'key' => 'settings.taxes.tax-rates',
'name' => 'admin::app.acl.tax-rates',
'route' => 'admin.tax-rates.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.taxes.tax-rates.create',
+ 'name' => 'admin::app.acl.create',
+ 'route' => 'admin.tax-rates.create',
'sort' => 1
], [
'key' => 'settings.taxes.tax-rates.edit',
'name' => 'admin::app.acl.edit',
'route' => 'admin.tax-rates.edit',
- 'sort' => 1
+ 'sort' => 2
+ ], [
+ 'key' => 'settings.taxes.tax-rates.delete',
+ 'name' => 'admin::app.acl.delete',
+ 'route' => 'admin.tax-rates.delete',
+ 'sort' => 3
]
];
diff --git a/packages/Webkul/Admin/src/Resources/lang/ar/app.php b/packages/Webkul/Admin/src/Resources/lang/ar/app.php
index 5d2530121..47e83ea0f 100644
--- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php
@@ -69,6 +69,8 @@ return [
'tax-categories' => 'فئات الضرائب',
'tax-rates' => 'المعدلات الضريبية',
'edit' => 'Edit',
+ 'create' => 'Add',
+ 'delete' => 'Delete',
],
'dashboard' => [
'title' => 'لوحة العدادات',
diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php
index b048c62f9..eee6217bc 100755
--- a/packages/Webkul/Admin/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php
@@ -71,6 +71,8 @@ return [
'tax-categories' => 'Tax Categories',
'tax-rates' => 'Tax Rates',
'edit' => 'Edit',
+ 'create' => 'Add',
+ 'delete' => 'Delete',
],
'dashboard' => [
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 3987989f7..f4a87ce6d 100755
--- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
@@ -71,6 +71,8 @@ return [
'tax-categories' => 'Categorias de Impostos',
'tax-rates' => 'Impostos de Impostos',
'edit' => 'Edit',
+ 'create' => 'Add',
+ 'delete' => 'Delete',
],
'dashboard' => [
From ab4c054292458e96cca95a0ea9a8ced89f8c8603 Mon Sep 17 00:00:00 2001
From: naresh verma
Date: Tue, 9 Apr 2019 18:52:44 +0530
Subject: [PATCH 07/11] changed shipment table
---
packages/Webkul/Shop/src/Resources/lang/en/app.php | 1 +
.../sales/new-inventorysource-shipment.blade.php | 10 +++++++++-
.../Resources/views/emails/sales/new-order.blade.php | 12 ++++++------
.../views/emails/sales/new-shipment.blade.php | 9 +++++++++
4 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php
index 759572152..d091218cc 100755
--- a/packages/Webkul/Shop/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php
@@ -480,6 +480,7 @@ return [
],
'shipment' => [
'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
+ 'inventory-heading' => 'New Shipment #:shipment_id had been generated for Order #:order_id',
'subject' => 'Shipment for your order #:order_id',
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
index 1b86b2525..0ba591f6d 100644
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
@@ -11,7 +11,7 @@
- {{ __('shop::app.mail.shipment.heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
+ {{ __('shop::app.mail.shipment.inventory-heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
@@ -126,6 +126,14 @@
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
{{ $item->qty }}
+
+ @if ($html = $item->getOptionDetailHtml())
+
+
+ {{ $html }}
+
+
+ @endif
@endforeach
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php
index daf9654b5..8095cc78a 100755
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php
@@ -19,7 +19,7 @@
{!! __('shop::app.mail.order.greeting', [
'order_id' => '
#' . $order->id . ' ',
'created_at' => $order->created_at
- ])
+ ])
!!}
@@ -49,7 +49,7 @@
---
- {{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
@@ -81,7 +81,7 @@
---
- {{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
+ {{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
@@ -117,7 +117,7 @@
{{ $item->qty_ordered }}
-
+
@if ($html = $item->getOptionDetailHtml())
@@ -164,10 +164,10 @@
- {!!
+ {!!
__('shop::app.mail.order.help', [
'support_email' => '' . config('mail.from.address'). ' '
- ])
+ ])
!!}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
index 811fd20b4..e9d457e55 100755
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
@@ -126,7 +126,16 @@
{{ $item->name }}
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
{{ $item->qty }}
+
+ @if ($html = $item->getOptionDetailHtml())
+
+
+ {{ $html }}
+
+
+ @endif
+
@endforeach
From 4f999ee34a270f1913cbd86e6dbe7b69eac1b842 Mon Sep 17 00:00:00 2001
From: naresh verma
Date: Tue, 9 Apr 2019 19:40:43 +0530
Subject: [PATCH 08/11] changed shipment table content
---
packages/Webkul/Shop/src/Resources/lang/en/app.php | 5 +++--
.../emails/sales/new-inventorysource-shipment.blade.php | 6 +++---
.../src/Resources/views/emails/sales/new-shipment.blade.php | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php
index d091218cc..dac33cd0b 100755
--- a/packages/Webkul/Shop/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php
@@ -461,8 +461,8 @@ return [
'shipping-address' => 'Shipping Address',
'billing-address' => 'Billing Address',
'contact' => 'Contact',
- 'shipping' => 'Shipping',
- 'payment' => 'Payment',
+ 'shipping' => 'Shipping Method',
+ 'payment' => 'Payment Method',
'price' => 'Price',
'quantity' => 'Quantity',
'subtotal' => 'Subtotal',
@@ -482,6 +482,7 @@ return [
'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
'inventory-heading' => 'New Shipment #:shipment_id had been generated for Order #:order_id',
'subject' => 'Shipment for your order #:order_id',
+ 'inventory-subject' => 'New Shipment had been generated for Order #:order_id',
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
'tracking-number' => 'Tracking Number',
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
index 0ba591f6d..345115895 100644
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-inventorysource-shipment.blade.php
@@ -53,7 +53,7 @@
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
-
+
{{ __('shop::app.mail.order.shipping') }}
@@ -95,11 +95,11 @@
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
-
+
{{ __('shop::app.mail.order.payment') }}
-
+
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
diff --git a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
index e9d457e55..c24dea6ed 100755
--- a/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/emails/sales/new-shipment.blade.php
@@ -54,7 +54,7 @@
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
-
+
{{ __('shop::app.mail.order.shipping') }}
@@ -96,7 +96,7 @@
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
-
+
{{ __('shop::app.mail.order.payment') }}
From f3f61e3c91c40e98ce4c61de702e88a237f615f8 Mon Sep 17 00:00:00 2001
From: jitendra
Date: Wed, 10 Apr 2019 12:10:46 +0530
Subject: [PATCH 09/11] Optimized performance
---
composer.json | 6 +-
config/jwt.php | 304 ++++++++++++++++++
.../src/Repositories/AttributeRepository.php | 4 +
.../src/Repositories/CategoryRepository.php | 15 +-
.../src/Contracts/Criteria/ProductFlat.php | 0
.../Product/src/Helpers/ProductImage.php | 16 +-
packages/Webkul/Product/src/Helpers/View.php | 55 ++--
.../Resources/views/products/index.blade.php | 4 +-
.../views/products/list/card.blade.php | 18 +-
.../product/large-product-placeholder.png | Bin 0 -> 12914 bytes
.../product/meduim-product-placeholder.png | Bin 0 -> 7119 bytes
.../product/small-product-placeholder.png | Bin 0 -> 2412 bytes
12 files changed, 362 insertions(+), 60 deletions(-)
create mode 100644 config/jwt.php
delete mode 100644 packages/Webkul/Product/src/Contracts/Criteria/ProductFlat.php
create mode 100755 packages/Webkul/Ui/src/Resources/assets/images/product/large-product-placeholder.png
create mode 100755 packages/Webkul/Ui/src/Resources/assets/images/product/meduim-product-placeholder.png
create mode 100755 packages/Webkul/Ui/src/Resources/assets/images/product/small-product-placeholder.png
diff --git a/composer.json b/composer.json
index 48c2fa1f2..6ebf4ccf6 100755
--- a/composer.json
+++ b/composer.json
@@ -9,12 +9,12 @@
"type": "project",
"require": {
"php": "^7.1.3",
+ "ext-curl": "*",
+ "ext-mbstring": "*",
"ext-openssl": "*",
"ext-pdo": "*",
- "ext-mbstring": "*",
- "ext-tokenizer": "*",
"ext-pdo_mysql": "*",
- "ext-curl": "*",
+ "ext-tokenizer": "*",
"barryvdh/laravel-dompdf": "^0.8.0@dev",
"dimsav/laravel-translatable": "^9.0",
"doctrine/dbal": "^2.9@dev",
diff --git a/config/jwt.php b/config/jwt.php
new file mode 100644
index 000000000..8b7843b6b
--- /dev/null
+++ b/config/jwt.php
@@ -0,0 +1,304 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Authentication Secret
+ |--------------------------------------------------------------------------
+ |
+ | Don't forget to set this in your .env file, as it will be used to sign
+ | your tokens. A helper command is provided for this:
+ | `php artisan jwt:secret`
+ |
+ | Note: This will be used for Symmetric algorithms only (HMAC),
+ | since RSA and ECDSA use a private/public key combo (See below).
+ |
+ */
+
+ 'secret' => env('JWT_SECRET'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Authentication Keys
+ |--------------------------------------------------------------------------
+ |
+ | The algorithm you are using, will determine whether your tokens are
+ | signed with a random string (defined in `JWT_SECRET`) or using the
+ | following public & private keys.
+ |
+ | Symmetric Algorithms:
+ | HS256, HS384 & HS512 will use `JWT_SECRET`.
+ |
+ | Asymmetric Algorithms:
+ | RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
+ |
+ */
+
+ 'keys' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Public Key
+ |--------------------------------------------------------------------------
+ |
+ | A path or resource to your public key.
+ |
+ | E.g. 'file://path/to/public/key'
+ |
+ */
+
+ 'public' => env('JWT_PUBLIC_KEY'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Private Key
+ |--------------------------------------------------------------------------
+ |
+ | A path or resource to your private key.
+ |
+ | E.g. 'file://path/to/private/key'
+ |
+ */
+
+ 'private' => env('JWT_PRIVATE_KEY'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Passphrase
+ |--------------------------------------------------------------------------
+ |
+ | The passphrase for your private key. Can be null if none set.
+ |
+ */
+
+ 'passphrase' => env('JWT_PASSPHRASE'),
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT time to live
+ |--------------------------------------------------------------------------
+ |
+ | Specify the length of time (in minutes) that the token will be valid for.
+ | Defaults to 1 hour.
+ |
+ | You can also set this to null, to yield a never expiring token.
+ | Some people may want this behaviour for e.g. a mobile app.
+ | This is not particularly recommended, so make sure you have appropriate
+ | systems in place to revoke the token if necessary.
+ | Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
+ |
+ */
+
+ 'ttl' => env('JWT_TTL', 60),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Refresh time to live
+ |--------------------------------------------------------------------------
+ |
+ | Specify the length of time (in minutes) that the token can be refreshed
+ | within. I.E. The user can refresh their token within a 2 week window of
+ | the original token being created until they must re-authenticate.
+ | Defaults to 2 weeks.
+ |
+ | You can also set this to null, to yield an infinite refresh time.
+ | Some may want this instead of never expiring tokens for e.g. a mobile app.
+ | This is not particularly recommended, so make sure you have appropriate
+ | systems in place to revoke the token if necessary.
+ |
+ */
+
+ 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT hashing algorithm
+ |--------------------------------------------------------------------------
+ |
+ | Specify the hashing algorithm that will be used to sign the token.
+ |
+ | See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
+ | for possible values.
+ |
+ */
+
+ 'algo' => env('JWT_ALGO', 'HS256'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Required Claims
+ |--------------------------------------------------------------------------
+ |
+ | Specify the required claims that must exist in any token.
+ | A TokenInvalidException will be thrown if any of these claims are not
+ | present in the payload.
+ |
+ */
+
+ 'required_claims' => [
+ 'iss',
+ 'iat',
+ 'exp',
+ 'nbf',
+ 'sub',
+ 'jti',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Persistent Claims
+ |--------------------------------------------------------------------------
+ |
+ | Specify the claim keys to be persisted when refreshing a token.
+ | `sub` and `iat` will automatically be persisted, in
+ | addition to the these claims.
+ |
+ | Note: If a claim does not exist then it will be ignored.
+ |
+ */
+
+ 'persistent_claims' => [
+ // 'foo',
+ // 'bar',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Lock Subject
+ |--------------------------------------------------------------------------
+ |
+ | This will determine whether a `prv` claim is automatically added to
+ | the token. The purpose of this is to ensure that if you have multiple
+ | authentication models e.g. `App\User` & `App\OtherPerson`, then we
+ | should prevent one authentication request from impersonating another,
+ | if 2 tokens happen to have the same id across the 2 different models.
+ |
+ | Under specific circumstances, you may want to disable this behaviour
+ | e.g. if you only have one authentication model, then you would save
+ | a little on token size.
+ |
+ */
+
+ 'lock_subject' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Leeway
+ |--------------------------------------------------------------------------
+ |
+ | This property gives the jwt timestamp claims some "leeway".
+ | Meaning that if you have any unavoidable slight clock skew on
+ | any of your servers then this will afford you some level of cushioning.
+ |
+ | This applies to the claims `iat`, `nbf` and `exp`.
+ |
+ | Specify in seconds - only if you know you need it.
+ |
+ */
+
+ 'leeway' => env('JWT_LEEWAY', 0),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Blacklist Enabled
+ |--------------------------------------------------------------------------
+ |
+ | In order to invalidate tokens, you must have the blacklist enabled.
+ | If you do not want or need this functionality, then set this to false.
+ |
+ */
+
+ 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
+
+ /*
+ | -------------------------------------------------------------------------
+ | Blacklist Grace Period
+ | -------------------------------------------------------------------------
+ |
+ | When multiple concurrent requests are made with the same JWT,
+ | it is possible that some of them fail, due to token regeneration
+ | on every request.
+ |
+ | Set grace period in seconds to prevent parallel request failure.
+ |
+ */
+
+ 'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cookies encryption
+ |--------------------------------------------------------------------------
+ |
+ | By default Laravel encrypt cookies for security reason.
+ | If you decide to not decrypt cookies, you will have to configure Laravel
+ | to not encrypt your cookie token by adding its name into the $except
+ | array available in the middleware "EncryptCookies" provided by Laravel.
+ | see https://laravel.com/docs/master/responses#cookies-and-encryption
+ | for details.
+ |
+ | Set it to true if you want to decrypt cookies.
+ |
+ */
+
+ 'decrypt_cookies' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Providers
+ |--------------------------------------------------------------------------
+ |
+ | Specify the various providers used throughout the package.
+ |
+ */
+
+ 'providers' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to create and decode the tokens.
+ |
+ */
+
+ 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authentication Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to authenticate users.
+ |
+ */
+
+ 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Storage Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to store tokens in the blacklist.
+ |
+ */
+
+ 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
+
+ ],
+
+];
diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php
index 26d79cd65..fbec30646 100755
--- a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php
+++ b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php
@@ -144,6 +144,10 @@ class AttributeRepository extends Repository
$data['is_filterable'] = 0;
}
+ if (in_array($data['type'], ['select', 'multiselect', 'boolean'])) {
+ unset($data['value_per_locale']);
+ }
+
return $data;
}
diff --git a/packages/Webkul/Category/src/Repositories/CategoryRepository.php b/packages/Webkul/Category/src/Repositories/CategoryRepository.php
index 476d148c9..ec23041e3 100755
--- a/packages/Webkul/Category/src/Repositories/CategoryRepository.php
+++ b/packages/Webkul/Category/src/Repositories/CategoryRepository.php
@@ -99,9 +99,18 @@ class CategoryRepository extends Repository
*/
public function getVisibleCategoryTree($id = null)
{
- return $id
- ? Category::orderBy('position', 'ASC')->where('status', 1)->descendantsOf($id)->toTree()
- : Category::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
+ static $categories;
+
+ if ($categories[$id])
+ return $categories[$id];
+
+ if ($id) {
+ $categories[$id] = Category::orderBy('position', 'ASC')->where('status', 1)->descendantsOf($id)->toTree();
+ } else {
+ $categories[$id] = Category::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
+ }
+
+ return $categories[$id];
}
/**
diff --git a/packages/Webkul/Product/src/Contracts/Criteria/ProductFlat.php b/packages/Webkul/Product/src/Contracts/Criteria/ProductFlat.php
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/Webkul/Product/src/Helpers/ProductImage.php b/packages/Webkul/Product/src/Helpers/ProductImage.php
index c486f725a..b4769d530 100755
--- a/packages/Webkul/Product/src/Helpers/ProductImage.php
+++ b/packages/Webkul/Product/src/Helpers/ProductImage.php
@@ -33,10 +33,10 @@ class ProductImage extends AbstractProduct
if (! $product || (! $product->parent_id && !count($images))) {
$images[] = [
- 'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
- 'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
- 'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
- 'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
+ 'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'),
+ 'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'),
+ 'large_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
+ 'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png')
];
}
@@ -61,10 +61,10 @@ class ProductImage extends AbstractProduct
];
} else {
$image = [
- 'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
- 'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
- 'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
- 'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
+ 'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'),
+ 'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'),
+ 'large_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
+ 'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
];
}
diff --git a/packages/Webkul/Product/src/Helpers/View.php b/packages/Webkul/Product/src/Helpers/View.php
index 9fd300625..2c4904d24 100755
--- a/packages/Webkul/Product/src/Helpers/View.php
+++ b/packages/Webkul/Product/src/Helpers/View.php
@@ -14,58 +14,43 @@ class View extends AbstractProduct
{
$data = [];
- $attributes = $product->attribute_family->custom_attributes;
+ $attributes = $product->attribute_family->custom_attributes()->where('attributes.is_visible_on_front', 1)->get();
$attributeOptionReposotory = app('Webkul\Attribute\Repositories\AttributeOptionRepository');
foreach ($attributes as $attribute) {
if ($attribute->type == 'boolean') {
- $value = $product->{$attribute->code};
- if ($attribute->is_visible_on_front ) {
- if ($value == 1) {
- $value = 'Yes';
- } else {
- $value = 'No';
- }
+ $value = $product->{$attribute->code} ? 'Yes' : 'No';
- $data[] = [
- 'code' => $attribute->code,
- 'label' => $attribute->name,
- 'value' => $value,
- 'admin_name' => $attribute->admin_name,
- ];
- }
- } else if ($attribute->is_visible_on_front && $product->{$attribute->code}) {
+ $data[] = [
+ 'code' => $attribute->code,
+ 'label' => $attribute->name,
+ 'value' => $value,
+ 'admin_name' => $attribute->admin_name,
+ ];
+ } else if ($product->{$attribute->code}) {
$value = $product->{$attribute->code};
if ($attribute->type == 'select') {
$attributeOption = $attributeOptionReposotory->find($value);
if ($attributeOption) {
- $value = $attributeOption->translate(app()->getLocale());
- if ($value) {
- $value = $value->label;
- }
+ $value = $attributeOption->label;
}
- }
+ } else if ($attribute->type == 'multiselect') {
+ $optionIds = explode(",", $value);
- if ($attribute->type == 'multiselect') {
- $values = explode(",", $value);
+ if (count($optionIds)) {
+ $attributeOptions = $attributeOptionReposotory->findWhereIn('id', $optionIds);
- $result = [];
- foreach ($values as $value) {
- $attributeOption = $attributeOptionReposotory->find($value);
-
- if ($attributeOption) {
- $value = $attributeOption->translate(app()->getLocale());
- if ($value) {
- $value = $value->label;
- $result[] = $value;
+ foreach ($attributeOptions as $attributeOption) {
+ if ($attributeOption && $attributeOption->label) {
+ $result[] = $attributeOption->label;
}
}
- }
- $value = implode(", ", $result);
+ $value = implode(", ", $result);
+ }
}
$data[] = [
@@ -73,7 +58,7 @@ class View extends AbstractProduct
'label' => $attribute->name,
'value' => $value,
'admin_name' => $attribute->admin_name,
- ];
+ ];
}
}
diff --git a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php
index b5ccd5c11..a144e1cf6 100755
--- a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php
@@ -49,7 +49,7 @@
@foreach ($products as $productFlat)
- @include ('shop::products.list.card', ['product' => $productFlat->product])
+ @include ('shop::products.list.card', ['productFlat' => $productFlat])
@endforeach
@@ -57,7 +57,7 @@
@foreach ($products as $productFlat)
- @include ('shop::products.list.card', ['product' => $productFlat->product])
+ @include ('shop::products.list.card', ['productFlat' => $productFlat])
@endforeach
diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
index 03eada776..24e19e356 100755
--- a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
@@ -1,19 +1,19 @@
-{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
+{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $productFlat->product]) !!}
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
- getProductBaseImage($product); ?>
+ getProductBaseImage($productFlat->product); ?>
- @if ($product->new)
+ @if ($productFlat->new)
{{ __('shop::app.products.new') }}
@endif
@@ -21,18 +21,18 @@
-{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
\ No newline at end of file
+{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $productFlat->product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Ui/src/Resources/assets/images/product/large-product-placeholder.png b/packages/Webkul/Ui/src/Resources/assets/images/product/large-product-placeholder.png
new file mode 100755
index 0000000000000000000000000000000000000000..e839910ccb43d249c2259100efa6929803ad7bd1
GIT binary patch
literal 12914
zcmeHucT|&2+b6{ENO`1$<|7cg6osIIgbp@9q)Ah$f=Cevk=_##0TB>UqI5+8K}4hr
zfuI3Iq>0o(fY3Xk1*Clw-~G<+U%O||o;~l`Z~X%fbI;r}bI)Am_q(o(SQ8`NBdo_*
z85kIj=<8j$%D})lO8;U03;bs7PB;WQpe{OwIt&aYiEO(!nHU&O%jjRwF%M*196p>z
zBK9&kc{QJN_mmnGIhYI
z&+6IUr^wg~@m1?u9^MeaQfu8vi2P3&F)VxN4(csr@#%ww^+(Y1Hk#
zp`Cj>={CLJ*xgP>b6{r|m%e1KCc-u5JRdm=c`AO6*x#PUZXabf*4Qv#TN(S}?6Wvo
z5--1%E#2g3Mi$lxE(=;2)j_bSy-U{N-<`zSpRK7m2q|6~aLMwV%KEVuXUMJYzi`dx
zV1LiIls4bM7rL{#IJLXI*4EzM&K+merS4kd=GUAki~?Va^V$s7_us&gy3t*kBcwmm&B2affCp`bwjSD
zE6PtEh^ar(_RGv=4#*YIKhFi%&sH@yyRX(A|N15K|FHIlzGQ=FWb#?f6*QI7NJfU(
zdVeoiE_FiCQIm6d$%-p^Ze;Z%!23RR8dB?244zYR^z>8z^k7U)SdQ
ziiKBQ$-{WW)`vt&x$XKJ1KeNNeV5tnrbe8*T7S*2_Fv)`G6JqMsIVowu$9qnIQ1<{S73CxZs+~>YAb?Pr-ZiCs&iGix4A_f$JdN+I(AMUs;L~S*CHyP
zgsb^`@XhSdmJyojsiYh>@6f|Di=@glEBml=m5BY_ldd&2H9HWY2KBoW5v^$)OCJgH
zm*gQrBW8T|c`8lX2gVL)=V!wS_BHll8$AnZ#vK`IG~$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uWm!uxX$_x=N20pnc&
literal 0
HcmV?d00001
diff --git a/packages/Webkul/Ui/src/Resources/assets/images/product/meduim-product-placeholder.png b/packages/Webkul/Ui/src/Resources/assets/images/product/meduim-product-placeholder.png
new file mode 100755
index 0000000000000000000000000000000000000000..0aa66dc5200c0a9b9e96da022f344e7db1004be2
GIT binary patch
literal 7119
zcmeHMXHZk!x=tb`G=FUK&>;|-5Smosqkjkp
z1Vlm!pa=$}HxZ+Lpych*VdMMV
zSWgyK(`-XfLjZlFWTpS5{$TZkzU7E3s%!i`F@hK445aRljgA&CKU>rlylB13Z@hq&
zi2u3Jx1v0~eWUO-YBN+7=*3QD*A%!bs52d`%shb66uc3O8z1AyHMA_kUN%fzR-{-+
zSS5^ZY*LT>Inp+Vor5NQ1Bp?(ubnHp>ianKB$G%_(s?
zCzkT*7)@c>CF6Lm=3h6Qeiq+7XqPU}!lUe3_-%MT`qKspMw>8mr-A$H2eyeq5v!
zaN-arKU`+cwWmmlab0k54SJGe4UuAKoWT7?Q^p*
zT+2}N@x_S-PwlJiLUqMzOf^gUhMh@G=avTU57=(af^>og4weT?{dPWgf~3Oa&I08n
zGRXMwo+Q83RV-4>HFzR;o#l_nzKU^cwp#9?sVv(vRMFZ+bvZd>69SqG@pnL25G=ra
z;SK;5hJBn5ZGkcoT=@PoioV{?!8657e}(H`x%r35fb&D?)`$JCNhA}3$^8}r5RS>i
zh^&zrElA71M?}QFP4q
ziBIC}DQq92j3S5dc?Wha
zx}ZWQTW2?N+%52sszN3Oy9+mq81OD**4i^|J;{l|FEvVMj@P;FoFcF9-*jUM8HE~pzAoAC)?{b;)W=7!``h=twY`{TAP&8aTh+9WO{^<^k=!KlyzEuv
z#92?$>ybh~vzqcZbInSVer6OLZJsGdPUgPaP7)!t;H6ZDZYG$jE0zLb!Qa+4~Bf|e~wEBVh6{+m2zOT~HYtM*C)r@$Fx;d~>IcWdaosseJ
z@zPWw-`AD?x@7;IwdJcyZ=F}pCA&Q`YQ3F|y(#5^_C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%g?aq>F*)2k}_M$`3a|04}bQlO^0_~KeqfdePbLb
z`dB=e_J|rv39v~HsS17RA}>U@dHG0f|A)rbz;(4S4V*UQPXgS7To%5rX1#aA=pf9~
z?D;`DK`3@Vn|aQ>|5f)b!v34zMZ2JDF;?s#TcpQqVAtsdJ)VdnB?R>PAXF~pBW|-#
z6N_}rjfsk(t*)*XWclP)+aNe(?>-uV8p<#m@R+ZIP7a@Fh%BVc)mk0jSzih
zuUn3^s-Fo*6X0B({SFkYUg@uv0J-#M01n|e3ZL1Jn@hIHVx9SGCs>la1GW2(=bt>a
zo+sFX6|hoOqu3#X9?nQZIH{%zmm-;e2gGLDf`zo&mmGny$fGJLI?q$LW&JI0Z*Tpf
zmV$?qP>6M>9afH|T%_kj&~?t0G1dFUa``0xw7jn3xAEdP`%57v|wM!%0{8F
zK@4);SAc=Q_WFR3?$*O(Y&oy_DDlbi_m
zL<2xv3>rPg$^}NjB!Qf8NyB-@<{`wOZkFRh+`%Y4Mz3Ca4>J&qWbiwe2=Z@(5u{{f
z8V86Q$3Ra=5r+bRq}i|tX~#=~Ot6m(x<|Tw3K3m
z!IXl6?z;@vApn+v7W6R?w~j6#L{~Sdf#I43$XWO-goOzfp9o+{`d5Jedk7w~Ms6Pk
VR;Si}W&EK7=xP~hR;Xj~{|2acysrQN
literal 0
HcmV?d00001
diff --git a/packages/Webkul/Ui/src/Resources/assets/images/product/small-product-placeholder.png b/packages/Webkul/Ui/src/Resources/assets/images/product/small-product-placeholder.png
new file mode 100755
index 0000000000000000000000000000000000000000..8526a85f5f5735a9ce2894e304d9ae3dc4fdc259
GIT binary patch
literal 2412
zcmbW3Su`667snGxNh7h82&%TRHkN2@)wB&_>`IGTqP8^A+ES{BsYc!NB}oT_HJnrXCszgm45diX)T%DUMz@S3+nEnl+fzD|B{dB
zXY|+5t8%ONeht}75)xgnT#Jf{@htJQ`NY`z`Z4mm;@-i&XBY2r6A@y3^V2JQY-ngj
z`SpazYflJ)rOYkwa`5>6(jHX7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QYf59
z=n@zZv$W{goj(yp?%Znx7+kwE;hTYBv@Eb<6mK!2B)
zuqy^v3SX#Ri1!Ayv#rxF|4J=4Od^Y_qH2RC(8f>Om6
z$#$ssW@MC|2^qo?>27$W{eKF}x2x`{na>xc^2XS}-ePL&cZ>;ZCTlF^(S++~=M&~B
zbFQBK7w|n42EWN!dw7_s!N>oEH%#pL_B{S!8~4)$+$&{{>wzW2Bu~8&d1{Z}R5Hm0
ztx(Rq^cStm-rHWIbJ6}05sjUJb1Qy-zKxIN27FCxY-}Xxio+XG4SO9DFu!_`_&Y
zufJe<%tMX(HpFe=37d*|TzR#s^!P8nPrxilbLoechz02(qmYTY+mVrfqhqH#?k&Hg
z*)p%TG&PO3#%wu=XM~wNKmY0&OHx;P=x^~F3E@lircw_R%0^UVB{X2I`EISTyRPtV
zOH0di2^eRz)@xyX3zV(Jz2T&gp7y3J>LIl@#izs#Z)>Ur?^6_y33ie>K9rB0Hd%z~
zQ4Ox?3Ji4}ReKj8RU;8-GMpN~eBhuZ3#4}!o*K9{fJ6Rdob1LaJCFOKIMPu4b2(E2
zlXA#9<$9j44Gdkf43^NGSX|My%XFqh=DEOuz(u!TaQdZ$*zYT*X{Xiw{UgZp<5b=o
znak>DS(+ox^
zNmUS)eWFk$zt{~mMDTvld_A!z;j$X#82DnroV7T{qFmj2C5OtsTa*(sB=eAe+}{F1
zoP3%b1g5|I5qvLG(pc>rj!q5;K9#*O#ZCRhrCMFfT68JsW#+!gRcbk=e5pVQOkWLB
z4ZAmGbLdjUivLxJM3jYvz;q56P5$c>n+a
literal 0
HcmV?d00001
From b99b0ad8b5d3cb2ec4d1cd34f5ed254e1f3698a5 Mon Sep 17 00:00:00 2001
From: rahul shukla
Date: Wed, 10 Apr 2019 15:08:01 +0530
Subject: [PATCH 10/11] product attribute & category menu
---
.../products/field-types/multiselect.blade.php | 2 +-
.../Webkul/Shop/src/Resources/assets/sass/app.scss | 1 +
.../Resources/views/products/view/gallery.blade.php | 12 +++++++-----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/multiselect.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/multiselect.blade.php
index f05e1be55..6d2ce65f8 100755
--- a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/multiselect.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/multiselect.blade.php
@@ -1,7 +1,7 @@
@foreach ($attribute->options as $option)
- id, explode(',', $attribute[$attribute->code])) ? 'selected' : ''}}>
+ id, explode(',', $product[$attribute->code])) ? 'selected' : ''}}>
{{ $option->admin_name }}
@endforeach
diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
index 9aa6262f0..ce06c037e 100755
--- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
+++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
@@ -1090,6 +1090,7 @@ section.slider-block {
.nav > li {
float: left;
margin-right: 1px;
+ height: 45px;
}
.nav > li > a {
diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
index af4db244f..7c082ff18 100755
--- a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php
@@ -161,13 +161,15 @@
});
$(document).mousemove(function(event) {
- if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
+ if ($('.add-to-wishlist').length) {
+ if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
- $(".zoomContainer").addClass("show-wishlist");
+ $(".zoomContainer").addClass("show-wishlist");
- } else {
- $(".zoomContainer").removeClass("show-wishlist");
- }
+ } else {
+ $(".zoomContainer").removeClass("show-wishlist");
+ }
+ };
});
})
From f1c263805c4277f1c7f63ed2a2a42a7ecab801c1 Mon Sep 17 00:00:00 2001
From: rahul shukla
Date: Wed, 10 Apr 2019 16:45:52 +0530
Subject: [PATCH 11/11] issues #815
---
.../Product/src/Http/Requests/ProductForm.php | 62 ++++++++++---------
1 file changed, 33 insertions(+), 29 deletions(-)
diff --git a/packages/Webkul/Product/src/Http/Requests/ProductForm.php b/packages/Webkul/Product/src/Http/Requests/ProductForm.php
index 84f954d77..b976795ec 100755
--- a/packages/Webkul/Product/src/Http/Requests/ProductForm.php
+++ b/packages/Webkul/Product/src/Http/Requests/ProductForm.php
@@ -83,38 +83,42 @@ class ProductForm extends FormRequest
$attributes = $product->attribute_family->custom_attributes;
foreach ($attributes as $attribute) {
- if ($attribute->code == 'sku')
- continue;
+ if (! $product->super_attributes->contains($attribute)) {
+ if ($attribute->code == 'sku') {
+ continue;
+ }
- if ($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight']))
- continue;
+ if ($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight'])) {
+ continue;
+ }
- $validations = [];
- if ($attribute->is_required) {
- array_push($validations, 'required');
- } else {
- array_push($validations, 'nullable');
+ $validations = [];
+ if ($attribute->is_required) {
+ array_push($validations, 'required');
+ } else {
+ array_push($validations, 'nullable');
+ }
+
+ if ($attribute->type == 'text' && $attribute->validation) {
+ array_push($validations, $attribute->validation);
+ }
+
+ if ($attribute->type == 'price') {
+ array_push($validations, 'decimal');
+ }
+
+ if ($attribute->is_unique) {
+ array_push($validations, function ($field, $value, $fail) use ($inputs, $attribute) {
+ $column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
+
+ if (!$this->attributeValue->isValueUnique($this->id, $attribute->id, $column, $inputs[$attribute->code])) {
+ $fail('The :attribute has already been taken.');
+ }
+ });
+ }
+
+ $this->rules[$attribute->code] = $validations;
}
-
- if ($attribute->type == 'text' && $attribute->validation) {
- array_push($validations, $attribute->validation);
- }
-
- if ($attribute->type == 'price') {
- array_push($validations, 'decimal');
- }
-
- if ($attribute->is_unique) {
- array_push($validations, function ($field, $value, $fail) use ($inputs, $attribute) {
- $column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
-
- if (!$this->attributeValue->isValueUnique($this->id, $attribute->id, $column, $inputs[$attribute->code])) {
- $fail('The :attribute has already been taken.');
- }
- });
- }
-
- $this->rules[$attribute->code] = $validations;
}
return $this->rules;