merge with master
This commit is contained in:
commit
89aa4ef7f5
|
|
@ -6,6 +6,7 @@
|
|||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/d/total.svg" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/v/stable.svg" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/license.svg" alt="License"></a>
|
||||
<a href="https://github.com/bagisto/bagisto/actions"><img src="https://github.com/bagisto/bagisto/workflows/CI/badge.svg" alt="Backers on Open Collective"></a>
|
||||
<a href="#backers"><img src="https://opencollective.com/bagisto/backers/badge.svg" alt="Backers on Open Collective"></a>
|
||||
<a href="#sponsors"><img src="https://opencollective.com/bagisto/sponsors/badge.svg" alt="Sponsors on Open Collective"></a>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@
|
|||
"ext-pdo": "*",
|
||||
"ext-pdo_mysql": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"algolia/algoliasearch-client-php": "^2.2",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"babenkoivan/elastic-scout-driver": "^1.1",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-dompdf": "0.8.6",
|
||||
"doctrine/dbal": "2.9.2",
|
||||
|
|
@ -30,6 +32,7 @@
|
|||
"kalnoy/nestedset": "5.0.1",
|
||||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "^7.0",
|
||||
"laravel/scout": "^8.0",
|
||||
"laravel/socialite": "^4.4",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'hosts' => [
|
||||
env('ELASTIC_HOST', 'localhost:9200'),
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false)
|
||||
];
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Search Engine
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default search connection that gets used while
|
||||
| using Laravel Scout. This connection is used when syncing all models
|
||||
| to the search service. You should adjust this based on your needs.
|
||||
|
|
||||
| Supported: "algolia", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SCOUT_DRIVER', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a prefix that will be applied to all search index
|
||||
| names used by Scout. This prefix may be useful if you have multiple
|
||||
| "tenants" or applications sharing the same search infrastructure.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('SCOUT_PREFIX', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Data Syncing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to control if the operations that sync your data
|
||||
| with your search engines are queued. When this is set to "true" then
|
||||
| all automatic data syncing will get queued for better performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk Sizes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options allow you to control the maximum chunk size when you are
|
||||
| mass importing data into the search engine. This allows you to fine
|
||||
| tune each of these chunk sizes based on the power of the servers.
|
||||
|
|
||||
*/
|
||||
|
||||
'chunk' => [
|
||||
'searchable' => 500,
|
||||
'unsearchable' => 500,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Soft Deletes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows to control whether to keep soft deleted records in
|
||||
| the search indexes. Maintaining soft deleted records can be useful
|
||||
| if your application still needs to search for the records later.
|
||||
|
|
||||
*/
|
||||
|
||||
'soft_delete' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Algolia Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your Algolia settings. Algolia is a cloud hosted
|
||||
| search engine which works great with Scout out of the box. Just plug
|
||||
| in your application ID and admin API key to get started searching.
|
||||
|
|
||||
*/
|
||||
|
||||
'algolia' => [
|
||||
'id' => env('ALGOLIA_APP_ID', ''),
|
||||
'secret' => env('ALGOLIA_SECRET', ''),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -1,6 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blade File Tracer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Shows blade file path in front
|
||||
|
|
||||
*/
|
||||
|
||||
'tracer' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use Webkul\User\Database\Seeders\DatabaseSeeder as UserSeeder;
|
|||
use Webkul\Customer\Database\Seeders\DatabaseSeeder as CustomerSeeder;
|
||||
use Webkul\Inventory\Database\Seeders\DatabaseSeeder as InventorySeeder;
|
||||
use Webkul\CMS\Database\Seeders\DatabaseSeeder as CMSSeeder;
|
||||
use Webkul\SocialLogin\Database\Seeders\DatabaseSeeder as SocialLoginSeeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
|
@ -27,5 +28,6 @@ class DatabaseSeeder extends Seeder
|
|||
$this->call(UserSeeder::class);
|
||||
$this->call(CustomerSeeder::class);
|
||||
$this->call(CMSSeeder::class);
|
||||
$this->call(SocialLoginSeeder::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,6 +241,8 @@ class DashboardController extends Controller
|
|||
->addSelect('id', 'customer_id', 'customer_email', 'customer_first_name', 'customer_last_name')
|
||||
->where('orders.created_at', '>=', $this->startDate)
|
||||
->where('orders.created_at', '<=', $this->endDate)
|
||||
->where('orders.status', '<>', 'closed')
|
||||
->where('orders.status', '<>', 'canceled')
|
||||
->groupBy('customer_email')
|
||||
->orderBy('total_base_grand_total', 'DESC')
|
||||
->limit(5)
|
||||
|
|
|
|||
|
|
@ -108,8 +108,6 @@ class ShipmentController extends Controller
|
|||
}
|
||||
|
||||
$this->validate(request(), [
|
||||
'shipment.carrier_title' => 'required',
|
||||
'shipment.track_number' => 'required',
|
||||
'shipment.source' => 'required',
|
||||
'shipment.items.*.*' => 'required|numeric|min:0',
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -16,22 +16,22 @@ class Order
|
|||
{
|
||||
/**
|
||||
* Send new order Mail to the customer and admin
|
||||
*
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Order $order
|
||||
* @return void
|
||||
*/
|
||||
public function sendNewOrderMail($order)
|
||||
{
|
||||
try {
|
||||
/* email to customer */
|
||||
$configKey = 'emails.general.notifications.emails.general.notifications.new-order';
|
||||
|
||||
if (core()->getConfigData($configKey)) {
|
||||
if (core()->getConfigData($configKey))
|
||||
Mail::queue(new NewOrderNotification($order));
|
||||
}
|
||||
|
||||
/* email to admin */
|
||||
$configKey = 'emails.general.notifications.emails.general.notifications.new-admin';
|
||||
|
||||
if (core()->getConfigData($configKey)) {
|
||||
app()->setLocale(env('APP_LOCALE'));
|
||||
Mail::queue(new NewAdminNotification($order));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -41,7 +41,7 @@ class Order
|
|||
|
||||
/**
|
||||
* Send new invoice mail to the customer
|
||||
*
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Invoice $invoice
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -64,7 +64,7 @@ class Order
|
|||
|
||||
/**
|
||||
* Send new refund mail to the customer
|
||||
*
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Refund $refund
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -83,7 +83,7 @@ class Order
|
|||
|
||||
/**
|
||||
* Send new shipment mail to the customer
|
||||
*
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Shipment $shipment
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1304,6 +1304,7 @@ return [
|
|||
'order-number-prefix' => 'بادئة رقم الطلب',
|
||||
'order-number-length' => 'طول رقم الطلب',
|
||||
'order-number-suffix' => 'لاحقة رقم الطلب',
|
||||
'order-number-generator-class' => 'مولد رقم الطلب',
|
||||
'default' => 'إفتراضي',
|
||||
'sandbox' => 'صندوق الرمل',
|
||||
'all-channels' => 'الكل',
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,7 @@ return array (
|
|||
'order-number-prefix' => 'Auftragsnummer Präfix',
|
||||
'order-number-length' => 'Auftragsnummer Länge',
|
||||
'order-number-suffix' => 'Auftragsnummer Suffix',
|
||||
'order-number-generator-class' => 'Bestell nummern generator',
|
||||
'default' => 'Standard',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Alle',
|
||||
|
|
|
|||
|
|
@ -1309,6 +1309,7 @@ return [
|
|||
'order-number-prefix' => 'Order Number Prefix',
|
||||
'order-number-length' => 'Order Number Length',
|
||||
'order-number-suffix' => 'Order Number Suffix',
|
||||
'order-number-generator-class' => 'Order Number Generator',
|
||||
'default' => 'Default',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'All Channels',
|
||||
|
|
|
|||
|
|
@ -1310,6 +1310,7 @@ return [
|
|||
'order-number-prefix' => 'پیش شماره شماره سفارش',
|
||||
'order-number-length' => 'طول شماره سفارش',
|
||||
'order-number-suffix' => 'تعداد کافی شماره سفارش',
|
||||
'order-number-generator-class' => 'تولید کننده شماره سفارش',
|
||||
'default' => 'پیش فرض',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'همه',
|
||||
|
|
|
|||
|
|
@ -1314,6 +1314,7 @@ return [
|
|||
'order-number-prefix' => 'Prefisso Numero Ordine',
|
||||
'order-number-length' => 'Lunghezza Numero Ordine',
|
||||
'order-number-suffix' => 'Suffisso Numero Ordine',
|
||||
'order-number-generator-class' => 'Generatore di numeri dordine',
|
||||
'default' => 'Default',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Tutti',
|
||||
|
|
|
|||
|
|
@ -1310,6 +1310,7 @@ return [
|
|||
'order-number-prefix' => 'Bestelnummer prefix',
|
||||
'order-number-length' => 'Bestelnummer Lengte',
|
||||
'order-number-suffix' => 'Achtervoegsel bestelnummer',
|
||||
'order-number-generator-class' => 'Ordernummer Generator',
|
||||
'default' => 'Standaard',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Alles',
|
||||
|
|
|
|||
|
|
@ -1312,6 +1312,7 @@ return [
|
|||
'order-number-prefix' => 'Prefiks numeru zamówienia',
|
||||
'order-number-length' => 'Długość numeru zamówienia',
|
||||
'order-number-suffix' => 'Sufiks numeru zamówienia”',
|
||||
'order-number-generator-class' => 'Generator numeru zamówienia',
|
||||
'default' => 'Domyślna',
|
||||
'sandbox' => 'Piaskownica',
|
||||
'all-channels' => 'Wszystkie kanały',
|
||||
|
|
|
|||
|
|
@ -1313,6 +1313,7 @@ return [
|
|||
'order-number-prefix' => 'Prefixo do Número do Pedido',
|
||||
'order-number-length' => 'Tamanho do Número do Pedido',
|
||||
'order-number-suffix' => 'Sufixo do Número de Pedido',
|
||||
'order-number-generator-class' => 'Gerador de número de pedido',
|
||||
'default' => 'Padrão',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Todos',
|
||||
|
|
|
|||
|
|
@ -1299,6 +1299,7 @@ return [
|
|||
'order-number-prefix' => 'Numara Ön Eki',
|
||||
'order-number-length' => 'Numara Uzunluğu',
|
||||
'order-number-suffix' => 'Numara Son Eki',
|
||||
'order-number-generator-class' => 'Sipariş Numarası Üreticisi',
|
||||
'default' => 'Varsayılan',
|
||||
'sandbox' => 'Havuz',
|
||||
'all-channels' => 'Tümü',
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
<tbody>
|
||||
|
||||
<variant-item v-for='(variant, index) in variants' :variant="variant" :key="index" :index="index" @onRemoveVariant="removeVariant($event)"></variant-item>
|
||||
<variant-item v-for='(variant, index) in variants' :variant="variant" :key="index" :index="variant.id" @onRemoveVariant="removeVariant($event)"></variant-item>
|
||||
|
||||
</tbody>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<input type="text" v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" value="{{ old($attribute->code) ?: $product[$attribute->code] }}" {{ in_array($attribute->code, ['sku', 'url_key']) ? 'v-slugify' : '' }} data-vv-as=""{{ $attribute->admin_name }}"" {{ $attribute->code == 'name' ? 'v-slugify-target=\'url_key\'' : '' }} />
|
||||
<input type="text" v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" value="{{ old($attribute->code) ?: $product[$attribute->code] }}" {{ in_array($attribute->code, ['sku', 'url_key']) ? 'v-slugify' : '' }} data-vv-as=""{{ $attribute->admin_name }}"" {{ $attribute->code == 'name' && ! $product[$attribute->code] ? 'v-slugify-target=\'url_key\'' : '' }} />
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -408,12 +408,12 @@
|
|||
<span class="locale"> [@{{ channel_locale }}] </span>
|
||||
</label>
|
||||
|
||||
<select v-if="this.options.length" v-validate= "validations" class="control" :id = "name" :name = "name" v-model="this.result"
|
||||
<select v-if="this.options.length" v-validate= "validations" class="control" :id = "name" :name = "name" v-model="savedValue"
|
||||
:data-vv-as="field_name">
|
||||
<option v-for='(option, index) in this.options' :value="option.value"> @{{ option.title }} </option>
|
||||
</select>
|
||||
|
||||
<input v-else type="text" class="control" v-validate= "validations" :id = "name" :name = "name" v-model="this.result"
|
||||
<input v-else type="text" class="control" v-validate= "validations" :id = "name" :name = "name" v-model="savedValue"
|
||||
:data-vv-as="field_name">
|
||||
|
||||
<span class="control-error" v-if="errors.has(name)">
|
||||
|
|
@ -436,12 +436,15 @@
|
|||
return {
|
||||
isRequire: false,
|
||||
isVisible: false,
|
||||
savedValue: "",
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
var this_this = this;
|
||||
|
||||
this_this.savedValue = this_this.result;
|
||||
|
||||
if (this_this.validations || (this_this.validations.indexOf("required") != -1)) {
|
||||
this_this.isRequire = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
@stop
|
||||
|
||||
|
||||
@section('content-wrapper')
|
||||
@section('content')
|
||||
|
||||
<div class="content full-page">
|
||||
<div class="content">
|
||||
{!! view_render_event('admin.customer.addresses.create.before') !!}
|
||||
|
||||
<form method="POST" action="{{ route('admin.customer.addresses.store', ['id' => $customer->id]) }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
<input type="text" class="control" name="city" v-validate="'required|alpha_spaces'" value="{{ old('city') }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<input type="text" class="control" name="city" v-validate="'required|regex:^[a-zA-Z \-]*$'" value="{{ old('city') }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
@stop
|
||||
|
||||
|
||||
@section('content-wrapper')
|
||||
@section('content')
|
||||
|
||||
<div class="content full-page">
|
||||
<div class="content">
|
||||
{!! view_render_event('admin.customer.addresses.edit.before', ['address' => $address]) !!}
|
||||
|
||||
<form method="post" action="{{ route('admin.customer.addresses.update', $address->id) }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
<input type="text" class="control" name="city" v-validate="'required'" value="{{ old('city') ?: $address->city }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<input type="text" class="control" name="city" v-validate="'required|regex:^[a-zA-Z \-]*$'" value="{{ old('city') ?: $address->city }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
|
||||
<i class="icon angle-left-icon back-link"
|
||||
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
|
||||
{{ __('admin::app.promotions.cart-rules.add-title') }}
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@
|
|||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
|
||||
<i class="icon angle-left-icon back-link"
|
||||
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
|
||||
{{ __('admin::app.promotions.cart-rules.edit-title') }}
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
|
||||
<i class="icon angle-left-icon back-link"
|
||||
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
|
||||
{{ __('admin::app.promotions.catalog-rules.add-title') }}
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
|
||||
<i class="icon angle-left-icon back-link"
|
||||
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
|
||||
{{ __('admin::app.promotions.catalog-rules.edit-title') }}
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -138,14 +138,14 @@
|
|||
|
||||
{!! view_render_event('sales.order.customer_email.after', ['order' => $order]) !!}
|
||||
|
||||
@if (! is_null($order->customer))
|
||||
@if (! is_null($order->customer) && ! is_null($order->customer->group))
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.customers.customers.customer_group') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer->group['name'] }}
|
||||
{{ $order->customer->group->name }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -199,20 +199,14 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[carrier_title]') ? 'has-error' : '']" style="margin-top: 40px">
|
||||
<label for="shipment[carrier_title]" class="required">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]" data-vv-as=""{{ __('admin::app.sales.shipments.carrier-title') }}""/>
|
||||
<span class="control-error" v-if="errors.has('shipment[carrier_title]')">
|
||||
@{{ errors.first('shipment[carrier_title]') }}
|
||||
</span>
|
||||
<div class="control-group" style="margin-top: 40px">
|
||||
<label for="shipment[carrier_title]">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
|
||||
<input type="text" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[track_number]') ? 'has-error' : '']">
|
||||
<label for="shipment[track_number]" class="required">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[track_number]" name="shipment[track_number]" data-vv-as=""{{ __('admin::app.sales.shipments.tracking-number') }}""/>
|
||||
<span class="control-error" v-if="errors.has('shipment[track_number]')">
|
||||
@{{ errors.first('shipment[track_number]') }}
|
||||
</span>
|
||||
<div class="control-group">
|
||||
<label for="shipment[track_number]">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
|
||||
<input type="text" class="control" id="shipment[track_number]" name="shipment[track_number]"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@
|
|||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"cross-env": "^6.0.3",
|
||||
"jquery": "^3.4.1",
|
||||
"laravel-mix": "^5.0.0",
|
||||
"laravel-mix-merge-manifest": "^0.1.2",
|
||||
"sass": "^1.25.0",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue": "^2.6.10"
|
||||
"sass-loader": "^8.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,15 @@ class Booking extends Virtual
|
|||
return app($this->bookingHelper->getTypeHepler($bookingProduct->type))->isItemHaveQuantity($cartItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $qty
|
||||
* @return bool
|
||||
*/
|
||||
public function haveSufficientQuantity($qty)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add product. Returns error message if can't prepare product.
|
||||
*
|
||||
|
|
@ -186,13 +195,13 @@ class Booking extends Virtual
|
|||
continue;
|
||||
}
|
||||
|
||||
$cartProducts = parent::prepareForCart([
|
||||
$cartProducts = parent::prepareForCart(array_merge($data, [
|
||||
'product_id' => $data['product_id'],
|
||||
'quantity' => $qty,
|
||||
'booking' => [
|
||||
'ticket_id' => $ticketId,
|
||||
],
|
||||
]);
|
||||
]));
|
||||
|
||||
if (is_string($cartProducts)) {
|
||||
return $cartProducts;
|
||||
|
|
@ -263,4 +272,4 @@ class Booking extends Virtual
|
|||
|
||||
return app($this->bookingHelper->getTypeHepler($bookingProduct->type))->validateCartItem($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Webkul\CartRule\Helpers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Webkul\CartRule\Repositories\CartRuleRepository;
|
||||
use Webkul\CartRule\Repositories\CartRuleCouponRepository;
|
||||
use Webkul\CartRule\Repositories\CartRuleCouponUsageRepository;
|
||||
|
|
@ -144,7 +145,7 @@ class CartRule
|
|||
if ($staticCartRules::$cartID === cart()->getCart()->id && $staticCartRules::$cartRules) {
|
||||
return $staticCartRules::$cartRules;
|
||||
}
|
||||
|
||||
|
||||
$staticCartRules::$cartID = cart()->getCart()->id;
|
||||
|
||||
$customerGroupId = null;
|
||||
|
|
@ -157,21 +158,7 @@ class CartRule
|
|||
}
|
||||
}
|
||||
|
||||
$cartRules = $this->cartRuleRepository->scopeQuery(function ($query) use ($customerGroupId) {
|
||||
return $query->leftJoin('cart_rule_customer_groups', 'cart_rules.id', '=', 'cart_rule_customer_groups.cart_rule_id')
|
||||
->leftJoin('cart_rule_channels', 'cart_rules.id', '=', 'cart_rule_channels.cart_rule_id')
|
||||
->where('cart_rule_customer_groups.customer_group_id', $customerGroupId)
|
||||
->where('cart_rule_channels.channel_id', core()->getCurrentChannel()->id)
|
||||
->where(function ($query1) {
|
||||
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d'))
|
||||
->orWhereNull('cart_rules.starts_from');
|
||||
})
|
||||
->where(function ($query2) {
|
||||
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d'))
|
||||
->orWhereNull('cart_rules.ends_till');
|
||||
})
|
||||
->orderBy('sort_order', 'asc');
|
||||
})->findWhere(['status' => 1]);
|
||||
$cartRules = $this->getCartRuleQuery($customerGroupId, core()->getCurrentChannel()->id);
|
||||
|
||||
$staticCartRules::$cartRules = $cartRules;
|
||||
return $cartRules;
|
||||
|
|
@ -180,21 +167,22 @@ class CartRule
|
|||
/**
|
||||
* Check if cart rule can be applied
|
||||
*
|
||||
* @param \Webkul\CartRule\Contracts\CartRule $rule
|
||||
* @param $cart
|
||||
* @param \Webkul\CartRule\Contracts\CartRule $rule
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canProcessRule($rule): bool
|
||||
public function canProcessRule($cart, $rule): bool
|
||||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
if ($rule->coupon_type) {
|
||||
if (strlen($cart->coupon_code)) {
|
||||
$coupon = $this->cartRuleCouponRepository->findOneWhere([
|
||||
'cart_rule_id' => $rule->id,
|
||||
'code' => $cart->coupon_code,
|
||||
]);
|
||||
/** @var \Webkul\CartRule\Models\CartRule $rule */
|
||||
|
||||
if ($coupon) {
|
||||
// Laravel relation is used instead of repository for performance
|
||||
// reasons (cart_rule_coupon-relation is pre-loaded by self::getCartRuleQuery())
|
||||
$coupon = $rule->cart_rule_coupon;
|
||||
|
||||
if ($coupon && $coupon->code === $cart->coupon_code) {
|
||||
if ($coupon->usage_limit && $coupon->times_used >= $coupon->usage_limit) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -245,8 +233,10 @@ class CartRule
|
|||
|
||||
$appliedRuleIds = [];
|
||||
|
||||
foreach ($this->getCartRules() as $rule) {
|
||||
if (! $this->canProcessRule($rule)) {
|
||||
$cart = Cart::getCart();
|
||||
|
||||
foreach ($rules = $this->getCartRules() as $rule) {
|
||||
if (! $this->canProcessRule($cart, $rule)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -368,8 +358,10 @@ class CartRule
|
|||
|
||||
$appliedRuleIds = [];
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
foreach ($this->getCartRules() as $rule) {
|
||||
if (! $this->canProcessRule($rule)) {
|
||||
if (! $this->canProcessRule($cart, $rule)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -450,8 +442,10 @@ class CartRule
|
|||
|
||||
$appliedRuleIds = [];
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
foreach ($this->getCartRules() as $rule) {
|
||||
if (! $this->canProcessRule($rule)) {
|
||||
if (! $this->canProcessRule($cart, $rule)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -495,12 +489,14 @@ class CartRule
|
|||
*/
|
||||
public function calculateCartItemTotals($items)
|
||||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
foreach ($this->getCartRules() as $rule) {
|
||||
if ($rule->action_type == 'cart_fixed') {
|
||||
$totalPrice = $totalBasePrice = $validCount = 0;
|
||||
|
||||
foreach ($items as $item) {
|
||||
if (! $this->canProcessRule($rule, $item)) {
|
||||
if (! $this->canProcessRule($cart, $rule)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -564,4 +560,38 @@ class CartRule
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $customerGroupId
|
||||
* @param $channelId
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getCartRuleQuery($customerGroupId, $channelId): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return $this->cartRuleRepository->scopeQuery(function ($query) use ($customerGroupId) {
|
||||
/** @var Builder $query */
|
||||
return $query->leftJoin('cart_rule_customer_groups', 'cart_rules.id', '=',
|
||||
'cart_rule_customer_groups.cart_rule_id')
|
||||
->leftJoin('cart_rule_channels', 'cart_rules.id', '=', 'cart_rule_channels.cart_rule_id')
|
||||
->where('cart_rule_customer_groups.customer_group_id', $customerGroupId)
|
||||
->where('cart_rule_channels.channel_id', core()->getCurrentChannel()->id)
|
||||
->where(function ($query1) {
|
||||
/** @var Builder $query1 */
|
||||
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d'))
|
||||
->orWhereNull('cart_rules.starts_from');
|
||||
})
|
||||
->where(function ($query2) {
|
||||
/** @var Builder $query2 */
|
||||
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d'))
|
||||
->orWhereNull('cart_rules.ends_till');
|
||||
})
|
||||
->with([
|
||||
'cart_rule_customer_groups',
|
||||
'cart_rule_channels',
|
||||
'cart_rule_coupon'
|
||||
])
|
||||
->orderBy('sort_order', 'asc');
|
||||
})->findWhere(['status' => 1]);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
namespace Webkul\CartRule\Models;
|
||||
|
||||
// use Webkul\Core\Eloquent\TranslatableModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\CartRule\Contracts\CartRule as CartRuleContract;
|
||||
use Webkul\Core\Models\ChannelProxy;
|
||||
use Webkul\Customer\Models\CustomerGroupProxy;
|
||||
|
||||
// class CartRule extends TranslatableModel implements CartRuleContract
|
||||
class CartRule extends Model implements CartRuleContract
|
||||
{
|
||||
protected $fillable = [
|
||||
|
|
@ -40,42 +38,80 @@ class CartRule extends Model implements CartRuleContract
|
|||
'conditions' => 'array',
|
||||
];
|
||||
|
||||
// public $translatedAttributes = ['name'];
|
||||
|
||||
/**
|
||||
* Get the channels that owns the cart rule.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function channels()
|
||||
public function cart_rule_channels(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(ChannelProxy::modelClass(), 'cart_rule_channels');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the customer groups that owns the cart rule.
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*
|
||||
* @deprecated laravel standard should be used
|
||||
*/
|
||||
public function customer_groups()
|
||||
public function channels(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->cart_rule_channels();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the customer groups that owns the cart rule.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function cart_rule_customer_groups(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(CustomerGroupProxy::modelClass(), 'cart_rule_customer_groups');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the coupons that owns the cart rule.
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*
|
||||
* @deprecated laravel standard should be used
|
||||
*/
|
||||
public function coupons()
|
||||
public function customer_groups(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->cart_rule_customer_groups();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the coupons that owns the cart rule.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function cart_rule_coupon(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
{
|
||||
return $this->hasOne(CartRuleCouponProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get primary coupon code for cart rule.
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*
|
||||
* @deprecated laravel standard should be used
|
||||
*/
|
||||
public function coupon_code()
|
||||
public function coupons(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
{
|
||||
return $this->coupons()->where('is_primary', 1);
|
||||
return $this->cart_rule_coupon();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get primary coupon code for cart rule.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function coupon_code(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
{
|
||||
return $this->cart_rule_coupon()->where('is_primary', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get primary coupon code for cart rule.
|
||||
*
|
||||
* @return string|void
|
||||
*/
|
||||
public function getCouponCodeAttribute()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Search Engine
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default search connection that gets used while
|
||||
| using Laravel Scout. This connection is used when syncing all models
|
||||
| to the search service. You should adjust this based on your needs.
|
||||
|
|
||||
| Supported: "algolia", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SCOUT_DRIVER', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a prefix that will be applied to all search index
|
||||
| names used by Scout. This prefix may be useful if you have multiple
|
||||
| "tenants" or applications sharing the same search infrastructure.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('SCOUT_PREFIX', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Data Syncing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to control if the operations that sync your data
|
||||
| with your search engines are queued. When this is set to "true" then
|
||||
| all automatic data syncing will get queued for better performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk Sizes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options allow you to control the maximum chunk size when you are
|
||||
| mass importing data into the search engine. This allows you to fine
|
||||
| tune each of these chunk sizes based on the power of the servers.
|
||||
|
|
||||
*/
|
||||
|
||||
'chunk' => [
|
||||
'searchable' => 500,
|
||||
'unsearchable' => 500,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Soft Deletes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows to control whether to keep soft deleted records in
|
||||
| the search indexes. Maintaining soft deleted records can be useful
|
||||
| if your application still needs to search for the records later.
|
||||
|
|
||||
*/
|
||||
|
||||
'soft_delete' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Algolia Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your Algolia settings. Algolia is a cloud hosted
|
||||
| search engine which works great with Scout out of the box. Just plug
|
||||
| in your application ID and admin API key to get started searching.
|
||||
|
|
||||
*/
|
||||
|
||||
'algolia' => [
|
||||
'id' => env('ALGOLIA_APP_ID', ''),
|
||||
'secret' => env('ALGOLIA_SECRET', ''),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -7,6 +7,9 @@ use Illuminate\Database\Eloquent\Factory as EloquentFactory;
|
|||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Theme\ViewRenderEventManager;
|
||||
use Webkul\Core\View\Compilers\BladeCompiler;
|
||||
use Webkul\Core\Console\Commands\BookingCron;
|
||||
use Webkul\Core\Core;
|
||||
use Webkul\Core\Exceptions\Handler;
|
||||
|
|
@ -43,6 +46,7 @@ class CoreServiceProvider extends ServiceProvider
|
|||
|
||||
$this->publishes([
|
||||
dirname(__DIR__) . '/Config/concord.php' => config_path('concord.php'),
|
||||
dirname(__DIR__) . '/Config/scout.php' => config_path('scout.php'),
|
||||
]);
|
||||
|
||||
$this->app->bind(
|
||||
|
|
@ -51,6 +55,16 @@ class CoreServiceProvider extends ServiceProvider
|
|||
);
|
||||
|
||||
SliderProxy::observe(SliderObserver::class);
|
||||
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'core');
|
||||
|
||||
Event::listen('bagisto.shop.layout.body.after', static function(ViewRenderEventManager $viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('core::blade.tracer.style');
|
||||
});
|
||||
|
||||
Event::listen('bagisto.admin.layout.head', static function(ViewRenderEventManager $viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('core::blade.tracer.style');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -63,6 +77,8 @@ class CoreServiceProvider extends ServiceProvider
|
|||
$this->registerFacades();
|
||||
|
||||
$this->registerCommands();
|
||||
|
||||
$this->registerBladeCompiler();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -109,4 +125,16 @@ class CoreServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->app->make(EloquentFactory::class)->load($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Blade compiler implementation.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerBladeCompiler()
|
||||
{
|
||||
$this->app->singleton('blade.compiler', function ($app) {
|
||||
return new BladeCompiler($app['files'], $app['config']['view.compiled']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'path-hint' => [
|
||||
'template' => 'Template',
|
||||
'parents' => 'Parents'
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<style>
|
||||
.path-hint {
|
||||
border: solid 1px transparent;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.path-hint:hover {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
.path-hint-tooltip {
|
||||
padding: 0px 10px;
|
||||
position: absolute;
|
||||
background: #000000;
|
||||
z-index: 10000;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.path-hint-tooltip h4 {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 3px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.path-hint-tooltip ul li {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-image img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener("load", function(event) {
|
||||
$('.testing').each(function(index) {
|
||||
if ($(this).siblings(':not(.path-hint)').length == 1
|
||||
&& $(this).next().prop("tagName") != 'INPUT'
|
||||
&& $(this).next().prop("tagName") != 'TEXTAREA'
|
||||
&& $(this).next().prop("tagName") != 'SELECT'
|
||||
) {
|
||||
$(this).next().addClass('path-hint');
|
||||
|
||||
$(this).next().attr({
|
||||
'data-toggle': 'tooltip',
|
||||
'data-title': $(this).parent('.path-hint').attr('data-title'),
|
||||
'data-id': $(this).parent('.path-hint').attr('data-id')
|
||||
});
|
||||
|
||||
$(this).unwrap();
|
||||
}
|
||||
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$('.path-hint').on('mouseover', function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var currentElement = $(e.currentTarget);
|
||||
|
||||
var tooltipContent = '<h4>{{ __("core::app.path-hint.template") }}</h4>' + currentElement.attr('data-title');
|
||||
|
||||
if ($(this).parents('.path-hint').length) {
|
||||
tooltipContent += '<h4>{{ __("core::app.path-hint.parents") }}</h4>';
|
||||
|
||||
tooltipContent += '<ul>';
|
||||
|
||||
$(this).parents('.path-hint').each(function(index) {
|
||||
tooltipContent += '<li>' + $(this).attr('data-title') + '</li>';
|
||||
});
|
||||
|
||||
tooltipContent += '</ul>';
|
||||
}
|
||||
|
||||
$('body').append("<span class='path-hint-tooltip' id='" + currentElement.attr('data-id') + "'>" + tooltipContent + "</span>")
|
||||
|
||||
var elementWidth = currentElement.outerWidth()
|
||||
|
||||
var tooltipWidth = $('.path-hint-tooltip').outerWidth()
|
||||
|
||||
var leftOffset = currentElement.offset().left;
|
||||
|
||||
minus = 0;
|
||||
|
||||
temp = leftOffset + (elementWidth / 2) + (tooltipWidth / 2)
|
||||
|
||||
if (temp > $(window).outerWidth()) {
|
||||
minus = temp - $(window).outerWidth();
|
||||
}
|
||||
|
||||
if (elementWidth > tooltipWidth) {
|
||||
var left = leftOffset + ((elementWidth / 2) - (tooltipWidth / 2));
|
||||
} else {
|
||||
var left = leftOffset - ((tooltipWidth / 2) - (elementWidth / 2));
|
||||
}
|
||||
|
||||
if (left <= 0) {
|
||||
left = 10;
|
||||
}
|
||||
|
||||
$('.path-hint-tooltip').css('left', left - minus)
|
||||
|
||||
$('.path-hint-tooltip').css('top', currentElement.offset().top + 20)
|
||||
})
|
||||
|
||||
$('[data-toggle="tooltip"]').on('mouseout', function(e) {
|
||||
var currentElement = $(e.currentTarget);
|
||||
|
||||
$("#" + currentElement.attr('data-id')).remove();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\View\Compilers;
|
||||
|
||||
use Illuminate\View\Compilers\BladeCompiler as BaseBladeCompiler;
|
||||
|
||||
class BladeCompiler extends BaseBladeCompiler
|
||||
{
|
||||
/**
|
||||
* Append the file path to the compiled string.
|
||||
*
|
||||
* @param string $contents
|
||||
* @return string
|
||||
*/
|
||||
protected function appendFilePath($contents)
|
||||
{
|
||||
$tokens = $this->getOpenAndClosingPhpTokens($contents);
|
||||
|
||||
if (config('view.tracer')
|
||||
&& strpos($this->getPath(), 'tracer/style.blade.php') == false
|
||||
&& strpos($this->getPath(), 'master.blade.php') == false
|
||||
) {
|
||||
$finalPath = str_replace('/Providers/..', '', str_replace(base_path(), '', $this->getPath()));
|
||||
|
||||
$contents = '<div class="path-hint" data-toggle="tooltip" data-title="' . $finalPath . '" data-id="' . uniqid() . '"><span class="testing"></span>' . $contents . '</div>';
|
||||
}
|
||||
|
||||
if ($tokens->isNotEmpty() && $tokens->last() !== T_CLOSE_TAG) {
|
||||
$contents .= ' ?>';
|
||||
}
|
||||
|
||||
|
||||
return $contents."<?php /**PATH {$this->getPath()} ENDPATH**/ ?>";
|
||||
}
|
||||
}
|
||||
|
|
@ -35,10 +35,13 @@ class BundleOption extends AbstractProduct
|
|||
{
|
||||
$options = [];
|
||||
|
||||
# eager load all inventories for bundle options
|
||||
$this->product->bundle_options->load('bundle_option_products.product.inventories');
|
||||
|
||||
foreach ($this->product->bundle_options as $option) {
|
||||
$data = $this->getOptionItemData($option);
|
||||
|
||||
if (! count($data['products'])) {
|
||||
if (! $option->is_required && ! count($data['products'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -97,6 +100,8 @@ class BundleOption extends AbstractProduct
|
|||
'product_id' => $bundleOptionProduct->product_id,
|
||||
'is_default' => $bundleOptionProduct->is_default,
|
||||
'sort_order' => $bundleOptionProduct->sort_order,
|
||||
'in_stock' => $bundleOptionProduct->product->inventories->sum('qty') >= $bundleOptionProduct->qty,
|
||||
'inventory' => $bundleOptionProduct->product->inventories->sum('qty'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,27 @@ class Product extends Model implements ProductContract
|
|||
|
||||
protected $typeInstance;
|
||||
|
||||
// protected $with = ['attribute_family', 'inventories'];
|
||||
/**
|
||||
* The "booted" method of the model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
// protected $table = 'products';
|
||||
static::deleting(function ($product) {
|
||||
foreach ($product->product_flats as $productFlat) {
|
||||
$productFlat->unsearchable();
|
||||
}
|
||||
|
||||
foreach ($product->variants as $variant) {
|
||||
foreach ($variant->product_flats as $productFlat) {
|
||||
$productFlat->unsearchable();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the product attribute family that owns the product.
|
||||
|
|
@ -40,6 +58,14 @@ class Product extends Model implements ProductContract
|
|||
return $this->hasMany(ProductAttributeValueProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the product variants that owns the product.
|
||||
*/
|
||||
public function product_flats()
|
||||
{
|
||||
return $this->hasMany(ProductFlatProxy::modelClass(), 'product_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the product variants that owns the product.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@
|
|||
namespace Webkul\Product\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Laravel\Scout\Searchable;
|
||||
use Webkul\Product\Contracts\ProductFlat as ProductFlatContract;
|
||||
|
||||
class ProductFlat extends Model implements ProductFlatContract
|
||||
{
|
||||
use Searchable;
|
||||
|
||||
protected $table = 'product_flat';
|
||||
|
||||
protected $guarded = [
|
||||
|
|
@ -17,6 +20,16 @@ class ProductFlat extends Model implements ProductFlatContract
|
|||
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Get the index name for the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs()
|
||||
{
|
||||
return 'products_index';
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve type instance
|
||||
*
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class ProductRepository extends Repository
|
|||
|
||||
$perPage = isset($params['limit']) ? $params['limit'] : current($pages);
|
||||
} else {
|
||||
$perPage = isset($params['limit']) ? $params['limit'] : 9;
|
||||
$perPage = isset($params['limit']) && !empty($params['limit']) ? $params['limit'] : 9;
|
||||
}
|
||||
|
||||
$page = Paginator::resolveCurrentPage('page');
|
||||
|
|
@ -151,18 +151,14 @@ class ProductRepository extends Repository
|
|||
$orderDirection = 'asc';
|
||||
if( isset($params['order']) && in_array($params['order'], ['desc', 'asc']) ){
|
||||
$orderDirection = $params['order'];
|
||||
} else {
|
||||
$orderDirection = $this->getDefaultSortByOption()[1];
|
||||
}
|
||||
|
||||
if (isset($params['sort'])) {
|
||||
$attribute = $this->attributeRepository->findOneByField('code', $params['sort']);
|
||||
|
||||
if ($attribute) {
|
||||
if ($attribute->code == 'price') {
|
||||
$qb->orderBy('min_price', $orderDirection);
|
||||
} else {
|
||||
$qb->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $orderDirection);
|
||||
}
|
||||
}
|
||||
$this->checkSortAttributeAndGenerateQuery($qb, $params['sort'], $orderDirection);
|
||||
} else {
|
||||
$this->checkSortAttributeAndGenerateQuery($qb, $this->getDefaultSortByOption()[0], $orderDirection);
|
||||
}
|
||||
|
||||
if ( $priceFilter = request('price') ){
|
||||
|
|
@ -344,29 +340,62 @@ class ProductRepository extends Repository
|
|||
*/
|
||||
public function searchProductByAttribute($term)
|
||||
{
|
||||
$results = app(ProductFlatRepository::class)->scopeQuery(function($query) use($term) {
|
||||
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
|
||||
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
|
||||
|
||||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
|
||||
return $query->distinct()
|
||||
if (config('scout.driver') == 'algolia') {
|
||||
$results = app(ProductFlatRepository::class)->getModel()::search('query', function ($searchDriver, string $query, array $options) use($term, $channel, $locale) {
|
||||
$queries = explode('_', $term);
|
||||
|
||||
$options['similarQuery'] = array_map('trim', $queries);
|
||||
|
||||
$searchDriver->setSettings([
|
||||
'attributesForFaceting' => [
|
||||
"searchable(locale)",
|
||||
"searchable(channel)"
|
||||
]
|
||||
]);
|
||||
|
||||
$options['facetFilters'] = ['locale:' . $locale, 'channel:' . $channel];
|
||||
|
||||
return $searchDriver->search($query, $options);
|
||||
})
|
||||
->where('status', 1)
|
||||
->where('visible_individually', 1)
|
||||
->orderBy('product_id', 'desc')
|
||||
->paginate(16);
|
||||
} else if(config('scout.driver') == 'elastic') {
|
||||
$queries = explode('_', $term);
|
||||
|
||||
$results = app(ProductFlatRepository::class)->getModel()::search(implode(' OR ', $queries))
|
||||
->where('status', 1)
|
||||
->where('visible_individually', 1)
|
||||
->where('channel', $channel)
|
||||
->where('locale', $locale)
|
||||
->orderBy('product_id', 'desc')
|
||||
->paginate(16);
|
||||
} else {
|
||||
$results = app(ProductFlatRepository::class)->scopeQuery(function($query) use($term, $channel, $locale) {
|
||||
return $query->distinct()
|
||||
->addSelect('product_flat.*')
|
||||
->where('product_flat.status', 1)
|
||||
->where('product_flat.visible_individually', 1)
|
||||
->where('product_flat.channel', $channel)
|
||||
->where('product_flat.locale', $locale)
|
||||
->whereNotNull('product_flat.url_key')
|
||||
->where(function($subQuery) use ($term) {
|
||||
->where(function($subQuery) use ($term) {
|
||||
$queries = explode('_', $term);
|
||||
|
||||
foreach (array_map('trim', $queries) as $value) {
|
||||
$subQuery->orWhere('product_flat.name', 'like', '%' . urldecode($value) . '%')
|
||||
->orWhere('product_flat.short_description', 'like', '%' . urldecode($value) . '%');
|
||||
->orWhere('product_flat.short_description', 'like', '%' . urldecode($value) . '%');
|
||||
}
|
||||
})
|
||||
->orderBy('product_id', 'desc');
|
||||
})->paginate(16);
|
||||
|
||||
})->paginate(16);
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
|
@ -420,4 +449,41 @@ class ProductRepository extends Repository
|
|||
->orderBy('product_id', 'desc');
|
||||
})->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default sort by option
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getDefaultSortByOption()
|
||||
{
|
||||
$value = core()->getConfigData('catalog.products.storefront.sort_by');
|
||||
|
||||
$config = $value ? $value : 'name-desc';
|
||||
|
||||
return explode('-', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check sort attribute and generate query
|
||||
*
|
||||
* @param object $query
|
||||
* @param string $sort
|
||||
* @param string $direction
|
||||
* @return object
|
||||
*/
|
||||
private function checkSortAttributeAndGenerateQuery($query, $sort, $direction)
|
||||
{
|
||||
$attribute = $this->attributeRepository->findOneByField('code', $sort);
|
||||
|
||||
if ($attribute) {
|
||||
if ($attribute->code == 'price') {
|
||||
$query->orderBy('min_price', $direction);
|
||||
} else {
|
||||
$query->orderBy($sort == 'created_at' ? 'product_flat.created_at' : $attribute->code, $direction);
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
|
@ -539,10 +539,11 @@ abstract class AbstractType
|
|||
if ($haveSpecialPrice) {
|
||||
$this->product->special_price = min($this->product->special_price, $customerGroupPrice);
|
||||
} else {
|
||||
$haveSpecialPrice = true;
|
||||
$this->product->special_price = $customerGroupPrice;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $haveSpecialPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class Bundle extends AbstractType
|
|||
if (count($optionProductsPrices)) {
|
||||
$selectionMinPrice = min($optionProductsPrices);
|
||||
|
||||
if($option->is_required) {
|
||||
if ($option->is_required) {
|
||||
$minPrice += $selectionMinPrice;
|
||||
} elseif (! $haveRequiredOptions) {
|
||||
$minPrices[] = $selectionMinPrice;
|
||||
|
|
@ -207,7 +207,7 @@ class Bundle extends AbstractType
|
|||
if (count($optionProductsPrices)) {
|
||||
$selectionMinPrice = min($optionProductsPrices);
|
||||
|
||||
if($option->is_required) {
|
||||
if ($option->is_required) {
|
||||
$minPrice += $selectionMinPrice;
|
||||
} elseif (! $haveRequiredOptions) {
|
||||
$minPrices[] = $selectionMinPrice;
|
||||
|
|
@ -278,7 +278,7 @@ class Bundle extends AbstractType
|
|||
if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (in_array($option->type, ['multiselect', 'checkbox'])) {
|
||||
if (! isset($optionPrices[$option->id][0])) {
|
||||
$optionPrices[$option->id][0] = 0;
|
||||
|
|
@ -315,7 +315,7 @@ class Bundle extends AbstractType
|
|||
if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (in_array($option->type, ['multiselect', 'checkbox'])) {
|
||||
if (! isset($optionPrices[$option->id][0])) {
|
||||
$optionPrices[$option->id][0] = 0;
|
||||
|
|
@ -381,6 +381,25 @@ class Bundle extends AbstractType
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bundle product special price
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function checkBundleProductHaveSpecialPrice()
|
||||
{
|
||||
$haveSpecialPrice = false;
|
||||
foreach ($this->product->bundle_options as $option) {
|
||||
foreach ($option->bundle_option_products as $index => $bundleOptionProduct) {
|
||||
if ($bundleOptionProduct->product->getTypeInstance()->haveSpecialPrice()) {
|
||||
$haveSpecialPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $haveSpecialPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product minimal price
|
||||
*
|
||||
|
|
@ -390,7 +409,12 @@ class Bundle extends AbstractType
|
|||
{
|
||||
$prices = $this->getProductPrices();
|
||||
|
||||
$priceHtml = '<div class="price-from">';
|
||||
$priceHtml = '';
|
||||
|
||||
if ($this->checkBundleProductHaveSpecialPrice())
|
||||
$priceHtml .= '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>';
|
||||
|
||||
$priceHtml .= '<div class="price-from">';
|
||||
|
||||
if ($prices['from']['regular_price']['price'] != $prices['from']['final_price']['price']) {
|
||||
$priceHtml .= '<span class="regular-price">' . $prices['from']['regular_price']['formated_price'] . '</span>'
|
||||
|
|
@ -585,7 +609,14 @@ class Bundle extends AbstractType
|
|||
$bundleOptionQuantities[$option->id] = $qty;
|
||||
}
|
||||
|
||||
$labels[] = $qty . ' x ' . $optionProduct->product->name . ' ' . core()->currency($optionProduct->product->getTypeInstance()->getMinimalPrice());
|
||||
$label = $qty . ' x ' . $optionProduct->product->name;
|
||||
|
||||
$price = $optionProduct->product->getTypeInstance()->getMinimalPrice();
|
||||
if($price != 0){
|
||||
$label .= ' ' . core()->currency($price);
|
||||
}
|
||||
|
||||
$labels[] = $label;
|
||||
}
|
||||
|
||||
if (count($labels)) {
|
||||
|
|
@ -674,4 +705,27 @@ class Bundle extends AbstractType
|
|||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $qty
|
||||
* @return bool
|
||||
*/
|
||||
public function haveSufficientQuantity($qty)
|
||||
{
|
||||
# to consider a bundle in stock we need to check that at least one product from each required group is available for the given quantity
|
||||
foreach ($this->product->bundle_options as $option) {
|
||||
if ($option->is_required) {
|
||||
foreach ($option->bundle_option_products as $bundleOptionProduct) {
|
||||
# as long as at least one product in the required group is available we can continue checking other groups
|
||||
if($bundleOptionProduct->product->haveSufficientQuantity($bundleOptionProduct->qty * $qty)) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
# if any required option does not have any in-stock product option we will get here.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -139,6 +139,23 @@ class Grouped extends AbstractType
|
|||
return min($minPrices);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group product special price
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function checkGroupProductHaveSpecialPrice()
|
||||
{
|
||||
$haveSpecialPrice = false;
|
||||
foreach ($this->product->grouped_products as $groupOptionProduct) {
|
||||
if ($groupOptionProduct->associated_product->getTypeInstance()->haveSpecialPrice()) {
|
||||
$haveSpecialPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $haveSpecialPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product minimal price
|
||||
*
|
||||
|
|
@ -146,9 +163,16 @@ class Grouped extends AbstractType
|
|||
*/
|
||||
public function getPriceHtml()
|
||||
{
|
||||
return '<span class="price-label">' . trans('shop::app.products.starting-at') . '</span>'
|
||||
. ' '
|
||||
. '<span class="final-price">' . core()->currency($this->getMinimalPrice()) . '</span>';
|
||||
$html = '';
|
||||
|
||||
if ($this->checkGroupProductHaveSpecialPrice())
|
||||
$html .= '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>';
|
||||
|
||||
$html .= '<span class="price-label">' . trans('shop::app.products.starting-at') . '</span>'
|
||||
. ' '
|
||||
. '<span class="final-price">' . core()->currency($this->getMinimalPrice()) . '</span>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -62,6 +62,6 @@ class Virtual extends AbstractType
|
|||
*/
|
||||
public function haveSufficientQuantity($qty)
|
||||
{
|
||||
return true;
|
||||
return $qty <= $this->totalQuantity() ? true : false;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ class OrderRepository extends Repository
|
|||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::dispatch('checkout.order.save.before', $data);
|
||||
Event::dispatch('checkout.order.save.before', [$data]);
|
||||
|
||||
if (isset($data['customer']) && $data['customer']) {
|
||||
$data['customer_id'] = $data['customer']->id;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=b0ae98b46b290f0fca8b",
|
||||
"/css/shop.css": "/css/shop.css?id=0664f52f2390473afc00"
|
||||
"/js/shop.js": "/js/shop.js?id=d64fdfe9e3fe3e4b9ee4",
|
||||
"/css/shop.css": "/css/shop.css?id=d5a7b8d843e219c2fa28"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ section.slider-block {
|
|||
img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -4566,4 +4566,52 @@ section.review {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//compare page
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.comparison-component {
|
||||
width: 100%;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.comparison-component > h1 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 15px;
|
||||
min-width: 250px;
|
||||
max-width: 250px;
|
||||
line-height: 30px;
|
||||
vertical-align: top;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.icon.remove-product {
|
||||
top: 5px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.action > div {
|
||||
display: inline-block;
|
||||
}
|
||||
.cart-wish-wrap .btn.btn-lg {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.cart-wish-wrap {
|
||||
display: flex;
|
||||
}
|
||||
.white-cross-sm-icon {
|
||||
width: 24px;
|
||||
height:24px;
|
||||
}
|
||||
.add-to-wishlist {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ return [
|
|||
|
||||
'edit-profile' => [
|
||||
'title' => 'Edit Profile',
|
||||
'page-title' => 'Edit Profile Form'
|
||||
'page-title' => 'Edit Profile'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ return [
|
|||
'title' => 'Address',
|
||||
'add' => 'Add Address',
|
||||
'edit' => 'Edit',
|
||||
'empty' => 'You do not have any saved addresses here, please try to create it by clicking the link below',
|
||||
'empty' => 'You do not have any saved addresses here, please try to create it by clicking the add button.',
|
||||
'create' => 'Create Address',
|
||||
'delete' => 'Delete',
|
||||
'make-default' => 'Make Default',
|
||||
|
|
@ -213,7 +213,7 @@ return [
|
|||
],
|
||||
|
||||
'create' => [
|
||||
'page-title' => 'Add Address Form',
|
||||
'page-title' => 'Add Address',
|
||||
'company_name' => 'Company name',
|
||||
'first_name' => 'First name',
|
||||
'last_name' => 'Last name',
|
||||
|
|
@ -579,7 +579,7 @@ return [
|
|||
'final-summary' => 'Thanks for showing your interest in our store we will send you tracking number once it shipped',
|
||||
'help' => 'If you need any kind of help please contact us at :support_email',
|
||||
'thanks' => 'Thanks!',
|
||||
|
||||
|
||||
'comment' => [
|
||||
'subject' => 'New comment added to your order',
|
||||
'dear' => 'Dear :customer_name',
|
||||
|
|
@ -618,9 +618,9 @@ 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',
|
||||
'inventory-heading' => 'New shipment #:shipment_id has been generated for Order #:order_id',
|
||||
'subject' => 'Shipment for your order #:order_id',
|
||||
'inventory-subject' => 'New shipment had been generated for Order #:order_id',
|
||||
'inventory-subject' => 'New shipment has been generated for Order #:order_id',
|
||||
'summary' => 'Summary of Shipment',
|
||||
'carrier' => 'Carrier',
|
||||
'tracking-number' => 'Tracking Number',
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
<input type="text" class="control" name="city" v-validate="'required|alpha_spaces'" value="{{ old('city') ?: $address->city }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<input type="text" class="control" name="city" v-validate="'required|regex:^[a-zA-Z \-]*$'" value="{{ old('city') ?: $address->city }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,11 @@
|
|||
|
||||
@if ($order->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}</td>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}
|
||||
@if ($order->coupon_code)
|
||||
({{ $order->coupon_code }})
|
||||
@endif
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password">{{ __('shop::app.customer.account.profile.password') }}</label>
|
||||
|
||||
<input type="password" id="password" class="control" name="password" data-vv-as=""{{ __('shop::app.customer.account.profile.password') }}"" v-validate="'min:6'">
|
||||
<input type="password" id="password" class="control" name="password" ref="password" data-vv-as=""{{ __('shop::app.customer.account.profile.password') }}"" v-validate="'min:6'">
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,44 +3,6 @@
|
|||
$comparableAttributes = $attributeRepository->findByField('is_comparable', 1);
|
||||
@endphp
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.comparison-component {
|
||||
width: 100%;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.comparison-component > h1 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 15px;
|
||||
min-width: 250px;
|
||||
max-width: 250px;
|
||||
line-height: 30px;
|
||||
vertical-align: top;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.icon.remove-product {
|
||||
top: 15px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.action > div {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="compare-product-template">
|
||||
<section class="comparison-component">
|
||||
|
|
@ -218,6 +180,10 @@
|
|||
} else {
|
||||
this.$set(this, 'products', this.products.filter(product => product.id != productId));
|
||||
}
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message }];
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("{{ __('velocity::app.error.something_went_wrong') }}");
|
||||
|
|
@ -234,6 +200,10 @@
|
|||
}
|
||||
|
||||
this.setStorageValue('compared_product', updatedItems);
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message }];
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@
|
|||
@if (in_array($category->display_mode, [null, 'products_only', 'products_and_description']))
|
||||
<?php $products = $productRepository->getAll($category->id); ?>
|
||||
|
||||
@if ($products->count())
|
||||
@include ('shop::products.list.toolbar')
|
||||
|
||||
@include ('shop::products.list.toolbar')
|
||||
@if ($products->count())
|
||||
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
.social-login-links .icon{width:18px;height:18px;vertical-align:middle;margin-bottom:3px;margin-right:3px;display:inline-block;background-size:cover}.social-login-links .icon.icon-facebook-login{background-image:url(../images/facebook-login.svg)}.social-login-links .icon.icon-twitter-login{background-image:url(../images/twitter-login.svg)}.social-login-links .icon.icon-google-login{background-image:url(../images/google-login.svg)}.social-login-links .icon.icon-linkedin-login{background-image:url(../images/linkedin-login.svg)}.social-login-links .icon.icon-github-login{background-image:url(../images/github-login.svg)}.social-login-links .icon.icon-instagram-login{background-image:url(../images/instagram-login.svg)}.auth-content .login-form .social-login-links .control-group,.auth-content .social-login-links .control-group{float:left;width:100%;margin-bottom:10px!important}.social-login-links .link{min-width:220px;max-width:100%;margin:0;cursor:pointer;padding:10px 15px;border-radius:3px;color:#fff;text-decoration:none;float:left}.social-login-links .link.facebook-link{background-color:#5272b3}.social-login-links .link.twitter-link{background-color:#0597e6}.social-login-links .link.google-link{background-color:#e45e52}.social-login-links .link.linkedin-link{background-color:#007bb6}.social-login-links .link.github-link{background-color:#24292e}.social-link-seperator{position:relative;border-top:1px solid #d3d3d3;margin:30px 0 25px;display:inline-block;width:100%}.social-link-seperator span{background-color:#fff;position:absolute;left:20px;top:-12px;padding:0 15px;text-align:center}
|
||||
.social-login-links .icon{width:18px;height:18px;vertical-align:middle;margin-bottom:3px;margin-right:3px;display:inline-block;background-size:cover}.social-login-links .icon.icon-facebook-login{background-image:url(../images/facebook-login.svg)}.social-login-links .icon.icon-twitter-login{background-image:url(../images/twitter-login.svg)}.social-login-links .icon.icon-google-login{background-image:url(../images/google-login.svg)}.social-login-links .icon.icon-linkedin-login{background-image:url(../images/linkedin-login.svg)}.social-login-links .icon.icon-github-login{background-image:url(../images/github-login.svg)}.social-login-links .icon.icon-instagram-login{background-image:url(../images/instagram-login.svg)}.auth-content .login-form .social-login-links .control-group,.auth-content .social-login-links .control-group{float:left;width:100%;margin-bottom:10px!important}.social-login-links .link{min-width:220px;max-width:100%;margin:0;cursor:pointer;padding:10px 15px;border-radius:3px;color:#fff;text-decoration:none;float:left}.social-login-links .link.facebook-link{background-color:#5272b3}.social-login-links .link.twitter-link{background-color:#0597e6}.social-login-links .link.google-link{background-color:#e45e52}.social-login-links .link.linkedin-link{background-color:#007bb6}.social-login-links .link.github-link{background-color:#24292e}.social-link-seperator{position:relative;border-top:1px solid #d3d3d3;margin:30px 0 25px;display:inline-block;width:100%}.social-link-seperator span{background-color:#fff;position:absolute;left:20px;top:-12px;padding:0 15px;text-align:center}.rtl{direction:rtl}.rtl .social-login-links .link{float:right}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"/css/social-login.css": "/css/social-login.css?id=b307787802e1de00eb1d"
|
||||
"/css/social-login.css": "/css/social-login.css?id=65d278094ee2727ac0d4"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\SocialLogin\Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class CustomerSocialAccountTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$now = Carbon::now();
|
||||
|
||||
DB::table('core_config')->insert(
|
||||
[
|
||||
'code' => 'customer.settings.social_login.enable_facebook',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => null,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('core_config')->insert(
|
||||
[
|
||||
'code' => 'customer.settings.social_login.enable_twitter',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => null,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('core_config')->insert(
|
||||
[
|
||||
'code' => 'customer.settings.social_login.enable_google',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => null,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('core_config')->insert(
|
||||
[
|
||||
'code' => 'customer.settings.social_login.enable_linkedin',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => null,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('core_config')->insert(
|
||||
[
|
||||
'code' => 'customer.settings.social_login.enable_github',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => null,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\SocialLogin\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(CustomerSocialAccountTableSeeder::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -67,11 +67,7 @@ class CustomerSocialAccountRepository extends Repository
|
|||
'provider_name' => $provider,
|
||||
'provider_id' => $providerUser->getId(),
|
||||
]);
|
||||
|
||||
$data['customer_group_id'] = $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id;
|
||||
|
||||
dd($data);
|
||||
|
||||
|
||||
if ($account) {
|
||||
return $account->customer;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
float: left;
|
||||
|
||||
|
||||
&.facebook-link {
|
||||
background-color: #5272B3;
|
||||
}
|
||||
|
|
@ -56,4 +56,16 @@
|
|||
padding: 0px 15px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// rtl css start here
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
|
||||
.social-login-links {
|
||||
.link {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +84,19 @@ class ThemeViewFinder extends FileViewFinder
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string contents of the view.
|
||||
*
|
||||
* @param callable|null $callback
|
||||
* @return array|string
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function render(callable $callback = null)
|
||||
{
|
||||
dd(111);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the array of paths where the views are being searched.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
"tooltip.js": "^1.3.1",
|
||||
"url-polyfill": "^1.1.5",
|
||||
"url-search-params-polyfill": "^6.0.0",
|
||||
"v-tooltip": "^2.0.3",
|
||||
"vue-multiselect": "^2.1.6",
|
||||
"vue-swatches": "^1.0.3"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,24 +0,0 @@
|
|||
/* flatpickr v4.6.3, @license MIT */
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Jerry Bendy <jerry@icewingcc.com>
|
||||
* @licence MIT
|
||||
*
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=e5e928de0a10dc274cd5",
|
||||
"/css/ui.css": "/css/ui.css?id=7a610c96759844d71103"
|
||||
"/js/ui.js": "/js/ui.js?id=3ccd955983e91b6ccc96",
|
||||
"/css/ui.css": "/css/ui.css?id=b5bedc0ff04a145ca18a"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,13 @@ import TimeComponent from './components/time';
|
|||
import SwatchPicker from './components/swatch-picker';
|
||||
import Debounce from './directives/debounce';
|
||||
import OverlayLoader from './components/overlay-loader';
|
||||
import VTooltip from 'v-tooltip';
|
||||
|
||||
VTooltip.options.defaultDelay = 0;
|
||||
|
||||
Vue.directive('tooltip', VTooltip.VTooltip)
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
Vue.component('flash-wrapper', FlashWrapper);
|
||||
Vue.component('flash', Flash);
|
||||
|
|
|
|||
|
|
@ -1235,4 +1235,86 @@ modal {
|
|||
left: 50%;
|
||||
margin-top: -24px;
|
||||
margin-left: -24px;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
display: block !important;
|
||||
z-index: 10000;
|
||||
|
||||
.tooltip-inner {
|
||||
background: black;
|
||||
color: white;
|
||||
border-radius: 4px;
|
||||
padding: 5px 10px 4px;
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
position: absolute;
|
||||
margin: 5px;
|
||||
border-color: black;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&[x-placement^="top"] {
|
||||
margin-bottom: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 5px 0 5px;
|
||||
border-left-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
bottom: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="bottom"] {
|
||||
margin-top: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 0 5px 5px 5px;
|
||||
border-left-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-top-color: transparent !important;
|
||||
top: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="right"] {
|
||||
margin-left: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 5px 5px 0;
|
||||
border-left-color: transparent !important;
|
||||
border-top-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
left: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="left"] {
|
||||
margin-right: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-top-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
right: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
height: 28px;
|
||||
height: 40px;
|
||||
border-radius: 2px;
|
||||
margin-right: 20px;
|
||||
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
align-items: center;
|
||||
background: #E7E7E7;
|
||||
font-size: 14px;
|
||||
height: 28px;
|
||||
height: 40px;
|
||||
color: #000311;
|
||||
letter-spacing: -0.22px;
|
||||
@include border-radius(2px);
|
||||
|
|
|
|||
|
|
@ -35,4 +35,6 @@ return [
|
|||
'items-per-page' => 'Przedmioty na stronę',
|
||||
'value-here' => 'Wartość tutaj',
|
||||
'numeric-value-here' => 'wartość liczbowa tutaj',
|
||||
'submit' => 'Prześlij'
|
||||
'submit' => 'Prześlij'
|
||||
]
|
||||
];
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
<div class="pagination">
|
||||
{{ $results->links() }}
|
||||
</div>
|
||||
@if (gettype($results) == 'object')
|
||||
<div class="pagination">
|
||||
{{ $results->links() }}
|
||||
</div>
|
||||
@endif
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=226121407d7f6a559c67",
|
||||
"/js/velocity.js": "/js/velocity.js?id=4a39566e232d46c78c1e",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
|
||||
"/css/velocity.css": "/css/velocity.css?id=91aa43446b2111505847"
|
||||
"/css/velocity.css": "/css/velocity.css?id=49c1e646d73ed339dbc3"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,18 +322,22 @@ class Helper extends Review
|
|||
}
|
||||
}
|
||||
|
||||
$priceHTML = view('shop::products.price', ['product' => $product])->render();
|
||||
|
||||
$isProductNew = ($product->new && ! strpos($priceHTML, 'sticker sale') > 0) ? __('shop::app.products.new') : false;
|
||||
|
||||
return [
|
||||
'priceHTML' => $priceHTML,
|
||||
'avgRating' => $avgRatings,
|
||||
'totalReviews' => $totalReviews,
|
||||
'image' => $productImage,
|
||||
'new' => $isProductNew,
|
||||
'galleryImages' => $galleryImages,
|
||||
'name' => $product->name,
|
||||
'slug' => $product->url_key,
|
||||
'description' => $product->description,
|
||||
'shortDescription' => $product->short_description,
|
||||
'firstReviewText' => trans('velocity::app.products.be-first-review'),
|
||||
'new' => $product->new ? __('shop::app.products.new') : false,
|
||||
'priceHTML' => view('shop::products.price', ['product' => $product])->render(),
|
||||
'defaultAddToCart' => view('shop::products.add-buttons', ['product' => $product])->render(),
|
||||
'addToCartHtml' => view('shop::products.add-to-cart', [
|
||||
'product' => $product,
|
||||
|
|
@ -383,6 +387,7 @@ class Helper extends Review
|
|||
$productMetaDetails['slug'] = $product->url_key;
|
||||
$productMetaDetails['image'] = $formattedProduct['image'];
|
||||
$productMetaDetails['priceHTML'] = $formattedProduct['priceHTML'];
|
||||
$productMetaDetails['new'] = $formattedProduct['new'];
|
||||
$productMetaDetails['addToCartHtml'] = $formattedProduct['addToCartHtml'];
|
||||
$productMetaDetails['galleryImages'] = $formattedProduct['galleryImages'];
|
||||
$productMetaDetails['defaultAddToCart'] = $formattedProduct['defaultAddToCart'];
|
||||
|
|
@ -393,7 +398,7 @@ class Helper extends Review
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $productCollection;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class ComparisonController extends Controller
|
|||
$productFlatRepository = app('\Webkul\Product\Models\ProductFlat');
|
||||
|
||||
$productFlat = $productFlatRepository
|
||||
->where('product_id', $productId)
|
||||
->where('id', $productId)
|
||||
->orWhere('parent_id', $productId)
|
||||
->get()
|
||||
->first();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
> div {
|
||||
&.row {
|
||||
padding-bottom: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
.vc-small-screen {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
|
||||
}
|
||||
|
|
@ -47,6 +49,36 @@
|
|||
.footer .currency {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
|
||||
.table {
|
||||
width: 90%;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 68px;
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
.per-page {
|
||||
position: absolute;
|
||||
margin-top: 66px;
|
||||
margin-right: -1px;
|
||||
margin-left: 17px;
|
||||
width: 151px;
|
||||
}
|
||||
|
||||
.filter-left {
|
||||
position: relative;
|
||||
margin-right: -6px!important;
|
||||
}
|
||||
|
||||
.dropdown-filters {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
button.btn.btn-sm.btn-primary.apply-filter {
|
||||
margin-top: 10px;
|
||||
margin-left: -158px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
|
|
@ -126,7 +158,7 @@
|
|||
.badge-wrapper,
|
||||
.badge-container {
|
||||
top: -2px;
|
||||
left: -7px;
|
||||
left: -12px;
|
||||
position: relative;
|
||||
|
||||
.badge {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,28 @@ body {
|
|||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.mini-cart-container {
|
||||
#mini-cart {
|
||||
.badge {
|
||||
top: -6px;
|
||||
left: 90%;
|
||||
}
|
||||
|
||||
.cart-text {
|
||||
left: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
~ .wishlist-btn , ~ .compare-btn {
|
||||
.badge-container {
|
||||
.badge {
|
||||
left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-content-wrapper {
|
||||
|
|
@ -51,8 +73,22 @@ body {
|
|||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.vc-header {
|
||||
> div {
|
||||
&.vc-small-screen {
|
||||
.right-vc-header {
|
||||
.badge-container {
|
||||
left: -4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-content-wrapper .vc-header
|
||||
|
||||
.mini-cart-container {
|
||||
#mini-cart {
|
||||
.badge {
|
||||
|
|
@ -154,6 +190,10 @@ body {
|
|||
left: unset;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
.card-total-price {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -363,6 +403,22 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.advertisement-three-container {
|
||||
.second-panel {
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.advertisement-two-container {
|
||||
.row {
|
||||
padding: 0 !important;
|
||||
|
||||
.pr0 {
|
||||
padding-right: 15px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shared
|
||||
.text-right {
|
||||
text-align: left !important;
|
||||
|
|
@ -370,6 +426,9 @@ body {
|
|||
.text-left {
|
||||
text-align: right !important;
|
||||
}
|
||||
.pr0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
.pl0 {
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
|
|
@ -452,8 +511,9 @@ body {
|
|||
|
||||
.velocity-divide-page {
|
||||
.left {
|
||||
right: 0;
|
||||
width: 200px;
|
||||
right: 35px;
|
||||
width: 150px;
|
||||
top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ a {
|
|||
}
|
||||
|
||||
.scrollable {
|
||||
max-height: 100vh;
|
||||
max-height: 100%;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@
|
|||
|
||||
searchedItem.forEach(item => {
|
||||
let splitedItem = item.split('=');
|
||||
updatedSearchedCollection[splitedItem[0]] = splitedItem[1];
|
||||
updatedSearchedCollection[splitedItem[0]] = decodeURI(splitedItem[1]);
|
||||
});
|
||||
|
||||
if (updatedSearchedCollection['image-search'] == 1) {
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@
|
|||
name="billing[phone]"
|
||||
v-validate="'required'"
|
||||
v-model="address.billing.phone"
|
||||
@keyup="validateForm('address-form')"
|
||||
@change="validateForm('address-form')"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.phone') }}"" />
|
||||
|
||||
<span class="control-error" v-if="errors.has('address-form.billing[phone]')">
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="mandatory">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
<input type="text" class="control" name="city" value="{{ old('city') ?? $address->city }}" v-validate="'required|alpha_spaces'" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<input type="text" class="control" name="city" value="{{ old('city') ?? $address->city }}" v-validate="'required|regex:^[a-zA-Z \-]*$'" data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
@section('page-detail-wrapper')
|
||||
@if ($addresses->isEmpty())
|
||||
<a href="{{ route('customer.address.create') }}" class="theme-btn light unset pull-right">
|
||||
<a href="{{ route('customer.address.create') }}" class="theme-btn light unset address-button">
|
||||
{{ __('shop::app.customer.account.address.index.add') }}
|
||||
</a>
|
||||
@endif
|
||||
|
|
@ -80,3 +80,12 @@
|
|||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@if ($addresses->isEmpty())
|
||||
<style>
|
||||
.address-button {
|
||||
position: absolute;
|
||||
margin-top: 92px;
|
||||
}
|
||||
</style>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -167,6 +167,9 @@
|
|||
@if ($order->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}
|
||||
@if ($order->coupon_code)
|
||||
({{ $order->coupon_code }})
|
||||
@endif
|
||||
<span class="dash-icon">-</span>
|
||||
</td>
|
||||
<td>{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}</td>
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@
|
|||
<input
|
||||
value=""
|
||||
name="password"
|
||||
ref="password"
|
||||
type="password"
|
||||
v-validate="'min:6|max:18'" />
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
|
||||
@if ($isProductsDisplayMode)
|
||||
<div class="filters-container">
|
||||
<template v-if="products.length > 0">
|
||||
<template v-if="products.length >= 0">
|
||||
@include ('shop::products.list.toolbar')
|
||||
</template>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -149,4 +149,25 @@
|
|||
});
|
||||
})()
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
|
||||
/* waiting for the window to appear */
|
||||
let waitForEl = function(selector, callback) {
|
||||
if (jQuery(selector).length) {
|
||||
callback();
|
||||
} else {
|
||||
setTimeout(function() {waitForEl(selector, callback);}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
/* positioning when .zoomWindow div available */
|
||||
waitForEl('.zoomWindow', function() {
|
||||
if ($('body').hasClass("rtl")) {
|
||||
$('.zoomWindow').css('right', '522px');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
*
|
||||
!.gitignore
|
||||
!data/
|
||||
!.gitignore
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
Loading…
Reference in New Issue