Merge branch 'master' of https://github.com/bagisto/bagisto into sarga-v1

This commit is contained in:
merdan 2022-09-20 16:43:54 +05:00
commit a6026df462
98 changed files with 546 additions and 337 deletions

View File

@ -1,6 +1,6 @@
APP_NAME=Bagisto
APP_ENV=local
APP_VERSION=1.4.4
APP_VERSION=1.4.5
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

View File

@ -2,6 +2,40 @@
This changelog consists of the bug & security fixes and new features being included in the releases listed below.
## **v1.4.5 (15th of September 2022)** - *Release*
* #6690 [enhancement] - Mass update option should be available for the categories section.
* #6689 [enhancement] - There should be a proper UI for categories in the shop if there are sub0category of any category.
* #6685 [enhancement] - There should be an option to filter the suspended customer. in the admin panel.
* #6646 [enhancement] - The actual and special prices both should be visible if there is any special price for a configurable product.
* #6345 [enhancement] - Invoice Design Can Be Enhanced
* #6394 [enhancement] - The page should focus on the warning message if the customer is trying book the product without selecting the required fields.
* #1929 [enhancement] - Actual product amount and discounted amount both should display.
* #6699 [fixed] - The sale icon should be visible if there is any special price for a configurable product.
* #6705 [fixed] - The filter value should be correct if the admin is trying to filter products by the status filter.
* #6697 [fixed] - The add button should be hidden from view page if the user has no permission to create.
* #6687 [fixed] - There is an exception while the admin is updating the Velocity meta data
* #6686 [fixed] - The notification should be visible in the admin panel if the order status is pending payment.
* #6679 [fixed] - The admin is not able to create the catalog rule for the configurable product, with SKU condition type
* #6668 [fixed] - The back button should work if the customer is adding a new address on the checkout page.
* #6366 [fixed] - The product's image is adjusted when the user is trying to view any product.
## **v1.4.4 (30th of August 2022)** - *Release*
* #5584 [feature] - there should be an feature so that when we click on mark as read , notification box should close.

View File

@ -14,6 +14,7 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class,

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array<int, string|null>
*/
public function hosts()
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.2.0
* Pusher JavaScript Library v7.4.0
* https://pusher.com/
*
* Copyright 2020, Pusher
@ -18,13 +18,13 @@
*/
/*!
* Vue.js v2.7.7
* Vue.js v2.7.10
* (c) 2014-2022 Evan You
* Released under the MIT License.
*/
/*!
* jQuery JavaScript Library v3.6.0
* jQuery JavaScript Library v3.6.1
* https://jquery.com/
*
* Includes Sizzle.js
@ -34,7 +34,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2021-03-02T17:08Z
* Date: 2022-08-26T17:52Z
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=342ead48e2eb8d7dc7a3",
"/css/admin.css": "/css/admin.css?id=bd6f253e4db4d12d1a57"
"/js/admin.js": "/js/admin.js?id=6634340c498715fb5f58",
"/css/admin.css": "/css/admin.css?id=253e4340dd4c55e09cba"
}

View File

@ -165,6 +165,11 @@ return [
'name' => 'admin::app.acl.mass-delete',
'route' => 'admin.catalog.categories.massdelete',
'sort' => 4,
], [
'key' => 'catalog.categories.mass-update',
'name' => 'admin::app.acl.mass-update',
'route' => 'admin.catalog.categories.mass-update',
'sort' => 4,
], [
'key' => 'catalog.attributes',
'name' => 'admin::app.acl.attributes',

View File

@ -174,5 +174,16 @@ class CategoryDataGrid extends DataGrid
'action' => route('admin.catalog.categories.massdelete'),
'method' => 'POST',
]);
$this->addMassAction([
'type' => 'update',
'label' => trans('admin::app.datagrid.update-status'),
'action' => route('admin.catalog.categories.mass-update'),
'method' => 'POST',
'options' => [
trans('admin::app.datagrid.active') => 1,
trans('admin::app.datagrid.inactive') => 0,
],
]);
}
}

View File

@ -56,6 +56,7 @@ class CustomerDataGrid extends DataGrid
$this->addFilter('phone', 'customers.phone');
$this->addFilter('gender', 'customers.gender');
$this->addFilter('status', 'status');
$this->addFilter('is_suspended', 'customers.is_suspended');
$this->setQueryBuilder($queryBuilder);
}
@ -158,6 +159,16 @@ class CustomerDataGrid extends DataGrid
return $html;
},
]);
$this->addColumn([
'index' => 'is_suspended',
'label' => trans('admin::app.customers.customers.suspended'),
'type' => 'boolean',
'searchable' => false,
'sortable' => true,
'filterable' => true,
'visibility' => false,
]);
}
/**

View File

@ -215,8 +215,7 @@ $(function() {
localStorage.setItem('bagisto-sidebar', this.isMenuOpen);
},
checkMode(){
checkMode() {
this.isDarkMode = ! this.isDarkMode;
localStorage.setItem('dark-mode', this.isDarkMode);
@ -233,7 +232,7 @@ $(function() {
return false;
},
CheckIsMenuOpen: function(){
CheckIsMenuOpen: function() {
return this.isMenuOpen;
}
}

View File

@ -22,23 +22,20 @@ export default {
},
methods: {
toggle: function () {
this.$root.checkMode();
this.toggleBodyClass();
},
toggleBodyClass: function(){
let element = document.body;
element.classList.toggle("dark-mode");
if(this.buttonText == this.darkMode){
if (this.buttonText == this.darkMode) {
this.buttonText = this.lightMode;
}else{
} else {
this.buttonText = this.darkMode;
}
}

View File

@ -19,9 +19,12 @@ export default {
toggle: function () {
this.$root.toggleMenu();
if(this.$root.isMenuOpen && this.iconClass == 'accordian-right-icon'){
if (
this.$root.isMenuOpen
&& this.iconClass == 'accordian-right-icon'
) {
this.iconClass = this.leftIconClass;
}else{
} else {
this.iconClass = this.rightIconClass;
}
},

View File

@ -91,6 +91,10 @@ export default {
closed: {
icon: 'closed-icon',
message: 'Order Closed'
},
pending_payment: {
icon: 'pending-icon',
message: 'Payment Pending'
}
},

View File

@ -731,6 +731,7 @@ return [
'image' => 'صورة',
'filterable-attributes' => 'سمات قابلة للفلترة',
'attributes' => 'السمات',
'mass-update-success' => 'تم تحديث جميع الفئات المحددة بنجاح',
],
],
@ -1658,6 +1659,7 @@ return [
'canceled' => 'تم إلغاء الطلب',
'pending' => 'انتظار الطلب',
'processing' => 'معالجة الطلب',
'pending_payment' => 'في انتظار الدفع',
],
],
];

View File

@ -737,6 +737,8 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1676,6 +1678,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -723,6 +723,7 @@ return [
'image' => 'Bild',
'filterable-attributes' => 'Filterbare Attribute',
'attributes' => 'Attribute',
'mass-update-success' => 'Alle ausgewählten Kategorien wurden erfolgreich aktualisiert',
],
],
'configuration' =>
@ -1635,6 +1636,7 @@ return [
'canceled' => 'Bestellung storniert',
'pending' => 'Bestellung ausstehend',
'processing' => 'Auftragsabwicklung',
'pending_payment' => 'Ausstehende Zahlung',
],
],
];

View File

@ -737,6 +737,7 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1633,6 +1634,7 @@ return [
'logo-size' => 'Image resolution should be like 112px X 41px',
'favicon-size' => 'Image resolution should be like 16px X 16px',
'invoice-logo-size' => 'Image resolution should be like 192px X 50px',
],
],
@ -1676,7 +1678,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending payment' => 'Pending Payment',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -733,6 +733,7 @@ return [
'image' => 'Imagen',
'filterable-attributes' => 'Atributos filtrables',
'attributes' => 'Atributos',
'mass-update-success' => 'Todas las categorías seleccionadas se han actualizado correctamente',
],
],
@ -1656,6 +1657,7 @@ return [
'canceled' => 'Orden cancelada',
'pending' => 'Orden pendiente',
'processing' => 'procesando orden',
'pending_payment' => 'Pago pendiente',
],
],
];

View File

@ -716,6 +716,7 @@ return [
'image' => 'تصویر',
'filterable-attributes' => 'ویژگی های فیلتر',
'attributes' => 'ویژگی های',
'mass-update-success' => 'همه دسته های انتخابی با موفقیت به روز شدند',
],
],
@ -1635,6 +1636,7 @@ return [
'canceled' => 'سفارش لغو شد',
'pending' => 'سفارش در انتظار',
'processing' => 'پردازش سفارش',
'pending_payment' => 'در انتظار پرداخت',
],
],
];

View File

@ -736,6 +736,7 @@ return [
'image' => 'Image',
'filterable-attributes' => 'Attributs filtrables',
'attributes' => 'Les attributs',
'mass-update-success' => 'Toutes les catégories sélectionnées ont été mises à jour avec succès',
],
],
@ -1672,6 +1673,7 @@ return [
'canceled' => 'Tilaus peruutettu',
'pending' => 'Tilaus vireillä',
'processing' => 'Tilausta Käsitellään',
'pending_payment' => 'En attente de paiement',
],
],
];

View File

@ -737,6 +737,7 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1676,6 +1677,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -734,6 +734,7 @@ return [
'attributes' => 'गुण',
'image-size' => 'इमेज रेजोल्यूशन 300px X 168px जैसा होना चाहिए',
'image-size-logo' => 'इमेज रेजोल्यूशन 20px X 20px जैसा होना चाहिए',
'mass-update-success' => 'सभी चयनित श्रेणियों को सफलतापूर्वक अपडेट कर दिया गया है',
],
],
@ -1673,6 +1674,7 @@ return [
'canceled' => 'आदेश रद्द',
'pending' => 'आदेश लम्बित',
'processing' => 'आदेश प्रसंस्करण',
'pending_payment' => 'En attente de paiement',
],
],
];

View File

@ -721,6 +721,7 @@ return [
'image' => 'Immagine',
'filterable-attributes' => 'Attributi filtrabili',
'attributes' => 'Attributi',
'mass-update-success' => 'Tutte le categorie selezionate sono state aggiornate con successo',
],
],
@ -1643,6 +1644,7 @@ return [
'canceled' => 'Ordine annullato',
'pending' => 'ordine pendente',
'processing' => "Elaborazione dell'ordine",
'pending_payment' => 'In attesa di Pagamento',
],
],
];

View File

@ -737,6 +737,7 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1676,6 +1677,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -715,6 +715,7 @@ return [
'image' => 'Afbeelding',
'filterable-attributes' => 'Filtreerbare kenmerken',
'attributes' => 'Attributen',
'mass-update-success' => 'Alle geselecteerde categorieën zijn met succes bijgewerkt',
],
],
@ -1635,6 +1636,7 @@ return [
'canceled' => 'Bestelling geannuleerd',
'pending' => 'Order in behandeling',
'processing' => 'Orderverwerking',
'pending_payment' => 'In afwachting van betaling',
],
],
];

View File

@ -716,6 +716,7 @@ return [
'filterable-attributes' => '
„filterable-atrybuty” => „Filtrowalne atrybuty',
'attributes' => 'Atrybuty',
'mass-update-success' => 'Wszystkie wybrane kategorie zostały pomyślnie zaktualizowane',
],
],
@ -1624,6 +1625,7 @@ return [
'canceled' => 'Zamówienie anulowane',
'pending' => 'Zamówienie w trakcie realizacji',
'processing' => 'przetwarzanie zamówienia',
'pending_payment' => 'oczekująca płatność',
],
],
];

View File

@ -714,6 +714,7 @@ return [
'image' => 'Imagem',
'filterable-attributes' => 'Atributos filtráveis',
'attributes' => 'Atributos',
'mass-update-success' => 'Todas as categorias selecionadas foram atualizadas com sucesso',
],
],
@ -1638,6 +1639,7 @@ return [
'canceled' => 'Pedido cancelado',
'pending' => 'pedido pendente',
'processing' => 'processamento de pedido',
'pending_payment' => 'Pagamento Pendente',
],
],
];

View File

@ -737,6 +737,7 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1676,6 +1677,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -737,6 +737,7 @@ return [
'attributes' => 'Attributes',
'image-size' => 'Image resolution should be like 300px X 168px',
'image-size-logo' => 'Image resolution should be like 20px X 20px',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1676,6 +1677,7 @@ return [
'canceled' => 'Order Canceled',
'pending' => 'Order Pending',
'processing' => 'Order Processing',
'pending_payment' => 'Pending Payment',
],
],
];

View File

@ -721,6 +721,7 @@ return [
'image' => 'Görsel',
'filterable-attributes' => 'Filtrelenebilir Nitelikler',
'attributes' => 'Nitelikler',
'mass-update-success' => 'All the selected categories have been updated successfully',
],
],
@ -1590,6 +1591,7 @@ return [
'set-order-status' => 'Faturayı oluşturduktan sonra sipariş durumunu ayarlayın.',
'generate-invoice-applicable' => 'Otomatik fatura oluştur etkinse geçerlidir',
'records-found' => 'Kayıt(lar) bulundu',
],
],
@ -1633,6 +1635,7 @@ return [
'canceled' => 'Sipariş İptal Edildi',
'pending' => 'Sipariş beklemede',
'processing' => 'sipariş düzenleniyor',
'pending_payment' => 'bekleyen ödeme',
],
],
];

View File

@ -716,6 +716,7 @@ return [
'image' => '图片',
'filterable-attributes' => '可过滤属性',
'attributes' => '属性列表',
'mass-update-success' => '所有選擇的類別都已成功更新',
],
],
@ -1630,6 +1631,7 @@ return [
'canceled' => '订单取消',
'pending' => '订单待处理',
'processing' => '订单处理',
'pending_payment' => '待付款',
],
],
];

View File

@ -12,12 +12,14 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('catalog.attributes.create'))
<a
href="{{ route('admin.catalog.attributes.create') }}"
class="btn btn-lg btn-primary"
>
{{ __('admin::app.catalog.attributes.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -16,12 +16,14 @@ $locale = core()->getRequestedLocaleCode();
</div>
<div class="page-action">
@if (bouncer()->hasPermission('catalog.categories.create'))
<a
href="{{ route('admin.catalog.categories.create') }}"
class="btn btn-lg btn-primary"
>
{{ __('admin::app.catalog.categories.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('catalog.families.create'))
<a href="{{ route('admin.catalog.families.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.catalog.families.add-family-btn-title') }}
</a>
@endif
</div>
</div>

View File

@ -5,7 +5,7 @@
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.images.controls.before', ['product' => $product]) !!}
<div class="control-group {{ $errors->has('images.files.*') ? 'has-error' : '' }}">
<label>{{ __('admin::app.catalog.categories.image') }}</label>
<label class="required">{{ __('admin::app.catalog.categories.image') }}</label>
<product-image></product-image>

View File

@ -19,10 +19,11 @@
{{ __('admin::app.export.export') }}
</span>
</div>
@if (bouncer()->hasPermission('catalog.products.create'))
<a href="{{ route('admin.catalog.products.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.catalog.products.add-product-btn-title') }}
</a>
@endif
</div>
</div>

View File

@ -19,10 +19,11 @@
{{ __('admin::app.export.export') }}
</span>
</div>
@if (bouncer()->hasPermission('cms.pages.create'))
<a href="{{ route('admin.cms.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.cms.pages.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -16,9 +16,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('customers.addresses.create '))
<a href="{{ route('admin.customer.addresses.create', ['id' => $customer->id]) }}" class="btn btn-lg btn-primary">
{{ __('admin::app.customers.addresses.create-btn-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('customers.groups.create'))
<a href="{{ route('admin.groups.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.customers.groups.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -19,10 +19,11 @@
{{ __('admin::app.export.export') }}
</span>
</div>
@if (bouncer()->hasPermission('customers.customers.create'))
<a href="{{ route('admin.customer.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.customers.customers.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -4,7 +4,8 @@
'canceled'=> trans('admin::app.notification.order-status-messages.canceled'),
'closed' => trans('admin::app.notification.order-status-messages.closed'),
'completed'=> trans('admin::app.notification.order-status-messages.completed'),
'processing' => trans('admin::app.notification.order-status-messages.processing')
'processing' => trans('admin::app.notification.order-status-messages.processing'),
'pending_payment' => trans('admin::app.notification.order-status-messages.pending_payment')
];
$allLocales = core()->getAllLocales()->pluck('name', 'code');
@endphp

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.email-marketing.campaigns.create'))
<a href="{{ route('admin.campaigns.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.marketing.campaigns.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.email-marketing.events.create'))
<a href="{{ route('admin.events.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.marketing.events.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.email-marketing.email-templates.create'))
<a href="{{ route('admin.email-templates.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.marketing.templates.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -18,9 +18,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.promotions.cart-rules.create'))
<a href="{{ route('admin.cart-rules.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.promotions.cart-rules.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -218,9 +218,9 @@
</div>
<div v-else>
<div class="control-group" :class="[errors.has('value') ? 'has-error' : '']" v-if="matchedAttribute.type == 'text' || matchedAttribute.type == 'price' || matchedAttribute.type == 'decimal' || matchedAttribute.type == 'integer'">
<input v-validate="matchedAttribute.type == 'price' ? 'decimal:2' : '' || matchedAttribute.type == 'decimal' ? 'decimal:2' : '' || matchedAttribute.type == 'integer' ? 'decimal:2' : '' || matchedAttribute.type == 'text' ? 'alpha_num' : ''" class="control" :name="['conditions[' + index + '][value]']" v-model="condition.value" name="value"/>
<span class="control-error" v-if="errors.has('value')" v-text="errors.first('value')"></span>
<div class="control-group" :class="[errors.has('conditions[' + index + '][value]') ? 'has-error' : '']" v-if="matchedAttribute.type == 'text' || matchedAttribute.type == 'price' || matchedAttribute.type == 'decimal' || matchedAttribute.type == 'integer'">
<input v-validate="matchedAttribute.type == 'price' ? 'decimal:2' : '' || matchedAttribute.type == 'decimal' ? 'decimal:2' : '' || matchedAttribute.type == 'integer' ? 'decimal:2' : '' || matchedAttribute.type == 'text' ? 'alpha_dash' : ''" class="control" :name="['conditions[' + index + '][value]']" v-model="condition.value" data-vv-as="&quot;{{ __('admin::app.promotions.catalog-rules.conditions') }}&quot;"/>
<span class="control-error" v-if="errors.has('conditions[' + index + '][value]')" v-text="errors.first('conditions[' + index + '][value]')"></span>
</div>
<div class="control-group date" v-if="matchedAttribute.type == 'date'">

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.promotions.catalog-rules'))
<a href="{{ route('admin.catalog-rules.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.promotions.catalog-rules.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('marketing.sitemaps.create'))
<a href="{{ route('admin.sitemaps.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.marketing.sitemaps.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -117,6 +117,10 @@
.text-center {
text-align: center;
}
.logo {
margin-left: 300px;
}
</style>
</head>

View File

@ -95,7 +95,7 @@
</span>
<span class="value">
{{ __('admin::app.notification.order-status-messages.'.strtolower($order->status_label)) }}
{{ __('admin::app.notification.order-status-messages.'.strtolower($order->status)) }}
</span>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.channels.create'))
<a href="{{ route('admin.channels.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.channels.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.currencies.create'))
<a href="{{ route('admin.currencies.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.currencies.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -15,10 +15,11 @@
<a href="{{ route('admin.exchange_rates.update_rates') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.exchange_rates.update-rates') }}
</a>
@if (bouncer()->hasPermission('settings.exchange_rates.create'))
<a href="{{ route('admin.exchange_rates.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.exchange_rates.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.inventory_sources.create'))
<a href="{{ route('admin.inventory_sources.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.inventory_sources.add') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.locales.create'))
<a href="{{ route('admin.locales.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.locales.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -18,9 +18,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.sliders.create'))
<a href="{{ route('admin.sliders.store') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.sliders.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.taxes.tax-categories.create'))
<a href="{{ route('admin.tax-categories.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.tax-categories.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -46,10 +46,11 @@
{{ __('admin::app.export.export') }}
</span>
</div>
@if (bouncer()->hasPermission('settings.taxes.tax-rates.create'))
<a href="{{ route('admin.tax-rates.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.tax-rates.add-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.users.roles.create'))
<a href="{{ route('admin.roles.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.users.roles.add-role-title') }}
</a>
@endif
</div>
</div>

View File

@ -12,9 +12,11 @@
</div>
<div class="page-action">
@if (bouncer()->hasPermission('settings.users.users.create'))
<a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.users.users.add-user-title') }}
</a>
@endif
</div>
</div>

View File

@ -104,6 +104,10 @@ Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_ur
'redirect' => 'admin.catalog.categories.index',
])->name('admin.catalog.categories.massdelete');
Route::post('categories/mass-update', [CategoryController::class, 'massUpdate'])->defaults('_config', [
'redirect' => 'admin.catalog.categories.index',
])->name('admin.catalog.categories.mass-update');
Route::post('/categories/product/count', [CategoryController::class, 'categoryProductCount'])->name('admin.catalog.categories.product.count');
/**

View File

@ -136,7 +136,7 @@ class AttributeRepository extends Repository
*/
public function getFilterAttributes()
{
return $this->model->where('is_filterable', 1)->with('options')->get();
return $this->model->with(['options', 'options.translations'])->where('is_filterable', 1)->get();
}
/**

View File

@ -205,6 +205,37 @@ class CategoryController extends Controller
return redirect()->route($this->_config['redirect']);
}
/**
* Mass update Category.
*
* @return \Illuminate\Http\Response
*/
public function massUpdate()
{
$data = request()->all();
if (! isset($data['massaction-type']) || ! $data['massaction-type'] == 'update') {
return redirect()->back();
}
$categoryIds = explode(',', $data['indexes']);
foreach ($categoryIds as $categoryId) {
Event::dispatch('catalog.categories.mass-update.before', $categoryId);
$category = $this->categoryRepository->find($categoryId);
$category->status = $data['update-options'];
$category->save();
Event::dispatch('catalog.categories.mass-update.after', $category);
}
session()->flash('success', trans('admin::app.catalog.categories.mass-update-success'));
return redirect()->route($this->_config['redirect']);
}
/**
* Get category product count.
*

View File

@ -94,6 +94,8 @@ class Category extends TranslatableModel implements CategoryContract
'options' => function ($query) {
$query->orderBy('sort_order');
},
'translations',
'options.translations',
]);
}

View File

@ -284,6 +284,7 @@ class CategoryRepository extends Repository
foreach ($attributeNames as $attributeName) {
foreach (core()->getAllLocales() as $locale) {
if ($requestedLocale == $locale->code) {
foreach ($model->translatedAttributes as $attribute) {
if ($attribute === $attributeName) {
$data[$locale->code][$attribute] = isset($data[$requestedLocale][$attribute])
@ -293,6 +294,7 @@ class CategoryRepository extends Repository
}
}
}
}
return $data;
}

View File

@ -319,11 +319,9 @@ class ProductController extends Controller
{
$data = request()->all();
if (! isset($data['massaction-type'])) {
return redirect()->back();
}
if (! $data['massaction-type'] == 'update') {
if (! isset($data['massaction-type'])
|| ! $data['massaction-type'] == 'update'
) {
return redirect()->back();
}

View File

@ -2,13 +2,14 @@
namespace Webkul\Product\Http\Requests;
use Illuminate\Support\Str;
use Illuminate\Foundation\Http\FormRequest;
use Webkul\Admin\Validations\ProductCategoryUniqueSlug;
use Webkul\Core\Contracts\Validations\Decimal;
use Webkul\Core\Contracts\Validations\Slug;
use Webkul\Core\Contracts\Validations\Decimal;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Product\Repositories\ProductAttributeValueRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Admin\Validations\ProductCategoryUniqueSlug;
use Webkul\Product\Repositories\ProductAttributeValueRepository;
class ProductForm extends FormRequest
{
@ -66,6 +67,16 @@ class ProductForm extends FormRequest
'special_price' => ['nullable', new Decimal, 'lt:price'],
]);
if (request()->images) {
foreach (request()->images['files'] as $key => $file) {
if (Str::contains($key, 'image_')) {
$this->rules = array_merge($this->rules, [
'images.files.' . $key => ['required', 'mimes:bmp,jpeg,jpg,png,webp'],
]);
}
}
}
foreach ($product->getEditableAttributes() as $attribute) {
if (
in_array($attribute->code, ['sku', 'url_key'])

View File

@ -33,21 +33,6 @@ class ProductFlatRepository extends Repository
return 'Webkul\Product\Contracts\ProductFlat';
}
/**
* Get category product model.
*
* @param int $categoryId
* @return \Illuminate\Support\Querybuilder
*/
public function categoryProductQueryBuilder($categoryId)
{
return $this->model
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId)
->where('product_flat.channel', core()->getCurrentChannelCode())
->where('product_flat.locale', app()->getLocale());
}
/**
* Update `product_flat` custom column.
*
@ -66,106 +51,6 @@ class ProductFlatRepository extends Repository
})->update(['product_flat.' . $attribute->code => \DB::raw($listener->attributeTypeFields[$attribute->type] . '_value')]);
}
/**
* Get category product attribute.
*
* @param int $categoryId
* @return array
*/
public function getCategoryProductAttribute($categoryId)
{
$qb = $this->categoryProductQueryBuilder($categoryId);
$childQuery = $this->model->distinct()->whereIn('parent_id', $qb->distinct()->select(['id']));
$attributeValues = $this->model
->distinct()
->leftJoin('product_attribute_values as pa', 'product_flat.product_id', 'pa.product_id')
->leftJoin('attributes as at', 'pa.attribute_id', 'at.id')
->leftJoin('product_super_attributes as ps', 'product_flat.product_id', 'ps.product_id')
->select('pa.integer_value', 'pa.text_value', 'pa.attribute_id', 'ps.attribute_id as attributeId')
->where('is_filterable', 1)
->where(function ($query) use ($qb, $childQuery) {
$query->whereIn('pa.product_id', $qb->distinct()->select(['product_flat.product_id']));
$query->orWhereIn('pa.product_id', $childQuery->select(['product_flat.product_id']));
})
->get();
$attributeInfo['attributeOptions'] = $attributeInfo['attributes'] = [];
foreach ($attributeValues as $attribute) {
$attributeKeys = array_keys($attribute->toArray());
foreach ($attributeKeys as $key) {
if (! is_null($attribute[$key])) {
if (
$key == 'integer_value'
&& ! in_array($attribute[$key], $attributeInfo['attributeOptions'])
) {
array_push($attributeInfo['attributeOptions'], $attribute[$key]);
} elseif (
$key == 'text_value'
&& ! in_array($attribute[$key], $attributeInfo['attributeOptions'])
) {
$multiSelectArrributes = explode(",", $attribute[$key]);
foreach ($multiSelectArrributes as $multi) {
if (! in_array($multi, $attributeInfo['attributeOptions'])) {
array_push($attributeInfo['attributeOptions'], $multi);
}
}
} elseif (
(
$key == 'attribute_id'
|| $key == 'attributeId'
)
&& ! in_array($attribute[$key], $attributeInfo['attributes'])
) {
array_push($attributeInfo['attributes'], $attribute[$key]);
}
}
}
}
return $attributeInfo;
}
/**
* Filter attributes according to products.
*
* @param \Webkul\Category\Contracts\Category $category
* @return \Illuminate\Support\Collection
*/
public function getProductsRelatedFilterableAttributes($category)
{
static $loadedCategoryAttributes = [];
if (array_key_exists($category->id, $loadedCategoryAttributes)) {
return $loadedCategoryAttributes[$category->id];
}
$productsCount = $this->categoryProductQueryBuilder($category->id)->count();
if ($productsCount > 0) {
$categoryFilterableAttributes = $category->filterableAttributes->pluck('id')->toArray();
$productCategoryAttributes = $this->getCategoryProductAttribute($category->id);
$allFilterableAttributes = array_filter(array_unique(array_intersect($categoryFilterableAttributes, $productCategoryAttributes['attributes'])));
$attributes = $this->attributeRepository->getModel()::with([
'options' => function ($query) use ($productCategoryAttributes) {
return $query->whereIn('id', $productCategoryAttributes['attributeOptions'])
->orderBy('sort_order');
}
])->whereIn('id', $allFilterableAttributes)->get();
return $loadedCategoryAttributes[$category->id] = $attributes;
} else {
return $loadedCategoryAttributes[$category->id] = $category->filterableAttributes;
}
}
/**
* Maximum price of category product.
*
@ -190,27 +75,6 @@ class ProductFlatRepository extends Repository
->max('max_price');
}
/**
* Get filter attributes.
*
* @param \Webkul\Category\Contracts\Category $category
* @return array
*/
public function getFilterAttributes($category)
{
$filterAttributes = [];
if (isset($category)) {
$filterAttributes = $this->getProductsRelatedFilterableAttributes($category);
}
if (empty($filterAttributes)) {
$filterAttributes = $this->attributeRepository->getFilterAttributes();
}
return $filterAttributes;
}
/**
* Handle category product max price.
*

View File

@ -639,7 +639,11 @@ class Configurable extends AbstractType
*/
public function getPriceHtml()
{
if ($this->haveOffer()) {
if ($this->haveSpecialPrice()) {
return '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>'
. '<span class="price-label">' . trans('shop::app.products.price-label') . '</span>'
. '<span class="special-price">' . core()->currency($this->evaluatePrice($this->getMinimalPrice())) . '</span>'.'<span class="regular-price"></span>';
} elseif ($this->haveOffer()) {
return '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>'
. '<span class="price-label">' . trans('shop::app.products.price-label') . '</span>'
. '<span class="regular-price">' . core()->currency($this->evaluatePrice($this->getMinimalPrice())) . '</span>'
@ -647,10 +651,31 @@ class Configurable extends AbstractType
} else {
return '<span class="price-label">' . trans('shop::app.products.price-label') . '</span>'
. ' '
. '<span class="final-price">' . core()->currency($this->evaluatePrice($this->getMinimalPrice())) . '</span>';
. '<span class="special-price">' . core()->currency($this->evaluatePrice($this->getMinimalPrice())) . '</span> <span class="regular-price"></span>';
}
}
/**
* Check whether configurable product have special price.
*
* @param int $qty
* @return bool
*/
public function haveSpecialPrice($qty = null)
{
$haveSpecialPrice = false;
foreach ($this->product->variants as $variant) {
if ($variant->getTypeInstance()->haveSpecialPrice()) {
$haveSpecialPrice = true;
break;
}
}
return $haveSpecialPrice;
}
/**
* Add product. Returns error message if can't prepare product.
*

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,9 @@
namespace Webkul\Shop\Http\Controllers;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Category\Repositories\CategoryRepository;
use Webkul\Product\Repositories\ProductFlatRepository;
class CategoryController extends Controller
{
@ -10,10 +12,49 @@ class CategoryController extends Controller
* Create a new controller instance.
*
* @param \Webkul\Category\Repositories\CategoryRepository $categoryRepository
* @param \Webkul\Product\Repositories\ProductFlatRepository $productFlatRepository
* @return void
*/
public function __construct(protected CategoryRepository $categoryRepository)
public function __construct(
protected CategoryRepository $categoryRepository,
protected ProductFlatRepository $productFlatRepository
)
{
parent::__construct();
}
/**
* Get filter attributes for product.
*
* @return \Illuminate\Http\Response
*/
public function getFilterAttributes($categoryId = null, AttributeRepository $attributeRepository)
{
$category = $this->categoryRepository->findOrFail($categoryId);
if (empty($filterAttributes = $category->filterableAttributes)) {
$filterAttributes = $attributeRepository->getFilterAttributes();
}
return response()->json([
'filter_attributes' => $filterAttributes,
]);
}
/**
* Get category product maximum price.
*
* @return \Illuminate\Http\Response
*/
public function getCategoryProductMaximumPrice($categoryId = null)
{
$category = $this->categoryRepository->findOrFail($categoryId);
$maxPrice = $this->productFlatRepository->handleCategoryProductMaximumPrice($category);
return response()->json([
'max_price' => $maxPrice,
]);
}
}

View File

@ -4,33 +4,24 @@ namespace Webkul\Shop\Http\Controllers;
use Illuminate\Support\Facades\Storage;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Category\Repositories\CategoryRepository;
use Webkul\Product\Repositories\ProductAttributeValueRepository;
use Webkul\Product\Repositories\ProductDownloadableLinkRepository;
use Webkul\Product\Repositories\ProductDownloadableSampleRepository;
use Webkul\Product\Repositories\ProductFlatRepository;
use Webkul\Product\Repositories\ProductRepository;
class ProductController extends Controller
{
/**
* Create a new controller instance.
*
* @param \Webkul\Product\Repositories\ProductRepository $productRepository
* @param \Webkul\Product\Repositories\ProductFlatRepository $productFlatRepository
* @param \Webkul\Product\Repositories\ProductAttributeValueRepository $productAttributeValueRepository
* @param \Webkul\Product\Repositories\ProductDownloadableSampleRepository $productDownloadableSampleRepository
* @param \Webkul\Product\Repositories\ProductDownloadableLinkRepository $productDownloadableLinkRepository
* @param \Webkul\Category\Repositories\CategoryRepository $categoryRepository
* @return void
*/
public function __construct(
protected ProductRepository $productRepository,
protected ProductFlatRepository $productFlatRepository,
protected ProductAttributeValueRepository $productAttributeValueRepository,
protected ProductDownloadableSampleRepository $productDownloadableSampleRepository,
protected ProductDownloadableLinkRepository $productDownloadableLinkRepository,
protected CategoryRepository $categoryRepository
protected ProductDownloadableLinkRepository $productDownloadableLinkRepository
)
{
parent::__construct();
@ -100,44 +91,4 @@ class ProductController extends Controller
abort(404);
}
}
/**
* Get filter attributes for product.
*
* @return \Illuminate\Http\Response
*/
public function getFilterAttributes($categoryId = null, AttributeRepository $attributeRepository)
{
$filterAttributes = [];
if ($category = $this->categoryRepository->find($categoryId)) {
$filterAttributes = $this->productFlatRepository->getFilterAttributes($category);
}
if (empty($filterAttributes)) {
$filterAttributes = $attributeRepository->getFilterAttributes();
}
return response()->json([
'filter_attributes' => $filterAttributes,
]);
}
/**
* Get category product maximum price.
*
* @return \Illuminate\Http\Response
*/
public function getCategoryProductMaximumPrice($categoryId = null)
{
$maxPrice = 0;
if ($category = $this->categoryRepository->find($categoryId)) {
$maxPrice = $this->productFlatRepository->handleCategoryProductMaximumPrice($category);
}
return response()->json([
'max_price' => $maxPrice,
]);
}
}

View File

@ -4925,6 +4925,15 @@ body {
.compare-products {
width: unset !important;
tr {
display: flex;
justify-content: space-around;
td {
width: 200px;
}
}
}
.mt-0 {

View File

@ -2,8 +2,8 @@
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
<layered-navigation
attribute-src="{{ route('admin.catalog.products.get-filter-attributes', $category->id ?? null) }}"
max-price-src="{{ route('admin.catalog.products.get-category-product-maximum-price', $category->id ?? null) }}">
attribute-src="{{ route('catalog.categories.filterable-attributes', $category->id ?? null) }}"
max-price-src="{{ route('catalog.categories.maximum-price', $category->id ?? null) }}">
</layered-navigation>
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
@ -155,13 +155,18 @@
data: function() {
return {
appliedFilters: [],
active: false,
sliderConfig: {
value: [0, 0],
max: 500,
processStyle: {
"backgroundColor": "#FF6472"
},
tooltipStyle: {
"backgroundColor": "#FF6472",
"borderColor": "#FF6472"
@ -188,12 +193,20 @@
methods: {
setMaxPrice: function () {
if (this.attribute['code'] != 'price') {
return;
}
axios
.get(this.maxPriceSrc)
.then((response) => {
let maxPrice = response.data.max_price;
this.sliderConfig.max = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500;
if (! this.appliedFilterValues) {
this.sliderConfig.value = [0, this.sliderConfig.max];
this.sliderConfig.priceTo = this.sliderConfig.max;
}
});
},

View File

@ -297,7 +297,7 @@
});
let priceLabelElement = document.querySelector('.price-label');
let priceElement = document.querySelector('.final-price');
let priceElement = document.querySelector('.special-price') ? document.querySelector('.special-price') : document.querySelector('.final-price');
let regularPriceElement = document.querySelector('.regular-price');
if (this.childAttributes.length == selectedOptionCount) {

View File

@ -4,6 +4,7 @@ use Illuminate\Support\Facades\Route;
use Webkul\CMS\Http\Controllers\Shop\PagePresenterController;
use Webkul\Shop\Http\Controllers\HomeController;
use Webkul\Shop\Http\Controllers\ProductController;
use Webkul\Shop\Http\Controllers\CategoryController;
use Webkul\Shop\Http\Controllers\ReviewController;
use Webkul\Shop\Http\Controllers\SearchController;
use Webkul\Shop\Http\Controllers\SubscriptionController;
@ -79,7 +80,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
'view' => 'shop.products.index',
])->name('shop.product.file.download');
Route::get('products/get-filter-attributes/{categoryId?}', [ProductController::class, 'getFilterAttributes'])->name('admin.catalog.products.get-filter-attributes');
Route::get('categories/filterable-attributes/{categoryId?}', [CategoryController::class, 'getFilterAttributes'])->name('catalog.categories.filterable-attributes');
Route::get('products/get-category-product-maximum-price/{categoryId?}', [ProductController::class, 'getCategoryProductMaximumPrice'])->name('admin.catalog.products.get-category-product-maximum-price');
Route::get('categories/maximum-price/{categoryId?}', [CategoryController::class, 'getCategoryProductMaximumPrice'])->name('catalog.categories.maximum-price');
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js?id=2effb6ad469c2b8c5af2",
"/js/ui.js": "/js/ui.js?id=3aeb5916956a19f3e02f",
"/css/ui.css": "/css/ui.css?id=933372010d246f94f931"
}

View File

@ -603,7 +603,8 @@ export default {
response: isEncoded
? encodeURIComponent(this.types[type].value)
: this.types[type].value,
label
label,
type
}
});
},

