commit
242b64afbf
|
|
@ -35,7 +35,7 @@ class OrderShipmentsDataGrid extends DataGrid
|
|||
$this->addFilter('inventory_source_name', 'is.name');
|
||||
$this->addFilter('orderdate', 'ors.created_at');
|
||||
$this->addFilter('shipment_created_at', 'shipments.created_at');
|
||||
$this->addFilter('shipped_to', DB::raw('CONCAT(ors.customer_first_name, " ", ors.customer_last_name)'));
|
||||
$this->addFilter('shipped_to', DDB::raw('CONCAT(order_address_shipping.first_name, " ", order_address_shipping.last_name) as shipped_to'));
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,5 +84,11 @@ class UserDataGrid extends DataGrid
|
|||
'route' => 'admin.users.edit',
|
||||
'icon' => 'icon pencil-lg-icon'
|
||||
]);
|
||||
|
||||
$this->addAction([
|
||||
'type' => 'Delete',
|
||||
'route' => 'admin.users.delete',
|
||||
'icon' => 'icon trash-icon'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,7 +33,6 @@ class SessionController extends Controller
|
|||
$subscriber = new CustomerEventsHandler;
|
||||
|
||||
Event::subscribe($subscriber);
|
||||
|
||||
}
|
||||
|
||||
public function show()
|
||||
|
|
|
|||
|
|
@ -104,15 +104,27 @@ class WishlistController extends Controller
|
|||
* @param integer $itemId
|
||||
*/
|
||||
public function remove($itemId) {
|
||||
$result = $this->wishlist->deleteWhere(['customer_id' => auth()->guard('customer')->user()->id, 'channel_id' => core()->getCurrentChannel()->id, 'id' => $itemId]);
|
||||
$found = $this->wishlist->find($itemId);
|
||||
|
||||
if ($result) {
|
||||
session()->flash('success', trans('customer::app.wishlist.removed'));
|
||||
|
||||
return redirect()->back();
|
||||
if(isset($found)) {
|
||||
$found = true;
|
||||
} else {
|
||||
session()->flash('error', trans('customer::app.wishlist.remove-fail'));
|
||||
$found = false;
|
||||
}
|
||||
|
||||
if($found) {
|
||||
$result = $this->wishlist->deleteWhere(['customer_id' => auth()->guard('customer')->user()->id, 'channel_id' => core()->getCurrentChannel()->id, 'id' => $itemId]);
|
||||
|
||||
if ($result) {
|
||||
session()->flash('success', trans('customer::app.wishlist.removed'));
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('customer::app.wishlist.remove-fail'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
} else {
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterCustomerIdNullableInProductReviewsTable extends Migration
|
||||
class AlterCustomerIdInProductReviewsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
|
|
@ -93,6 +93,8 @@ class CartController extends Controller
|
|||
try {
|
||||
Event::fire('checkout.cart.add.before', $id);
|
||||
|
||||
dd(request()->except('_token'));
|
||||
|
||||
$result = Cart::add($id, request()->except('_token'));
|
||||
|
||||
Event::fire('checkout.cart.add.after', $result);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,497 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'layouts' => [
|
||||
'my-account' => 'حسابي',
|
||||
'profile' => 'التوصيف',
|
||||
'address' => 'العنوان',
|
||||
'reviews' => 'باء-الاستعراضات',
|
||||
'wishlist' => 'قائمة الأماني',
|
||||
'orders' => 'الأوامر',
|
||||
],
|
||||
|
||||
'common' => [
|
||||
'error' => 'حدث شيء خاطئ ، رجاء حاول ثانية لاحقا.'
|
||||
],
|
||||
|
||||
'home' => [
|
||||
'page-title' => 'الحقائب إلى البيت',
|
||||
'featured-products' => 'المنتجات البارزة',
|
||||
'new-products' => 'المنتجات الجديدة',
|
||||
'verify-email' => 'تحقق من حساب بريدك الإلكتروني',
|
||||
'resend-verify-email' => 'إعادة إرسال البريد الإلكتروني للتحقق'
|
||||
],
|
||||
|
||||
'header' => [
|
||||
'title' => 'الحساب',
|
||||
'dropdown-text' => 'إدارة العربة ، الطلبات قائمة الأمنيات',
|
||||
'sign-in' => 'وقع هنا',
|
||||
'sign-up' => 'سجل',
|
||||
'account' => 'الحساب',
|
||||
'cart' => 'عربة',
|
||||
'profile' => 'التوصيف',
|
||||
'wishlist' => 'قائمة الأماني',
|
||||
'cart' => 'عربة',
|
||||
'logout' => 'خروج',
|
||||
'search-text' => 'ابحث عن المنتجات هنا'
|
||||
],
|
||||
|
||||
'minicart' => [
|
||||
'view-cart' => 'عرض عربة التسوق',
|
||||
'checkout' => 'خروج',
|
||||
'cart' => 'عربة',
|
||||
'zero' => '0'
|
||||
],
|
||||
|
||||
'footer' => [
|
||||
'subscribe-newsletter' => 'اشترك في الرسالة الإخبارية',
|
||||
'subscribe' => 'اشترك',
|
||||
'locale' => 'locale',
|
||||
'currency' => 'العملة',
|
||||
],
|
||||
|
||||
'subscription' => [
|
||||
'unsubscribe' => 'الإلغاء',
|
||||
'subscribe' => 'اشترك',
|
||||
'subscribed' => 'أنت مشترك الآن إلى الإشتراك بريد إلكتروني',
|
||||
'not-subscribed' => 'لا يمكنك الاشتراك في البريد الإلكتروني ، حاول مرة أخرى بعد بعض الوقت',
|
||||
'already' => 'أنت مشترك بالفعل في قائمة اشتراكاتنا',
|
||||
'unsubscribed' => 'أنت غير مرتبط من بريد باجيستو الإشتراك',
|
||||
'already-unsub' => 'أنت بالفعل غير مرتبط',
|
||||
'not-subscribed' => 'خطأ! البريد لا يمكن إرساله حاليا ، الرجاء المحاولة لاحقا'
|
||||
],
|
||||
|
||||
'search' => [
|
||||
'no-results' => 'لا توجد نتائج',
|
||||
'page-title' => 'Bagisto - Search',
|
||||
'found-results' => 'تم العثور على نتائج البحث',
|
||||
'found-result' => 'تم العثور على نتيجة البحث'
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'title' => 'العنوان',
|
||||
'add-review-page-title' => 'إضافة استعراض',
|
||||
'write-review' => 'اكتب مراجعة',
|
||||
'review-title' => 'أعطي مراجعتك عنوان',
|
||||
'product-review-page-title' => 'استعراض المنتجات',
|
||||
'rating-reviews' => 'التقييم والمراجعات',
|
||||
'submit' => 'قدم',
|
||||
'delete-all' => 'كل الاستعراضات حذفت بنجاح',
|
||||
'ratingreviews' => ':rating التقديرات & :review باء-الاستعراضات',
|
||||
'star' => 'نجم',
|
||||
'percentage' => ':percentage %',
|
||||
'id-star' => 'نجم'
|
||||
],
|
||||
|
||||
'customer' => [
|
||||
'signup-text' => [
|
||||
'account_exists' => 'لدي حساب بالفعل',
|
||||
'title' => 'وقع هنا'
|
||||
],
|
||||
|
||||
'signup-form' => [
|
||||
'page-title' => 'استمارة تسجيل العملاء',
|
||||
'title' => 'سجل',
|
||||
'firstname' => 'الاسم الأول',
|
||||
'lastname' => 'الاسم الأخير',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'password' => 'كلمة السر',
|
||||
'confirm_pass' => 'تأكيد كلمة السر',
|
||||
'button_title' => 'سجل',
|
||||
'agree' => 'موافق',
|
||||
'terms' => 'الشروط',
|
||||
'conditions' => 'الشروط',
|
||||
'using' => 'باستخدام هذا الموقع',
|
||||
'agreement' => 'اتفاق',
|
||||
'success' => 'الحساب أنشئ بنجاح, تم إرسال بريد إلكتروني إلى حسابك للتحقق',
|
||||
'success-verify-email-not-sent' => 'الحساب أنشئ بنجاح, لكن البريد الإلكتروني لم يتم إرساله',
|
||||
'failed' => 'خطأ! لا يمكن إنشاء حسابك ، حاول مرة أخرى لاحقا',
|
||||
'already-verified' => 'حسابك تم التحقق منه بالفعل أو الرجاء محاولة إرسال بريد إلكتروني جديد للتحقق مرة أخرى',
|
||||
'verification-not-sent' => 'خطأ! مشكلة في إرسال البريد الإلكتروني للتحقق ، حاول مرة أخرى في وقت لاحق',
|
||||
'verification-sent' => 'التحقق البريد الإلكتروني المرسل',
|
||||
'verified' => 'تم التحقق من حسابك حاول الدخول الآن',
|
||||
'verify-failed' => 'لا يمكننا التحقق من حساب بريدك',
|
||||
'dont-have-account' => 'ليس لديك حساب معنا',
|
||||
],
|
||||
|
||||
'login-text' => [
|
||||
'no_account' => 'ليس لديك حساب',
|
||||
'title' => 'سجل',
|
||||
],
|
||||
|
||||
'login-form' => [
|
||||
'page-title' => 'دخول العملاء',
|
||||
'title' => 'وقع هنا',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'password' => 'كلمة السر',
|
||||
'forgot_pass' => 'نسيت كلمة السر؟',
|
||||
'button_title' => 'وقع هنا',
|
||||
'remember' => 'تذكريني',
|
||||
'footer' => '© Copyright 2018 Webkul Software, جميع الحقوق محفوظة',
|
||||
'invalid-creds' => 'الرجاء التحقق من أوراق اعتمادك ومحاولة مرة أخرى',
|
||||
'verify-first' => 'تحقق من حساب بريدك الإلكتروني أولا',
|
||||
'resend-verification' => 'إعادة إرسال البريد الإلكتروني للتحقق مرة أخرى'
|
||||
],
|
||||
|
||||
'forgot-password' => [
|
||||
'title' => 'استرجع كلمة السر',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'submit' => 'قدم',
|
||||
'page_title' => 'العميل-نسى استمارة كلمة السر'
|
||||
],
|
||||
|
||||
'reset-password' => [
|
||||
'title' => 'أعد ضبط كلمة السر',
|
||||
'email' => 'البريد الإلكتروني المسجل',
|
||||
'password' => 'كلمة السر',
|
||||
'confirm-password' => 'تأكيد كلمة السر',
|
||||
'back-link-title' => 'العودة للتوقيع',
|
||||
'submit-btn-title' => 'أعد ضبط كلمة السر'
|
||||
],
|
||||
|
||||
'account' => [
|
||||
'dashboard' => 'الزبون تحرير التوصيف',
|
||||
'menu' => 'القائمة',
|
||||
|
||||
'profile' => [
|
||||
'index' => [
|
||||
'page-title' => 'ملف الزبون',
|
||||
'title' => 'التوصيف',
|
||||
'edit' => 'حرر',
|
||||
],
|
||||
|
||||
'edit-success' => 'جاري تحديث الملف بنجاح',
|
||||
'edit-fail' => 'خطأ! الملف الشخصي لا يمكن تحديثه ، رجاء حاول مرة أخرى لاحقا',
|
||||
'unmatch' => 'كلمة السر القديمة لا تتطابق',
|
||||
|
||||
'fname' => 'الاسم الأول',
|
||||
'lname' => 'الاسم الأخير',
|
||||
'gender' => 'باء-نوع الجنس',
|
||||
'dob' => 'تاريخ الميلاد',
|
||||
'phone' => 'الهاتف',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'opassword' => 'كلمة السر القديمة',
|
||||
'password' => 'كلمة السر',
|
||||
'cpassword' => 'تأكيد كلمة السر',
|
||||
'submit' => 'تحديث التوصيف',
|
||||
|
||||
'edit-profile' => [
|
||||
'title' => 'تحرير التوصيف',
|
||||
'page-title' => 'الزبون تحرير التوصيف استمارة'
|
||||
]
|
||||
],
|
||||
|
||||
'address' => [
|
||||
'index' => [
|
||||
'page-title' => 'عنوان العميل',
|
||||
'title' => 'العنوان',
|
||||
'add' => 'أضف العنوان',
|
||||
'edit' => 'حرر',
|
||||
'empty' => 'ليس لديك أي عناوين محفوظة هنا ، من فضلك حاول أن تنشئها بالنقر على الرابط بالأسفل',
|
||||
'create' => 'أنشئ العنوان',
|
||||
'delete' => 'احذف',
|
||||
'make-default' => 'افتراضي',
|
||||
'default' => 'افتراضي',
|
||||
'contact' => 'Contact',
|
||||
'confirm-delete' => 'هل تريد حقا حذف هذا العنوان؟',
|
||||
'default-delete' => 'لا يمكن تغيير العنوان الافتراضي'
|
||||
],
|
||||
|
||||
'create' => [
|
||||
'page-title' => 'زبون اضف استمارة',
|
||||
'title' => 'أضف العنوان',
|
||||
'address1' => 'العنوان سطر 1',
|
||||
'address2' => 'العنوان خط 2',
|
||||
'country' => 'البلد',
|
||||
'state' => 'الحالة',
|
||||
'select-state' => 'انتق a منطقة أو ولاية أو مقاطعة',
|
||||
'city' => 'مدينة',
|
||||
'postcode' => 'الرمز البريدي',
|
||||
'phone' => 'الهاتف',
|
||||
'submit' => 'احفظ العنوان',
|
||||
'success' => 'تم إضافة العنوان بنجاح.',
|
||||
'error' => 'لا يمكن إضافة العنوان.'
|
||||
],
|
||||
|
||||
'edit' => [
|
||||
'page-title' => 'عنوان تحرير الزبون',
|
||||
'title' => 'حرر العنوان',
|
||||
'submit' => 'احفظ العنوان',
|
||||
'success' => 'العنوان تم تحديثه بنجاح.'
|
||||
],
|
||||
'delete' => [
|
||||
'success' => 'العنوان محذوف بنجاح',
|
||||
'failure' => 'لا يمكن حذف العنوان'
|
||||
]
|
||||
],
|
||||
|
||||
'order' => [
|
||||
'index' => [
|
||||
'page-title' => 'طلبات الزبائن',
|
||||
'title' => 'الأوامر',
|
||||
'order_id' => 'ترتيب الهوية',
|
||||
'date' => 'التاريخ',
|
||||
'status' => 'الحالة',
|
||||
'total' => 'المجموع'
|
||||
],
|
||||
|
||||
'view' => [
|
||||
'page-tile' => 'ترتيب #:order_id',
|
||||
'info' => 'معلومات',
|
||||
'placed-on' => 'وضع على',
|
||||
'products-ordered' => 'المنتجات المطلوبة',
|
||||
'invoices' => 'الفواتير',
|
||||
'shipments' => 'الشحنات',
|
||||
'SKU' => 'SKU',
|
||||
'product-name' => 'الاسم',
|
||||
'qty' => 'Qty',
|
||||
'item-status' => 'حالة البند',
|
||||
'item-ordered' => 'أمر(:qty_ordered)',
|
||||
'item-invoice' => '3-الفواتير(:qty_invoiced)',
|
||||
'item-shipped' => 'شحنت(:qty_shipped)',
|
||||
'item-canceled' => 'ملغاة(:qty_canceled)',
|
||||
'price' => 'السعر',
|
||||
'total' => 'المجموع',
|
||||
'subtotal' => 'المجموع الفرعي',
|
||||
'shipping-handling' => 'الشحن والمناولة',
|
||||
'tax' => 'الضرائب',
|
||||
'tax-percent' => 'نسبة الضرائب',
|
||||
'tax-amount' => 'المبلغ الضريبي',
|
||||
'discount-amount' => 'مبلغ الخصم',
|
||||
'grand-total' => 'المجموع الكلي',
|
||||
'total-paid' => 'المجموع المدفوع',
|
||||
'total-refunded' => 'مجموع المبالغ المستردة',
|
||||
'total-due' => 'المجموع المستحق',
|
||||
'shipping-address' => 'عنوان الشحن',
|
||||
'billing-address' => 'عنوان الفواتير',
|
||||
'shipping-method' => 'طريقة الشحن',
|
||||
'payment-method' => 'طريقة الدفع',
|
||||
'individual-invoice' => 'فاتورة #:invoice_id',
|
||||
'individual-shipment' => 'الشحن #:shipment_id',
|
||||
'print' => 'اطبع',
|
||||
'invoice-id' => 'فاتورة الهوية',
|
||||
'order-id' => 'ترتيب الهوية',
|
||||
'order-date' => 'تاريخ الطلب',
|
||||
'bill-to' => 'بيل إلى',
|
||||
'ship-to' => 'السفينة إلى',
|
||||
'contact' => 'Contact'
|
||||
]
|
||||
],
|
||||
|
||||
'review' => [
|
||||
'index' => [
|
||||
'title' => 'باء-الاستعراضات',
|
||||
'page-title' => 'مراجعات العملاء'
|
||||
],
|
||||
|
||||
'view' => [
|
||||
'page-tile' => 'باء-الاستعراض #:id',
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
'products' => [
|
||||
'layered-nav-title' => 'تسوق من قبل',
|
||||
'price-label' => 'أقل من',
|
||||
'remove-filter-link-title' => 'امسح الكل',
|
||||
'sort-by' => 'افرز حسب',
|
||||
'from-a-z' => 'من a-z',
|
||||
'from-z-a' => 'من ز-أ',
|
||||
'newest-first' => 'الأحدث أولا',
|
||||
'oldest-first' => 'الأكبر أولا',
|
||||
'cheapest-first' => 'أرخص أولا',
|
||||
'expensive-first' => 'مكلفة أولا',
|
||||
'show' => 'اعرض',
|
||||
'pager-info' => 'عرض :showing of :total Items',
|
||||
'description' => 'الوصف',
|
||||
'specification' => 'مواصفات',
|
||||
'total-reviews' => ':total Reviews',
|
||||
'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
|
||||
'by' => 'من قبل :name',
|
||||
'up-sell-title' => 'وجدنا منتجات أخرى قد ترغب!',
|
||||
'reviews-title' => 'التقديرات& باء-الاستعراضات',
|
||||
'write-review-btn' => 'اكتب مراجعة',
|
||||
'choose-option' => 'اختر خيارا',
|
||||
'sale' => 'بيع',
|
||||
'new' => 'جديد',
|
||||
'empty' => 'لا توجد منتجات متاحة في هذه الفئة',
|
||||
'add-to-cart' => 'أضف إلى العربة',
|
||||
'buy-now' => 'اشتر الآن',
|
||||
'whoops' => 'ووبس!',
|
||||
'quantity' => 'الكمية',
|
||||
'in-stock' => 'في الأسهم',
|
||||
'out-of-stock' => 'خارج الأسهم',
|
||||
'view-all' => 'عرض الكل'
|
||||
],
|
||||
|
||||
'wishlist' => [
|
||||
'title' => 'قائمة الأماني',
|
||||
'deleteall' => 'احذف الكل',
|
||||
'moveall' => 'نقل الكل منتوجات إلى عربة',
|
||||
'move-to-cart' => 'نقل إلى عربة',
|
||||
'error' => 'لا يمكن إضافة المنتج إلى قائمة الأمنيات بسبب مشاكل مجهولة ، الرجاء التحقق لاحقا',
|
||||
'add' => 'البند مضاف بنجاح إلى قائمة الأمنيات',
|
||||
'remove' => 'البند حذف بنجاح من قائمة الأمنيات',
|
||||
'moved' => 'تم نقل البند بنجاح إلى قائمة الأمنيات',
|
||||
'move-error' => 'لا يمكن نقل العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
|
||||
'success' => 'البند مضاف بنجاح إلى قائمة الأمنيات',
|
||||
'failure' => 'لا يمكن إضافة العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
|
||||
'already' => 'العنصر موجود بالفعل في قائمة أمنياتك',
|
||||
'removed' => 'البند حذف بنجاح من قائمة الأمنيات',
|
||||
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
|
||||
'empty' => 'You do not have any items in your Wishlist',
|
||||
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
// 'empty' => 'أنت لم تراجع أي منتج لحد الآن'
|
||||
// ]
|
||||
|
||||
'buynow' => [
|
||||
'no-options' => 'رجاء تحديد خيارات قبل شراء هذا المنتج'
|
||||
],
|
||||
|
||||
|
||||
'checkout' => [
|
||||
'cart' => [
|
||||
'integrity' => [
|
||||
'missing_fields' =>'إنتهاك سلامة نظام العربة ، بعض الحقول المطلوبة مفقودة',
|
||||
'missing_options' =>'إنتهاك سلامة نظام العربة ، الخيارات مفقودة لمنتج قابل للتهيئة',
|
||||
],
|
||||
'create-error' => 'صادفت بعض القضايا أثناء صناعة السيارات',
|
||||
'title' => 'عربة التسوق',
|
||||
'empty' => 'عربة تسوقك فارغة',
|
||||
'update-cart' => 'تحديث عربة',
|
||||
'continue-shopping' => 'واصل التسوق',
|
||||
'proceed-to-checkout' => 'انتقل إلى الخروج',
|
||||
'remove' => 'احذف',
|
||||
'remove-link' => 'احذف',
|
||||
'move-to-wishlist' => 'انقل إلى قائمة الأمنيات',
|
||||
'move-to-wishlist-success' => 'نقل العنصر إلى قائمة الأمنيات',
|
||||
'move-to-wishlist-error' => 'لا يستطيع انقل عنصر إلى رجاء حاول ثانية لاحقا',
|
||||
'add-config-warning' => 'الرجاء اختيار الخيار قبل إضافة إلى العربة',
|
||||
'quantity' => [
|
||||
'quantity' => 'الكمية',
|
||||
'success' => 'البند(ق) من العربة تم تحديثه بنجاح',
|
||||
'illegal' => 'الكمية لا يمكن أن تكون أقل من واحد',
|
||||
'inventory_warning' => 'الكمية المطلوبة غير متوفرة ، الرجاء المحاولة لاحقا',
|
||||
'error' => 'لا يستطيع تحديث عنصر s في الوقت الحالي رجاء حاول ثانية لاحقا'
|
||||
],
|
||||
'item' => [
|
||||
'error_remove' => 'لا عناصر لإزالتها من العربة',
|
||||
'success' => 'تم بنجاح إضافة البند إلى العربة',
|
||||
'success-remove' => 'تم إزالة العنصر بنجاح من العربة',
|
||||
'error-add' => 'لا يمكن إضافة العنصر إلى العربة ، رجاء حاول مرة أخرى لاحقا',
|
||||
],
|
||||
'quantity-error' => 'الكمية المطلوبة غير متوفرة',
|
||||
'cart-subtotal' => 'المجموع الفرعي للعربات',
|
||||
'cart-remove-action' => 'هل تريد حقا أن تفعل هذا ؟'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
'title' => 'خروج',
|
||||
'information' => 'معلومات',
|
||||
'shipping' => 'الشحن',
|
||||
'payment' => 'الدفع',
|
||||
'complete' => 'اكتمل',
|
||||
'billing-address' => 'عنوان الفواتير',
|
||||
'sign-in' => 'وقع هنا',
|
||||
'first-name' => 'الاسم الأول',
|
||||
'last-name' => 'الاسم الأخير',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'address1' => 'العنوان',
|
||||
'address2' => 'العنوان 2',
|
||||
'city' => 'مدينة',
|
||||
'state' => 'الحالة',
|
||||
'select-state' => 'انتق a منطقة أو ولاية أو مقاطعة',
|
||||
'postcode' => 'الرمز البريدي / الرمز البريدي',
|
||||
'phone' => 'الهاتف',
|
||||
'country' => 'البلد',
|
||||
'order-summary' => 'أمر ملخص',
|
||||
'shipping-address' => 'عنوان الشحن',
|
||||
'use_for_shipping' => 'السفينة إلى هذا العنوان',
|
||||
'continue' => 'تابع',
|
||||
'shipping-method' => 'طريقة الشحن',
|
||||
'payment-information' => 'معلومات الدفع',
|
||||
'payment-method' => 'طريقة الدفع',
|
||||
'summary' => 'موجز النظام',
|
||||
'price' => 'السعر',
|
||||
'quantity' => 'الكمية',
|
||||
'billing-address' => 'عنوان الفواتير',
|
||||
'shipping-address' => 'عنوان الشحن',
|
||||
'contact' => 'Contact',
|
||||
'place-order' => 'ترتيب المكان'
|
||||
],
|
||||
|
||||
'total' => [
|
||||
'order-summary' => 'أمر ملخص',
|
||||
'sub-total' => 'البنود',
|
||||
'grand-total' => 'المجموع الكلي',
|
||||
'delivery-charges' => 'رسوم التسليم',
|
||||
'tax' => 'الضرائب',
|
||||
'price' => 'السعر '
|
||||
],
|
||||
|
||||
'success' => [
|
||||
'title' => 'ترتيب الموضع بنجاح',
|
||||
'thanks' => 'شكرا على طلبك!',
|
||||
'order-id-info' => 'Your order id is #:order_id',
|
||||
'info' => 'سنرسل لك بريدا الكترونيا ، تفاصيل طلباتك و معلومات التعقب'
|
||||
]
|
||||
],
|
||||
|
||||
'mail' => [
|
||||
'order' => [
|
||||
'subject' => 'تأكيد الطلب الجديد',
|
||||
'heading' => 'تأكيد الطلب!',
|
||||
'dear' => 'عزيزي :customer_name',
|
||||
'greeting' => 'شكرا على طلبك :order_id placed on :created_at',
|
||||
'summary' => 'موجز النظام',
|
||||
'shipping-address' => 'عنوان الشحن',
|
||||
'billing-address' => 'عنوان الفواتير',
|
||||
'contact' => 'Contact',
|
||||
'shipping' => 'الشحن',
|
||||
'payment' => 'الدفع',
|
||||
'price' => 'السعر',
|
||||
'quantity' => 'الكمية',
|
||||
'subtotal' => 'المجموع الفرعي',
|
||||
'shipping-handling' => 'الشحن والمناولة',
|
||||
'tax' => 'الضرائب',
|
||||
'grand-total' => 'المجموع الكلي',
|
||||
'final-summary' => 'شكرا لإظهارك إهتمامك بمتجرنا سنرسل لك رقم التتبع بمجرد شحنه',
|
||||
'help' => 'إذا كنت بحاجة إلى أي نوع من المساعدة يرجى الاتصال بنا على: support_email',
|
||||
'thanks' => 'شكرا!'
|
||||
],
|
||||
'invoice' => [
|
||||
'heading' => 'فاتورتك #:invoice_id for Order #:order_id',
|
||||
'subject' => 'فاتورة لطلبك #:order_id',
|
||||
'summary' => 'موجز الفاتورة',
|
||||
],
|
||||
'shipment' => [
|
||||
'heading' => 'شحنتك #:shipment_id for Order #:order_id',
|
||||
'subject' => 'شحنة لطلبك #:order_id',
|
||||
'summary' => 'موجز الشحن',
|
||||
'carrier' => 'ناقل',
|
||||
'tracking-number' => 'رقم التتبع'
|
||||
],
|
||||
'forget-password' => [
|
||||
'dear' => 'عزيزي :name',
|
||||
'info' => 'أنت تستلم هذا البريد الإلكتروني لأننا تلقينا طلب إعادة ضبط كلمة السر لحسابك',
|
||||
'reset-password' => 'أعد ضبط كلمة السر',
|
||||
'final-summary' => 'إذا لم تطلب إعادة تعيين كلمة السر ، لا إجراء آخر مطلوب',
|
||||
'thanks' => 'شكرا!'
|
||||
]
|
||||
],
|
||||
|
||||
'webkul' => [
|
||||
'copy-right' => '© Copyright 2018 Webkul Software, All rights reserved'
|
||||
],
|
||||
|
||||
'response' => [
|
||||
'create-success' => ':name created successfully.',
|
||||
'update-success' => ':name updated successfully.',
|
||||
'delete-success' => ':name deleted successfully.',
|
||||
'submit-success' => ':name submitted successfully.'
|
||||
],
|
||||
];
|
||||
|
|
@ -5,6 +5,7 @@ namespace Tests\Feature;
|
|||
use Tests\TestCase;
|
||||
|
||||
use Auth;
|
||||
use Crypt;
|
||||
|
||||
use App;
|
||||
use Faker\Generator as Faker;
|
||||
|
|
@ -50,8 +51,8 @@ class AuthTest extends TestCase
|
|||
$customers = app(Customer::class);
|
||||
|
||||
$created = $customers->create([
|
||||
'first_name' => explode(' ',$faker->name)[0],
|
||||
'last_name' => explode(' ',$faker->name)[0],
|
||||
'first_name' => explode(' ', $faker->name)[0],
|
||||
'last_name' => explode(' ', $faker->name)[0],
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'gender' => $faker->randomElement($array = array ('Male','Female', 'Other')),
|
||||
'date_of_birth' => $faker->date($format = 'Y-m-d', $max = 'now'),
|
||||
|
|
@ -64,12 +65,60 @@ class AuthTest extends TestCase
|
|||
}
|
||||
|
||||
public function testCustomerLogin() {
|
||||
config(['app.url' => 'http://127.0.0.1:8000']);
|
||||
|
||||
$customers = app(Customer::class);
|
||||
$customer = $customers->findOneByField('email', 'prashant@webkul.com');
|
||||
|
||||
$customer = $customers->find(1);
|
||||
$response = $this->post('/customer/login', [
|
||||
'email' => $customer->email,
|
||||
'password' => '12345678'
|
||||
]);
|
||||
|
||||
$user = ['email' => $customer->email, 'password' => $customer->password];
|
||||
|
||||
$this->assertAuthenticatedAs($user);
|
||||
$response->assertRedirect('/customer/account/profile');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that customer cannot login with the wrong credentials.
|
||||
*/
|
||||
public function willNotLoginWithWrongCredentials()
|
||||
{
|
||||
$customers = app(Customer::class);
|
||||
$customer = $customers->findOneByField('email', 'prashant@webkul.com');
|
||||
|
||||
$response = $this->from(route('login'))->post(route('customer.session.create'),
|
||||
[
|
||||
'email' => $customer->email,
|
||||
'password' => 'wrongpassword3428903mlndvsnljkvsd',
|
||||
]);
|
||||
|
||||
$this->assertGuest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test to confirm that customer cannot login if user does not exist.
|
||||
*/
|
||||
public function willNotLoginWithNonexistingCustomer()
|
||||
{
|
||||
$response = $this->post(route('customer.session.create'), [
|
||||
'email' => 'fiaiia9q2943jklq34h203qtb3o2@something.com',
|
||||
'password' => 'wrong-password',
|
||||
]);
|
||||
|
||||
$this->assertGuest();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test that customer can logout
|
||||
*/
|
||||
public function allowsCustomerToLogout()
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
// dd('logout test', $customer);
|
||||
|
||||
$this->get(route('customer.session.destroy'));
|
||||
|
||||
$this->assertGuest();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class CheckProductsSystem extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testExample()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
use App;
|
||||
|
||||
use Cart;
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Customer\Repositories\CustomerRepository as Customer;
|
||||
|
||||
class AuthTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Add a simple Item in cart for guest
|
||||
*/
|
||||
public function addSimpleItemGuest() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a configurable Item in cart for guest
|
||||
*/
|
||||
public function addConfigurableItemGuest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an Item in cart for guest
|
||||
*/
|
||||
public function removeItemGuest() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Webkul\Category\Repositories\CategoryRepository;
|
||||
|
||||
class GeneralTest extends TestCase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ class ExampleTest extends TestCase
|
|||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue