This commit is contained in:
shaiv-webkul 2020-02-07 15:29:52 +05:30
commit d43efc505a
29 changed files with 323 additions and 224 deletions

View File

@ -7,7 +7,7 @@
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.locales.store') }}" @submit.prevent="onSubmit">
<form method="POST" action="{{ route('admin.locales.store') }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
<div class="page-header">
<div class="page-title">
<h1>

View File

@ -7,7 +7,7 @@
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.locales.update', $locale->id) }}" @submit.prevent="onSubmit">
<form method="POST" action="{{ route('admin.locales.update', $locale->id) }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
<div class="page-header">
<div class="page-title">
<h1>

View File

@ -8,6 +8,7 @@ return [
'reviews' => 'المراجعات',
'wishlist' => 'قائمة الأمنيات',
'orders' => 'الطبات',
'downloadable-products' => 'المنتجات القابلة للتحميل',
],
'common' => [
@ -166,6 +167,9 @@ return [
'fname' => 'الاسم الأول',
'lname' => 'الاسم الأخير',
'gender' => 'نوع الجنس',
'other' => 'آخر',
'male' => 'الذكر',
'female' => 'أنثى',
'dob' => 'تاريخ الميلاد',
'phone' => 'الهاتف',
'email' => 'البريد الإلكتروني',
@ -194,7 +198,7 @@ return [
'contact' => 'معلومات الإتصال',
'confirm-delete' => 'هل تريد حقا حذف هذا العنوان؟',
'default-delete' => 'لا يمكن تغيير العنوان الافتراضي',
'enter-password' => 'Enter Your Password.',
'enter-password' => 'ادخل رقمك السري.',
],
'create' => [
@ -221,7 +225,7 @@ return [
'delete' => [
'success' => 'تم حذف العنوان بنجاح.',
'failure' => 'لا يمكن حذف العنوان',
'wrong-password' => 'Wrong Password !'
'wrong-password' => 'كلمة مرور خاطئة !'
]
],
@ -250,7 +254,7 @@ return [
'item-invoice' => '3-الفواتير(:qty_invoiced)',
'item-shipped' => 'شحنت(:qty_shipped)',
'item-canceled' => 'ملغاة(:qty_canceled)',
'item-refunded' => 'Refunded (:qty_refunded)',
'item-refunded' => 'ردها (:qty_refunded)',
'price' => 'السعر',
'total' => 'المجموع',
'subtotal' => 'المجموع الفرعي',
@ -285,7 +289,7 @@ return [
],
'wishlist' => [
'page-title' => 'Customer - Wishlist',
'page-title' => 'العملاء - قائمة الامنيات',
'title' => 'قائمة الأمنيات',
'deleteall' => 'احذف الكل',
'moveall' => 'نقل الكل إلى عربة التوسق',
@ -300,22 +304,22 @@ return [
'already' => 'العنصر موجود بالفعل في قائمة أمنياتك',
'removed' => 'البند حذف بنجاح من قائمة الأمنيات',
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
'empty' => 'You do not have any items in your Wishlist',
'empty' => 'ليس لديك أي عناصر في قائمة الأمنيات',
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
],
'downloadable_products' => [
'title' => 'Downloadable Products',
'order-id' => 'Order Id',
'date' => 'Date',
'name' => 'Title',
'status' => 'Status',
'pending' => 'Pending',
'available' => 'Available',
'expired' => 'Expired',
'remaining-downloads' => 'Remaining Downloads',
'unlimited' => 'Unlimited',
'download-error' => 'Download link has been expired.'
'title' => 'المنتجات القابلة للتحميل',
'order-id' => 'رقم التعريف الخاص بالطلب',
'date' => 'تاريخ',
'name' => 'عنوان',
'status' => 'الحالة',
'pending' => 'قيد الانتظار',
'available' => 'متاح',
'expired' => 'منتهية الصلاحية',
'remaining-downloads' => 'التنزيلات المتبقية',
'unlimited' => 'غير محدود',
'download-error' => 'انتهت صلاحية رابط التنزيل.'
],
'review' => [
@ -363,13 +367,13 @@ return [
'in-stock' => 'متوفر',
'out-of-stock' => 'غير متوفر',
'view-all' => 'عرض الكل',
'less-quantity' => 'Quantity can not be less than one.',
'starting-at' => 'Starting at',
'customize-options' => 'Customize Options',
'choose-selection' => 'Choose a selection',
'your-customization' => 'Your Customization',
'total-amount' => 'Total Amount',
'none' => 'None',
'less-quantity' => 'لا يمكن أن تكون الكمية أقل من واحدة.',
'starting-at' => 'يبدأ من',
'customize-options' => 'تخصيص الخيارات',
'choose-selection' => 'اختيار اختيار',
'your-customization' => 'التخصيص الخاص بك',
'total-amount' => 'المبلغ الإجمالي',
'none' => 'لا شيء',
'less-quantity' => 'الكمية لايمكن ان تكون أقل من واحد.'
],
@ -387,8 +391,8 @@ return [
'integrity' => [
'missing_fields' =>'إنتهاك سلامة نظام العربة ، بعض الحقول المطلوبة مفقودة',
'missing_options' =>'إنتهاك سلامة نظام العربة ، الخيارات مفقودة لمنتج قابل للتهيئة',
'missing_links' => 'Downloadable links are missing for this product.',
'qty_missing' => 'Atleast one product should have more than 1 quantity.'
'missing_links' => 'الروابط القابلة للتنزيل مفقودة لهذا المنتج.',
'qty_missing' => 'يجب أن يحتوي منتج واحد على الأقل على كمية واحدة.'
],
'create-error' => 'صادفت بعض القضايا أثناء صناعة السيارات',
'title' => 'عربة التسوق',

View File

@ -12,7 +12,7 @@ return [
'reviews' => 'Reviews',
'wishlist' => 'Wishlist',
'orders' => 'Orders',
'downloadable-products' => 'Downloadable Products',
'downloadable-products' => 'Downloadable Products'
],
'common' => [
@ -187,6 +187,9 @@ return [
'fname' => 'First Name',
'lname' => 'Last Name',
'gender' => 'Gender',
'other' => 'Other',
'male' => 'Male',
'female' => 'Female',
'dob' => 'Date Of Birth',
'phone' => 'Phone',
'email' => 'Email',

View File

@ -11,6 +11,7 @@ return [
'reviews' => 'Opiniones',
'wishlist' => 'Lista de deseos',
'orders' => 'Pedidos',
'downloadable-products' => 'Productos descargables'
],
'common' => [
@ -173,6 +174,9 @@ return [
'fname' => 'Nombre',
'lname' => 'Apellido',
'gender' => 'Género',
'other' => 'Otro',
'male' => 'Masculino',
'female' => 'Hembra',
'dob' => 'Fecha de nacimiento',
'phone' => 'Móvil',
'email' => 'Correo electrónico',
@ -261,7 +265,7 @@ return [
'item-canceled' => 'Cancelado (:qty_canceled)',
'price' => 'Precio',
'total' => 'Total',
'subtotal' => 'Subtotal',
'subtotal' => 'Total parcial',
'shipping-handling' => 'Envío y Manipulación',
'tax' => 'Impuesto',
'discount' => 'Descuento',
@ -289,7 +293,7 @@ return [
],
'wishlist' => [
'page-title' => 'Customer - Wishlist',
'page-title' => 'Cliente - Lista de deseos',
'title' => 'Lista de deseos',
'deleteall' => 'Eliminar todo',
'moveall' => 'Mover todos los productos a la cesta',
@ -309,17 +313,17 @@ return [
],
'downloadable_products' => [
'title' => 'Downloadable Products',
'order-id' => 'Order Id',
'date' => 'Date',
'name' => 'Title',
'status' => 'Status',
'pending' => 'Pending',
'available' => 'Available',
'expired' => 'Expired',
'remaining-downloads' => 'Remaining Downloads',
'unlimited' => 'Unlimited',
'download-error' => 'Download link has been expired.'
'title' => 'Productos descargables',
'order-id' => 'Solicitar ID',
'date' => 'Fecha',
'name' => 'Título',
'status' => 'Estado',
'pending' => 'Pendiente',
'available' => 'Disponible',
'expired' => 'Caducado',
'remaining-downloads' => 'Descargas restantes',
'unlimited' => 'Ilimitado',
'download-error' => 'El enlace de descarga ha caducado.'
],
'review' => [
@ -414,7 +418,7 @@ return [
'error-add' => 'El artículo no se puede añadir a la cesta, inténtelo más tarde',
],
'quantity-error' => 'La cantidad solicitada no está disponible',
'cart-subtotal' => 'Subtotal',
'cart-subtotal' => 'Total parcial',
'cart-remove-action' => '¿Realmente quieres hacer esto?',
'partial-cart-update' => 'Solo algunos de los productos se han actualizado',
],

View File

@ -11,11 +11,12 @@ return [
'reviews' => 'بررسی ها',
'wishlist' => 'لیست دلخواه',
'orders' => 'سفارشات',
'downloadable-products' => 'محصولات دانلودی'
],
'common' => [
'error' => 'مشکلی رخ داده است. لطفا بعدا دوباره امتحان کنید.',
'no-result-found' => 'We could not find any records.'
'no-result-found' => 'ما هیچ سابقه ای پیدا نکردیم.'
],
'home' => [
@ -174,6 +175,9 @@ return [
'fname' => 'نام کوچک',
'lname' => 'نام خانوادگی',
'gender' => 'جنسیت',
'other' => 'دیگر',
'male' => 'نر',
'female' => 'زن',
'dob' => 'تاریخ تولد',
'phone' => 'تلفن',
'email' => 'پست الکترونیک',
@ -202,7 +206,7 @@ return [
'contact' => 'تماس',
'confirm-delete' => 'آیا واقعاً می خواهید این آدرس را حذف کنید؟',
'default-delete' => 'آدرس پیش فرض تغییر نمی کند',
'enter-password' => 'Enter Your Password.',
'enter-password' => 'رمز ورود خود را وارد کنید',
],
'create' => [
@ -230,7 +234,7 @@ return [
'delete' => [
'success' => 'آدرس با موفقیت حذف شد',
'failure' => 'آدرس حذف نمی شود',
'wrong-password' => 'Wrong Password !'
'wrong-password' => 'گذرواژه اشتباه!'
]
],
@ -259,7 +263,7 @@ return [
'item-invoice' => 'صورتحساب (:qty_invoiced)',
'item-shipped' => 'حمل شده (:qty_shipped)',
'item-canceled' => 'لغو شد (:qty_canceled)',
'item-refunded' => 'Refunded (:qty_refunded)',
'item-refunded' => 'بازپرداخت (:qty_refunded)',
'price' => 'قیمت',
'total' => 'جمع',
'subtotal' => 'فرعی',
@ -287,14 +291,14 @@ return [
'ship-to' => 'حمل به',
'contact' => 'تماس',
'refunds' => 'Refunds',
'individual-refund' => 'Refund #:refund_id',
'adjustment-refund' => 'Adjustment Refund',
'adjustment-fee' => 'Adjustment Fee',
'individual-refund' => 'بازپرداخت #:refund_id',
'adjustment-refund' => 'بازپرداخت تنظیم',
'adjustment-fee' => 'هزینه تنظیم',
]
],
'wishlist' => [
'page-title' => 'Customer - Wishlist',
'page-title' => 'مشتری - لیست دلخواه',
'title' => 'لیست دلخواه',
'deleteall' => 'حذف همه',
'moveall' => 'انتقال همه محصولات به سبد خرید',
@ -314,17 +318,17 @@ return [
],
'downloadable_products' => [
'title' => 'Downloadable Products',
'order-id' => 'Order Id',
'date' => 'Date',
'name' => 'Title',
'status' => 'Status',
'pending' => 'Pending',
'available' => 'Available',
'expired' => 'Expired',
'remaining-downloads' => 'Remaining Downloads',
'unlimited' => 'Unlimited',
'download-error' => 'Download link has been expired.'
'title' => 'محصولات دانلودی',
'order-id' => 'شماره سفارش',
'date' => 'تاریخ',
'name' => 'عنوان',
'status' => 'وضعیت',
'pending' => 'در انتظار',
'available' => 'در دسترس',
'expired' => 'منقضی شده',
'remaining-downloads' => 'بارگیری های باقی مانده',
'unlimited' => 'نامحدود',
'download-error' => 'لینک دانلود منقضی شده است'
],
'review' => [
@ -376,12 +380,12 @@ return [
'view-all' => 'مشاهده همه',
'select-above-options' => 'لطفا ابتدا گزینه های بالا را انتخاب کنید',
'less-quantity' => 'کمیت نمی تواند کمتر از یک باشد.',
'starting-at' => 'Starting at',
'customize-options' => 'Customize Options',
'choose-selection' => 'Choose a selection',
'your-customization' => 'Your Customization',
'total-amount' => 'Total Amount',
'none' => 'None'
'starting-at' => 'شروع از',
'customize-options' => 'گزینه ها را سفارشی کنید',
'choose-selection' => 'انتخابی را انتخاب کنید',
'your-customization' => 'شخصی سازی شما',
'total-amount' => 'مقدار کل',
'none' => 'هیچ یک'
],
// 'reviews' => [
@ -398,8 +402,8 @@ return [
'integrity' => [
'missing_fields' =>'نقض یکپارچگی سیستم سبد خرید ، برخی از زمینه های لازم وجود ندارد',
'missing_options' =>'نقض یکپارچگی سیستم سبد خرید ، گزینه هایی برای محصول قابل تنظیم وجود ندارد',
'missing_links' => 'Downloadable links are missing for this product.',
'qty_missing' => 'Atleast one product should have more than 1 quantity.'
'missing_links' => 'لینک های قابل بارگیری برای این محصول وجود ندارد',
'qty_missing' => 'حداقل یک محصول باید بیش از 1 مقدار داشته باشد.'
],
'create-error' => 'هنگام تهیه نمونه سبد خرید ، با برخی از شماره ها روبرو شد',
@ -548,9 +552,9 @@ return [
'refund' => [
'heading' => 'Your Refund #:refund_id for Order #:order_id',
'subject' => 'Refund for your order #:order_id',
'summary' => 'Summary of Refund',
'adjustment-refund' => 'Adjustment Refund',
'adjustment-fee' => 'Adjustment Fee'
'summary' => 'خلاصه بازپرداخت',
'adjustment-refund' => 'بازپرداخت تنظیم',
'adjustment-fee' => 'هزینه تنظیم'
],
'forget-password' => [

View File

@ -8,6 +8,7 @@ return [
'reviews' => 'Avaliação',
'wishlist' => 'Lista de Desejos',
'orders' => 'Pedidos',
'downloadable-products' => 'Produtos para download'
],
'common' => [
@ -169,6 +170,9 @@ return [
'fname' => 'Nome',
'lname' => 'Sobrenome',
'gender' => 'Gênero',
'other' => 'De outros',
'male' => 'Masculino',
'female' => 'Fêmeo',
'dob' => 'Data de Nascimento',
'phone' => 'Telefone',
'email' => 'Email',
@ -309,17 +313,17 @@ return [
],
'downloadable_products' => [
'title' => 'Downloadable Products',
'order-id' => 'Order Id',
'date' => 'Date',
'name' => 'Title',
'title' => 'Produtos para download',
'order-id' => 'ID do pedido',
'date' => 'Encontro',
'name' => 'Título',
'status' => 'Status',
'pending' => 'Pending',
'available' => 'Available',
'expired' => 'Expired',
'remaining-downloads' => 'Remaining Downloads',
'unlimited' => 'Unlimited',
'download-error' => 'Download link has been expired.'
'pending' => 'Pendente',
'available' => 'acessível',
'expired' => 'Expirado',
'remaining-downloads' => 'Downloads restantes',
'unlimited' => 'Ilimitado',
'download-error' => 'O link para download expirou.'
],
'review' => [
@ -370,13 +374,13 @@ return [
'out-of-stock' => 'Fora de Estoque',
'view-all' => 'Ver Tudo',
'select-above-options' => 'Por favor, selecione as opções acima primeiro.',
'less-quantity' => 'Quantity can not be less than one.',
'starting-at' => 'Starting at',
'customize-options' => 'Customize Options',
'choose-selection' => 'Choose a selection',
'your-customization' => 'Your Customization',
'total-amount' => 'Total Amount',
'none' => 'None'
'less-quantity' => 'A quantidade não pode ser menor que um.',
'starting-at' => 'Começando às',
'customize-options' => 'Personalizar opções',
'choose-selection' => 'Escolha uma seleção',
'your-customization' => 'Sua personalização',
'total-amount' => 'Valor total',
'none' => 'Nenhum'
],
// 'reviews' => [
@ -518,9 +522,9 @@ return [
'refund' => [
'heading' => 'Your Refund #:refund_id for Order #:order_id',
'subject' => 'Refund for your order #:order_id',
'summary' => 'Summary of Refund',
'adjustment-refund' => 'Adjustment Refund',
'adjustment-fee' => 'Adjustment Fee'
'summary' => 'Resumo do reembolso',
'adjustment-refund' => 'Reembolso de ajuste',
'adjustment-fee' => 'Taxa de ajuste'
],
'shipment' => [

View File

@ -47,9 +47,9 @@
<select name="gender" class="control" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.profile.gender') }}&quot;">
<option value="" @if ($customer->gender == "") selected @endif></option>
<option value="Other" @if ($customer->gender == "Other") selected @endif>Other</option>
<option value="Male" @if ($customer->gender == "Male") selected @endif>Male</option>
<option value="Female" @if ($customer->gender == "Female") selected @endif>Female</option>
<option value="Other" @if ($customer->gender == "Other") selected @endif>{{ __('shop::app.customer.account.profile.other') }}</option>
<option value="Male" @if ($customer->gender == "Male") selected @endif>{{ __('shop::app.customer.account.profile.male') }}</option>
<option value="Female" @if ($customer->gender == "Female") selected @endif>{{ __('shop::app.customer.account.profile.female') }}</option>
</select>
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
</div>

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 @@
{
"/js/velocity.js": "/js/velocity.js?id=65a146da75db9d89424d",
"/css/velocity.css": "/css/velocity.css?id=b10c5f40830f0e5a94e7",
"/js/velocity.js": "/js/velocity.js?id=86ab12533244dd4304cc",
"/css/velocity.css": "/css/velocity.css?id=1027f2c6d88fa0c74fa0",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7"
}

View File

@ -22,59 +22,25 @@ class AdminHelper
public function saveLocaleImg($locale)
{
$uploadedImagePath = $this->uploadImage($locale, 'locale_image.image_0');
$data = request()->all();
$type = 'locale_image';
if ($uploadedImagePath) {
$locale->locale_image = $uploadedImagePath;
$locale->save();
}
$locale = $this->uploadImage($locale, $data, $type);
return $locale;
}
public function storeCategoryIcon($category)
{
$oldPath = null;
$iconName = 'category_icon_path.image_1';
$data = request()->all();
$type = 'category_icon_path';
$category = $this->categoryRepository->findOrFail($category);
if (gettype($category) !== "object") {
// getting id on update
$iconName = 'category_icon_path.image_0';
$category = $this->categoryRepository->findOrFail($category);
$oldPath = $category->category_icon_path;
}
$uploadedImagePath = $this->uploadImage($category, $iconName, $oldPath);
if ($uploadedImagePath) {
$category->category_icon_path = $uploadedImagePath;
$category->save();
}
$category = $this->uploadImage($category, $data, $type);
return $category;
}
public function uploadImage($record, $type, $oldPath = null)
{
$request = request();
$image = '';
$file = $type;
$dir = 'velocity/' . $type;
if ($request->hasFile($file)) {
if ($oldPath) {
Storage::delete($oldPath);
}
$image = $request->file($file)->store($dir);
return $image;
}
return false;
}
public function storeSliderDetails($slider)
{
$slider->slider_path = request()->get('slider_path');
@ -82,4 +48,33 @@ class AdminHelper
return true;
}
public function uploadImage($model, $data, $type) {
if (isset($data[$type])) {
$request = request();
foreach ($data[$type] as $imageId => $image) {
$file = $type . '.' . $imageId;
$dir = 'velocity/' . $type . '/' . $model->id;
if ($request->hasFile($file)) {
if ($model->{$type}) {
Storage::delete($model->{$type});
}
$model->{$type} = $request->file($file)->store($dir);
$model->save();
}
}
} else {
if ($model->{$type}) {
Storage::delete($model->{$type});
}
$model->{$type} = null;
$model->save();
}
return $model;
}
}

View File

@ -175,7 +175,9 @@ $(document).ready(function () {
},
mounted: function () {
// this.addServerErrors();
setTimeout(() => {
this.addServerErrors();
}, 0);
document.body.style.display = "block";
this.$validator.localize(document.documentElement.lang);
@ -227,6 +229,7 @@ $(document).ready(function () {
name: inputName,
scope: scope
});
if (field) {
this.$validator.errors.add({
id: field.id,

View File

@ -222,6 +222,7 @@ body {
}
.modal-content {
top: 0;
padding: 0;
ul {

View File

@ -860,4 +860,11 @@ button[disabled] {
.border-normal {
border: $border-normal;
}
.has-error {
input,
select {
border-color: $border-danger !important;
}
}

View File

@ -34,6 +34,22 @@ return [
'payment-methods' => 'طرق الدفع',
'shipping-methods' => 'طرق الشحن',
],
'products' => [
'short-description' => 'أوصاف قصيرة',
'more-infomation' => 'معلومات اكثر',
'details' => 'تفاصيل',
'customer-rating' => 'تقييم العملاء',
'reviews' => 'التعليقات',
'view-all-reviews' => 'عرض جميع التقييمات',
'write-your-review' => 'اكتب مراجعتك',
'quick-view' => 'نظرة سريعة',
'recently-viewed' => 'المنتجات المعروضة مؤخرا',
'not-available' => 'غير متوفر',
'review-by' => 'روجع من قبل',
'be-first-review' => 'كن أول من يكتب نقد',
'submit-review' => 'إرسال المراجعة',
]
]
?>

View File

@ -25,11 +25,15 @@
{{ __('velocity::app.admin.contents.content.link-target') }}
</label>
<select class="control" id="link_target" name="link_target" value="">
@php
$linkTarget = isset($locale) ? (old($locale)['link_target'] ?? $content->translate($locale)['link_target']) : '';
@endphp
<select class="control" id="link_target" name="{{$locale}}[link_target]" value="">
<option value="0">
{{ __('velocity::app.admin.contents.self') }}
</option>
<option value="1">
<option value="1" @if ($linkTarget == 1) selected="selected" @endif>
{{ __('velocity::app.admin.contents.new-tab') }}
</option>
</select>

View File

@ -6,7 +6,9 @@
@section('content')
<div class="content">
<?php $locale = request()->get('locale') ?: app()->getLocale(); ?>
@php
$locale = request()->get('locale') ?: app()->getLocale();
@endphp
<form
method="POST"

View File

@ -4,7 +4,7 @@
<image-wrapper
:multiple="false"
input-name="locale_image"
:images='"{{ url()->to('/') . '/storage/' . $locale->locale_image }}"'
:images='"{{ Storage:: url($locale->locale_image) }}"'
:button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'">
</image-wrapper>
@else

View File

@ -98,7 +98,7 @@
<div class="btn-group full-width">
<div class="selectdiv">
<select class="form-control fs13 styled-select" name="category">
<select class="form-control fs13 styled-select" name="category" @change="focusInput($event)">
<option value="">
{{ __('velocity::app.header.all-categories') }}
</option>
@ -660,6 +660,12 @@
this.searchedQuery = updatedSearchedCollection;
},
methods: {
'focusInput': function (event) {
$(event.target.parentElement.parentElement).find('input').focus();
}
}
})
Vue.component('content-header', {

View File

@ -95,7 +95,7 @@
</wishlist-component>
<span class="align-vertical-top">
{{ __('shop::app.layouts.wishlist') }}
{{ __('shop::app.checkout.cart.move-to-wishlist') }}
</span>
</a>
@else
@ -119,7 +119,7 @@
<a
class="unset
@auth('customer')
ml30
ml10
@endauth
"
href="{{ route('shop.checkout.cart.remove', ['id' => $item->id]) }}"

View File

@ -196,23 +196,41 @@
},
validateForm: function(scope) {
this.$validator.validateAll(scope)
.then(result => {
if (result) {
document.body.style.cursor = 'wait';
var isManualValidationFail = false;
if (scope == 'address-form') {
this.saveAddress();
document.body.style.cursor = 'default';
} else if (scope == 'shipping-form') {
document.body.style.cursor = 'wait';
this.saveShipping();
} else if (scope == 'payment-form') {
document.body.style.cursor = 'wait';
this.savePayment();
}
if (scope == 'address-form') {
let form = $(document).find('form[data-vv-scope=address-form]');
if (form) {
form.find(':input').each((index, element) => {
let value = $(element).val();
if (value == "") {
isManualValidationFail = true;
}
});
}
});
}
if (!isManualValidationFail) {
this.$validator.validateAll(scope)
.then(result => {
if (result) {
document.body.style.cursor = 'wait';
if (scope == 'address-form') {
this.saveAddress();
document.body.style.cursor = 'default';
} else if (scope == 'shipping-form') {
document.body.style.cursor = 'wait';
this.saveShipping();
} else if (scope == 'payment-form') {
document.body.style.cursor = 'wait';
this.savePayment();
}
}
});
}
},
isCustomerExist: function() {
@ -354,8 +372,6 @@
},
placeOrder: function() {
var this_this = this;
this.disable_button = true;
this.$http.post("{{ route('shop.checkout.save-order') }}", {'_token': "{{ csrf_token() }}"})
@ -368,12 +384,12 @@
}
}
})
.catch(function (error) {
this_this.disable_button = true;
.catch(error => {
this.disable_button = true;
window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('shop::app.common.error') }}" }];
this_this.$root.addFlashMessages()
this.$root.addFlashMessages();
})
},

View File

@ -17,7 +17,7 @@
<div slot="body">
<div class="address-container row full-width">
<div class="col address-holder" v-for='(addresses, index) in this.allAddress'>
<div class="col-lg-6 col-md-12 address-holder" v-for='(addresses, index) in this.allAddress'>
<div class="card">
<div class="card-body row">

View File

@ -4,8 +4,8 @@
@if (isset($shipping) && $shipping)
<div :class="`col-12 form-field ${errors.has('address-form.shipping[first_name]') ? 'has-error' : ''}`">
<label for="shipping[first_name]" class="required">
{{ __('shop::app.checkout.onepage.first-name') }}*
<label for="shipping[first_name]" class="mandatory">
{{ __('shop::app.checkout.onepage.first-name') }}
</label>
<input
@ -23,8 +23,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[last_name]') ? 'has-error' : ''}`">
<label for="shipping[last_name]" class="required">
{{ __('shop::app.checkout.onepage.last-name') }}*
<label for="shipping[last_name]" class="mandatory">
{{ __('shop::app.checkout.onepage.last-name') }}
</label>
<input
@ -42,8 +42,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[email]') ? 'has-error' : ''}`">
<label for="shipping[email]" class="required">
{{ __('shop::app.checkout.onepage.email') }}*
<label for="shipping[email]" class="mandatory">
{{ __('shop::app.checkout.onepage.email') }}
</label>
<input
@ -61,8 +61,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[address1][]') ? 'has-error' : ''}`">
<label for="shipping_address_0" class="required">
{{ __('shop::app.checkout.onepage.address1') }}*
<label for="shipping_address_0" class="mandatory">
{{ __('shop::app.checkout.onepage.address1') }}
</label>
<input
@ -96,8 +96,8 @@
@endif
<div :class="`col-12 form-field ${errors.has('address-form.shipping[city]') ? 'has-error' : ''}`">
<label for="shipping[city]" class="required">
{{ __('shop::app.checkout.onepage.city') }}*
<label for="shipping[city]" class="mandatory">
{{ __('shop::app.checkout.onepage.city') }}
</label>
<input
@ -115,8 +115,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[country]') ? 'has-error' : ''}`">
<label for="shipping[country]" class="required">
{{ __('shop::app.checkout.onepage.country') }}*
<label for="shipping[country]" class="mandatory">
{{ __('shop::app.checkout.onepage.country') }}
</label>
<select
@ -143,8 +143,8 @@
<div :class="`col-12 form-field ${errors.has('address-form.shipping[state]') ? 'has-error' : ''}`">
<label for="shipping[state]" class="required">
{{ __('shop::app.checkout.onepage.state') }}*
<label for="shipping[state]" class="mandatory">
{{ __('shop::app.checkout.onepage.state') }}
</label>
@ -181,8 +181,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[postcode]') ? 'has-error' : ''}`">
<label for="shipping[postcode]" class="required">
{{ __('shop::app.checkout.onepage.postcode') }}*
<label for="shipping[postcode]" class="mandatory">
{{ __('shop::app.checkout.onepage.postcode') }}
</label>
<input
@ -200,8 +200,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.shipping[phone]') ? 'has-error' : ''}`">
<label for="shipping[phone]" class="required">
{{ __('shop::app.checkout.onepage.phone') }}*
<label for="shipping[phone]" class="mandatory">
{{ __('shop::app.checkout.onepage.phone') }}
</label>
<input
@ -237,8 +237,8 @@
@elseif (isset($billing) && $billing)
<div :class="`col-12 form-field ${errors.has('address-form.billing[email]') ? 'has-error' : ''}`">
<label for="billing[email]" class="required">
{{ __('shop::app.checkout.onepage.email') }}*
<label for="billing[email]" class="mandatory">
{{ __('shop::app.checkout.onepage.email') }}
</label>
<input
@ -263,8 +263,8 @@
@endif
<div :class="`col-12 form-field ${errors.has('address-form.billing[first_name]') ? 'has-error' : ''}`">
<label for="billing[first_name]" class="required">
{{ __('shop::app.checkout.onepage.first-name') }}*
<label for="billing[first_name]" class="mandatory">
{{ __('shop::app.checkout.onepage.first-name') }}
</label>
<input
@ -282,8 +282,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[last_name]') ? 'has-error' : ''}`">
<label for="billing[last_name]" class="required">
{{ __('shop::app.checkout.onepage.last-name') }}*
<label for="billing[last_name]" class="mandatory">
{{ __('shop::app.checkout.onepage.last-name') }}
</label>
<input
@ -301,8 +301,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[address1][]') ? 'has-error' : ''}`">
<label for="billing_address_0" class="required">
{{ __('shop::app.checkout.onepage.address1') }}*
<label for="billing_address_0" class="mandatory">
{{ __('shop::app.checkout.onepage.address1') }}
</label>
<input
@ -336,8 +336,8 @@
@endif
<div :class="`col-12 form-field ${errors.has('address-form.billing[city]') ? 'has-error' : ''}`">
<label for="billing[city]" class="required">
{{ __('shop::app.checkout.onepage.city') }}*
<label for="billing[city]" class="mandatory">
{{ __('shop::app.checkout.onepage.city') }}
</label>
<input
@ -355,8 +355,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[country]') ? 'has-error' : ''}`">
<label for="billing[country]" class="required">
{{ __('shop::app.checkout.onepage.country') }}*
<label for="billing[country]" class="mandatory">
{{ __('shop::app.checkout.onepage.country') }}
</label>
<select
@ -383,8 +383,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[state]') ? 'has-error' : ''}`">
<label for="billing[state]" class="required">
{{ __('shop::app.checkout.onepage.state') }}*
<label for="billing[state]" class="mandatory">
{{ __('shop::app.checkout.onepage.state') }}
</label>
<input
@ -413,7 +413,9 @@
@{{ state.default_name }}
</option>
</select>
<i v-if="haveStates('billing')" class="select-icon rango-arrow-down"></i>
<div class="select-icon-container" v-if="haveStates('billing')">
<i class="select-icon rango-arrow-down"></i>
</div>
<span class="control-error" v-if="errors.has('address-form.billing[state]')">
@{{ errors.first('address-form.billing[state]') }}
@ -421,8 +423,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[postcode]') ? 'has-error' : ''}`">
<label for="billing[postcode]" class="required">
{{ __('shop::app.checkout.onepage.postcode') }}*
<label for="billing[postcode]" class="mandatory">
{{ __('shop::app.checkout.onepage.postcode') }}
</label>
<input
@ -440,8 +442,8 @@
</div>
<div :class="`col-12 form-field ${errors.has('address-form.billing[phone]') ? 'has-error' : ''}`">
<label for="billing[phone]" class="required">
{{ __('shop::app.checkout.onepage.phone') }}*
<label for="billing[phone]" class="mandatory">
{{ __('shop::app.checkout.onepage.phone') }}
</label>
<input

View File

@ -131,7 +131,7 @@
{{ __('velocity::app.shop.general.enter-current-password') }}
</label>
<div class="col-12">
<div :class="`col-12 ${errors.has('oldpassword') ? 'has-error' : ''}`">
<input value="" name="oldpassword" type="password" />
</div>
</div>
@ -141,8 +141,16 @@
{{ __('velocity::app.shop.general.new-password') }}
</label>
<div class="col-12">
<input value="" name="password" type="password" />
<div :class="`col-12 ${errors.has('password') ? 'has-error' : ''}`">
<input
value=""
name="password"
type="password"
v-validate="'min:6|max:18'" />
<span class="control-error" v-if="errors.has('password')">
@{{ errors.first('password') }}
</span>
</div>
</div>
@ -151,8 +159,13 @@
{{ __('velocity::app.shop.general.confirm-new-password') }}
</label>
<div class="col-12">
<input value="" name="password_confirmation" type="password" />
<div :class="`col-12 ${errors.has('password_confirmation') ? 'has-error' : ''}`">
<input value="" name="password_confirmation" type="password"
v-validate="'min:6|confirmed:password'" data-vv-as="confirm password" />
<span class="control-error" v-if="errors.has('password_confirmation')">
@{{ errors.first('password_confirmation') }}
</span>
</div>
</div>

View File

@ -131,7 +131,7 @@
{{ __('velocity::app.shop.general.enter-current-password') }}
</label>
<div class="col-12">
<div :class="`col-12 ${errors.has('oldpassword') ? 'has-error' : ''}`">
<input value="" name="oldpassword" type="password" />
</div>
</div>
@ -141,8 +141,16 @@
{{ __('velocity::app.shop.general.new-password') }}
</label>
<div class="col-12">
<input value="" name="password" type="password" />
<div :class="`col-12 ${errors.has('password') ? 'has-error' : ''}`">
<input
value=""
name="password"
type="password"
v-validate="'min:6|max:18'" />
<span class="control-error" v-if="errors.has('password')">
@{{ errors.first('password') }}
</span>
</div>
</div>
@ -151,8 +159,13 @@
{{ __('velocity::app.shop.general.confirm-new-password') }}
</label>
<div class="col-12">
<input value="" name="password_confirmation" type="password" />
<div :class="`col-12 ${errors.has('password_confirmation') ? 'has-error' : ''}`">
<input value="" name="password_confirmation" type="password"
v-validate="'min:6|confirmed:password'" data-vv-as="confirm password" />
<span class="control-error" v-if="errors.has('password_confirmation')">
@{{ errors.first('password_confirmation') }}
</span>
</div>
</div>

View File

@ -44,8 +44,8 @@
{!! view_render_event('bagisto.shop.customers.login_form_controls.before') !!}
<div class="form-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email" class="required label-style">
{{ __('shop::app.customer.login-form.email') }}*
<label for="email" class="mandatory label-style">
{{ __('shop::app.customer.login-form.email') }}
</label>
<input
@ -62,8 +62,8 @@
</div>
<div class="form-group" :class="[errors.has('password') ? 'has-error' : '']">
<label for="password" class="required label-style">
{{ __('shop::app.customer.login-form.password') }}*
<label for="password" class="mandatory label-style">
{{ __('shop::app.customer.login-form.password') }}
</label>
<input

View File

@ -41,14 +41,14 @@
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email" class="required label-style">
<label for="email" class="mandatory label-style">
{{ __('shop::app.customer.forgot-password.email') }}
</label>
<input
type="email"
class="form-style"
name="email"
class="form-style"
v-validate="'required|email'" />
<span class="control-error" v-if="errors.has('email')">

View File

@ -28,6 +28,8 @@
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ $token }}">
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
<div :class="`form-group ${errors.has('email') ? 'has-error' : ''}`">
@ -73,7 +75,7 @@
<input
type="password"
class="form-style"
name="confirm_password"
name="password_confirmation"
v-validate="'required|min:6|confirmed:password'" />
<span class="control-error" v-if="errors.has('confirm_password')">