View File

@ -118,6 +118,7 @@
<th
:key="columnKey"
v-for="(column, columnKey) in columns"
v-if ="column.visibility != false"
v-text="column.label"
class="grid_head"
:class="{ sortable: column.sortable }"
@ -160,6 +161,7 @@
<td
:key="columnKey"
v-for="(column, columnKey) in columns"
v-if ="column.visibility != false"
v-html="record[column.index]"
:data-value="column.label"
></td>

View File

@ -1437,7 +1437,7 @@ modal {
margin-bottom: 20px;
margin-top: 10px;
display: inline-block;
width: 200px;
width: 100%;
.image-item {
width: 200px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*/
/*!
* Vue.js v2.7.8
* Vue.js v2.7.10
* (c) 2014-2022 Evan You
* Released under the MIT License.
*/
@ -33,7 +33,7 @@
*/
/*!
* jQuery JavaScript Library v3.6.0
* jQuery JavaScript Library v3.6.1
* https://jquery.com/
*
* Includes Sizzle.js
@ -43,7 +43,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2021-03-02T17:08Z
* Date: 2022-08-26T17:52Z
*/
/*!

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,8 @@
"/js/velocity-core.js": "/js/velocity-core.js?id=dcc312fe978be1aff63a33eaf7ad190c",
"/js/velocity.js": "/js/velocity.js?id=5e563e0af3ea88a56b03a4a30fad0a92",
"/js/manifest.js": "/js/manifest.js?id=4113cf6789cdd4f2768f508bc32cad2d",
"/js/components.js": "/js/components.js?id=f1962fbe19365543e54b0e329f86b8ff",
"/css/velocity.css": "/css/velocity.css?id=b052a38bbdda8e29ff1dee8479d69d63",
"/js/components.js": "/js/components.js?id=f60a033c9b4233754d022b4b9f156bb9",
"/css/velocity.css": "/css/velocity.css?id=1dc9d611540ff31dfa2cf8c86f5ad16a",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3ff45a44f9778f",
"/images/Camera.svg": "/images/Camera.svg?id=b2fd2f9e17e1ccee96e29f6c6cec91e8",
"/images/Icon-Arrow-Right.svg": "/images/Icon-Arrow-Right.svg?id=e30f624f1a70197dc9ad9011b240aa8e",

View File

@ -9,4 +9,5 @@ class VelocityMetadata extends Model implements VelocityMetadataContract
{
protected $table = 'velocity_meta_data';
protected $guarded = ['id'];
}

View File

@ -129,6 +129,14 @@
<span class="category-title">{{
subCategory['name']
}}</span>
<i
class="rango-arrow-down pr15 float-right"
@mouseout="toggleSidebar(id, $event, 'mouseout')"
@mouseover="toggleSidebar(id, $event, 'mouseover')"
v-if="subCategory.children.length > 0"
>
</i>
</a>
<ul type="none" class="nested">

View File

@ -1146,3 +1146,17 @@ i.within-circle {
.show-password {
margin-top:10px !important;
}
.category {
line-height: 2.0rem !important;
}
.sub-category {
padding-left: 0 !important;
padding-top: 0 !important;
line-height: 2.0rem !important;
i {
margin-top: 8px !important;
}
}

View File

@ -2689,3 +2689,11 @@
transform: rotate(360deg);
}
}
.sub-category:hover ~ ul {
display: block;
}
.nested {
display: none;
}

View File

@ -307,6 +307,11 @@
position: sticky;
top: 70px;
div.col-12:first-child {
max-height: 420px;
height: 420px;
}
> div {
margin: 0;
padding: 0;

View File

@ -297,7 +297,7 @@
background-color: $white-color !important;
box-shadow: 0 1px 0 0 #CFCFCF;
border: 1px solid rgba(0,0,0,0.12);
z-index: 0;
z-index: 1;
&:hover,
&:focus {

View File

@ -2,8 +2,8 @@
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
<layered-navigation
attribute-src="{{ route('admin.catalog.products.get-filter-attributes', $category->id ?? null) }}"
max-price-src="{{ route('admin.catalog.products.get-category-product-maximum-price', $category->id ?? null) }}">
attribute-src="{{ route('catalog.categories.filterable-attributes', $category->id ?? null) }}"
max-price-src="{{ route('catalog.categories.maximum-price', $category->id ?? null) }}">
</layered-navigation>
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
@ -176,18 +176,25 @@
data: function() {
return {
active: false,
appliedFilters: [],
sliderConfig: {
max: 500,
value: [0, 0],
processStyle: {
"backgroundColor": "#FF6472"
},
tooltipStyle: {
"borderColor": "#FF6472",
"backgroundColor": "#FF6472",
},
priceTo: 0,
priceFrom: 0,
}
}
@ -213,11 +220,14 @@
methods: {
setMaxPrice: function () {
if (this.attribute['code'] != 'price') {
return;
}
axios
.get(this.maxPriceSrc)
.then((response) => {
let maxPrice = response.data.max_price;
this.sliderConfig.max = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500;
if (! this.appliedFilterValues) {

View File

@ -289,9 +289,35 @@
setTimeout(function() {
document.getElementById('product-form').submit();
}, 0);
} else {
this.activateAutoScroll();
}
});
},
activateAutoScroll: function(event) {
/**
* This is normal Element
*/
const normalElement = document.querySelector(
'.control-error:first-of-type'
);
/**
* Scroll Config
*/
const scrollConfig = {
behavior: 'smooth',
block: 'end',
inline: 'nearest',
}
if (normalElement) {
normalElement.scrollIntoView(scrollConfig);
return;
}
}
}
});

View File

@ -314,7 +314,7 @@
});
let priceLabelElement = document.querySelector('.price-label');
let priceElement = document.querySelector('.final-price');
let priceElement = document.querySelector('.special-price') ? document.querySelector('.special-price') : document.querySelector('.final-price');
let regularPriceElement = document.querySelector('.regular-price');
if (this.childAttributes.length == selectedOptionCount) {
@ -326,7 +326,18 @@
priceElement.innerHTML = this.config.variant_prices[this.simpleProduct].final_price.formated_price;
if (regularPriceElement && this.config.variant_prices[this.simpleProduct].final_price.price < this.config.variant_prices[this.simpleProduct].regular_price.price) {
if (
this.config.variant_prices[this.simpleProduct].regular_price.formated_price == "$0.00"
|| this.config.variant_prices[this.simpleProduct].regular_price.formated_price == this.config.variant_prices[this.simpleProduct].final_price.formated_price
) {
regularPriceElement.innerHTML = "";
}
if (
regularPriceElement
&& this.config.variant_prices[this.simpleProduct].regular_price.formated_price != "$0.00"
&& this.config.variant_prices[this.simpleProduct].regular_price.formated_price != this.config.variant_prices[this.simpleProduct].final_price.formated_price
) {
regularPriceElement.innerHTML = this.config.variant_prices[this.simpleProduct].regular_price.formated_price;
regularPriceElement.style.display = 'inline-block';
}