Sales email templates added

This commit is contained in:
jitendra 2018-10-17 12:51:47 +05:30
parent 0b95681324
commit d3b73f517c
127 changed files with 2328 additions and 1114 deletions

View File

@ -93,6 +93,28 @@ return [
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Base Currency Code
|--------------------------------------------------------------------------
|
| Here you may specify the base currency code for your application.
|
*/
'currency' => 'USD',
/*
|--------------------------------------------------------------------------
| Default channel Code
|--------------------------------------------------------------------------
|
| Here you may specify the default channel code for your application.
|
*/
'channel' => 'default',
/*
|--------------------------------------------------------------------------
| Encryption Key

View File

@ -76,13 +76,6 @@ class ExchangeRatesDataGrid
'label' => 'Rate ID',
'sortable' => true,
],
[
'name' => 'source_currency',
'alias' => 'exchSourceCurrency',
'type' => 'string',
'label' => 'Source Currency',
'sortable' => true,
],
[
'name' => 'target_currency',
'alias' => 'exchTargetCurrency',
@ -91,10 +84,10 @@ class ExchangeRatesDataGrid
'sortable' => true,
],
[
'name' => 'ratio',
'alias' => 'exchRatio',
'name' => 'rate',
'alias' => 'exchRate',
'type' => 'string',
'label' => 'Exchange Ratio',
'label' => 'Exchange Rate',
],
],
@ -108,13 +101,6 @@ class ExchangeRatesDataGrid
'type' => 'number',
'label' => 'Rate ID',
],
[
'column' => 'source_currency',
'alias' => 'exchSourceCurrency',
'type' => 'string',
'label' => 'Source Currency',
'sortable' => true,
],
[
'column' => 'target_currency',
'alias' => 'exchTargetCurrency',
@ -127,11 +113,6 @@ class ExchangeRatesDataGrid
//don't use aliasing in case of searchables
'searchable' => [
[
'column' => 'source_currency',
'type' => 'string',
'label' => 'Source Currency',
],
[
'column' => 'target_currency',
'type' => 'string',

View File

@ -6,26 +6,26 @@ use Illuminate\View\View;
use Webkul\Ui\DataGrid\Facades\DataGrid;
/**
* Tax Rules DataGrid
* Tax Category DataGrid
*
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class TaxRuleDataGrid
class TaxCategoryDataGrid
{
/**
* The Tax Rule Data
* The Tax Category Data
* Grid implementation.
*
* @var TaxRuleDataGrid
* @var TaxCategoryDataGrid
*/
public function createTaxRuleDataGrid()
public function createTaxCategoryDataGrid()
{
return DataGrid::make([
'name' => 'Tax Rule',
'name' => 'Tax Category',
'table' => 'tax_categories as tr',
'select' => 'tr.id',
'perpage' => 10,
@ -154,7 +154,7 @@ class TaxRuleDataGrid
public function render() {
return $this->createTaxRuleDataGrid()->render();
return $this->createTaxCategoryDataGrid()->render();
}
}

View File

@ -15,7 +15,7 @@ use Webkul\Ui\DataGrid\Facades\DataGrid;
class TaxRateDataGrid
{
/**
* The Tax Rule Data
* The Tax Category Data
* Grid implementation.
*
* @var TaxRateDataGrid

View File

@ -41,27 +41,27 @@ Route::group(['middleware' => ['web']], function () {
//Customers Management Routes
Route::get('customer', 'Webkul\Core\Http\Controllers\CustomerController@index')->defaults('_config', [
Route::get('customers', 'Webkul\Core\Http\Controllers\CustomerController@index')->defaults('_config', [
'view' => 'admin::customers.index'
])->name('admin.customer.index');
Route::get('customer/orders', 'Webkul\Core\Http\Controllers\CustomerController@index')->defaults('_config',[
Route::get('customers/orders', 'Webkul\Core\Http\Controllers\CustomerController@index')->defaults('_config',[
'view' => 'admin::customers.orders.index'
])->name('admin.customer.orders.index');
Route::get('customer/create', 'Webkul\Core\Http\Controllers\CustomerController@create')->defaults('_config',[
Route::get('customers/create', 'Webkul\Core\Http\Controllers\CustomerController@create')->defaults('_config',[
'view' => 'admin::customers.create'
])->name('admin.customer.create');
Route::post('customer/create', 'Webkul\Core\Http\Controllers\CustomerController@store')->defaults('_config',[
Route::post('customers/create', 'Webkul\Core\Http\Controllers\CustomerController@store')->defaults('_config',[
'redirect' => 'admin.customer.index'
])->name('admin.customer.store');
Route::get('customer/edit/{id}', 'Webkul\Core\Http\Controllers\CustomerController@edit')->defaults('_config',[
Route::get('customers/edit/{id}', 'Webkul\Core\Http\Controllers\CustomerController@edit')->defaults('_config',[
'view' => 'admin::customers.edit'
])->name('admin.customer.edit');
Route::put('customer/edit/{id}', 'Webkul\Core\Http\Controllers\CustomerController@update')->defaults('_config', [
Route::put('customers/edit/{id}', 'Webkul\Core\Http\Controllers\CustomerController@update')->defaults('_config', [
'redirect' => 'admin.customer.index'
])->name('admin.customer.update');
@ -88,7 +88,7 @@ Route::group(['middleware' => ['web']], function () {
'view' => 'admin::sales.orders.view'
])->name('admin.sales.orders.view');
Route::get('/orders/cancel/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@cancel')->defaults('_config', [
Route::get('/orders/cancel/{id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@cancel')->defaults('_config', [
'view' => 'admin::sales.orders.cancel'
])->name('admin.sales.orders.cancel');
@ -197,6 +197,10 @@ Route::group(['middleware' => ['web']], function () {
'redirect' => 'admin.catalog.attributes.index'
])->name('admin.catalog.attributes.update');
Route::get('/attributes/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@destroy')->defaults('_config', [
'view' => 'admin::catalog.attributes.delete'
])->name('admin.catalog.attributes.delete');
// Catalog Family Routes
Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [
@ -396,7 +400,7 @@ Route::group(['middleware' => ['web']], function () {
'view' => 'admin::tax.tax-categories.index'
])->name('admin.tax-categories.index');
// tax rule routes
// tax category routes
Route::get('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [
'view' => 'admin::tax.tax-categories.create'
])->name('admin.tax-categories.show');
@ -413,7 +417,7 @@ Route::group(['middleware' => ['web']], function () {
'redirect' => 'admin.tax-categories.index'
])->name('admin.tax-categories.update');
//tax rule ends
//tax category ends
//tax rate

View File

@ -0,0 +1,47 @@
<?php
namespace Webkul\Admin\Listeners;
use Illuminate\Support\Facades\Mail;
use Webkul\Admin\Mail\NewOrderNotification;
use Webkul\Admin\Mail\NewInvoiceNotification;
use Webkul\Admin\Mail\NewShipmentNotification;
/**
* Order event handler
*
* @author Jitendra Singh <jitendra@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class Order {
/**
* @param mixed $order
*
* Send new order confirmation mail to the customer
*/
public function sendNewOrderMail($order)
{
Mail::send(new NewOrderNotification($order));
}
/**
* @param mixed $invoice
*
* Send new invoice mail to the customer
*/
public function sendNewInvoiceMail($invoice)
{
Mail::send(new NewInvoiceNotification($invoice));
}
/**
* @param mixed $shipment
*
* Send new shipment mail to the customer
*/
public function sendNewShipmentMail($shipment)
{
Mail::send(new NewShipmentNotification($shipment));
}
}

View File

@ -0,0 +1,51 @@
<?php
namespace Webkul\Admin\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* New Invoice Mail class
*
* @author Jitendra Singh <jitendra@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class NewInvoiceNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The invoice instance.
*
* @var Invoice
*/
public $invoice;
/**
* Create a new message instance.
*
* @param mixed $invoice
* @return void
*/
public function __construct($invoice)
{
$this->invoice = $invoice;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$order = $this->invoice->order;
return $this->to($order->customer_email, $order->customer_full_name)
->subject(trans('admin::app.mail.invoice.subject', ['order_id' => $order->id]))
->view('admin::emails.sales.new-invoice');
}
}

View File

@ -0,0 +1,48 @@
<?php
namespace Webkul\Admin\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* New Order Mail class
*
* @author Jitendra Singh <jitendra@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class NewOrderNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The order instance.
*
* @var Order
*/
public $order;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($order)
{
$this->order = $order;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->to($this->order->customer_email, $this->order->customer_full_name)
->subject(trans('admin::app.mail.order.subject'))
->view('admin::emails.sales.new-order');
}
}

View File

@ -0,0 +1,51 @@
<?php
namespace Webkul\Admin\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* New Shipment Mail class
*
* @author Jitendra Singh <jitendra@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class NewShipmentNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* The shipment instance.
*
* @var Shipment
*/
public $shipment;
/**
* Create a new message instance.
*
* @param mixed $shipment
* @return void
*/
public function __construct($shipment)
{
$this->shipment = $shipment;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$order = $this->shipment->order;
return $this->to($order->customer_email, $order->customer_full_name)
->subject(trans('admin::app.mail.shipment.subject', ['order_id' => $order->id]))
->view('admin::emails.sales.new-shipment');
}
}

View File

@ -10,6 +10,160 @@ use Webkul\Admin\ProductFormAccordian;
class EventServiceProvider extends ServiceProvider
{
protected $menuItems = [
[
'key' => 'dashboard',
'name' => 'Dashboard',
'route' => 'admin.dashboard.index',
'sort' => 1,
'icon-class' => 'dashboard-icon',
], [
'key' => 'sales',
'name' => 'Sales',
'route' => 'admin.sales.orders.index',
'sort' => 2,
'icon-class' => 'sales-icon',
], [
'key' => 'catalog',
'name' => 'Catalog',
'route' => 'admin.catalog.products.index',
'sort' => 3,
'icon-class' => 'catalog-icon',
], [
'key' => 'catalog.products',
'name' => 'Products',
'route' => 'admin.catalog.products.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'catalog.categories',
'name' => 'Categories',
'route' => 'admin.catalog.categories.index',
'sort' => 2,
'icon-class' => '',
], [
'key' => 'catalog.attributes',
'name' => 'Attributes',
'route' => 'admin.catalog.attributes.index',
'sort' => 3,
'icon-class' => '',
], [
'key' => 'catalog.families',
'name' => 'Families',
'route' => 'admin.catalog.families.index',
'sort' => 4,
'icon-class' => '',
], [
'key' => 'customers',
'name' => 'Customers',
'route' => 'admin.customer.index',
'sort' => 4,
'icon-class' => 'customer-icon',
], [
'key' => 'customers.customers',
'name' => 'Customers',
'route' => 'admin.customer.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'customers.reviews',
'name' => 'Reviews',
'route' => 'admin.customer.review.index',
'sort' => 2,
'icon-class' => '',
], [
'key' => 'configuration',
'name' => 'Configure',
'route' => 'admin.account.edit',
'sort' => 5,
'icon-class' => 'configuration-icon',
], [
'key' => 'configuration.account',
'name' => 'My Account',
'route' => 'admin.account.edit',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'settings',
'name' => 'Settings',
'route' => 'admin.locales.index',
'sort' => 6,
'icon-class' => 'settings-icon',
], [
'key' => 'settings.locales',
'name' => 'Locales',
'route' => 'admin.locales.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'settings.currencies',
'name' => 'Currencies',
'route' => 'admin.currencies.index',
'sort' => 2,
'icon-class' => '',
], [
'key' => 'settings.exchange_rates',
'name' => 'Exchange Rates',
'route' => 'admin.exchange_rates.index',
'sort' => 3,
'icon-class' => '',
], [
'key' => 'settings.inventory_sources',
'name' => 'Inventory Sources',
'route' => 'admin.inventory_sources.index',
'sort' => 4,
'icon-class' => '',
], [
'key' => 'settings.channels',
'name' => 'Channels',
'route' => 'admin.channels.index',
'sort' => 5,
'icon-class' => '',
], [
'key' => 'settings.users',
'name' => 'Users',
'route' => 'admin.users.index',
'sort' => 6,
'icon-class' => '',
], [
'key' => 'settings.users.users',
'name' => 'Users',
'route' => 'admin.users.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'settings.users.roles',
'name' => 'Roles',
'route' => 'admin.roles.index',
'sort' => 2,
'icon-class' => '',
], [
'key' => 'settings.sliders',
'name' => 'Create Sliders',
'route' => 'admin.sliders.index',
'sort' => 7,
'icon-class' => '',
], [
'key' => 'settings.taxes',
'name' => 'Taxes',
'route' => 'admin.tax-categories.index',
'sort' => 8,
'icon-class' => '',
], [
'key' => 'settings.taxes.tax-categories',
'name' => 'Tax Categories',
'route' => 'admin.tax-categories.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'settings.taxes.tax-rates',
'name' => 'Tax Rates',
'route' => 'admin.tax-rates.index',
'sort' => 2,
'icon-class' => '',
],
];
/**
* Bootstrap services.
*
@ -24,6 +178,12 @@ class EventServiceProvider extends ServiceProvider
$this->registerACL();
$this->createProductFormAccordian();
Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail');
Event::listen('checkout.invoice.save.after', 'Webkul\Admin\Listeners\Order@sendNewInvoiceMail');
Event::listen('checkout.invoice.save.after', 'Webkul\Admin\Listeners\Order@sendNewShipmentMail');
}
/**
@ -40,59 +200,11 @@ class EventServiceProvider extends ServiceProvider
});
Event::listen('admin.menu.build', function ($menu) {
$menu->add('dashboard', 'Dashboard', 'admin.dashboard.index', 1, 'dashboard-icon');
$menu->add('sales', 'Sales', 'admin.sales.orders.index', 1, 'sales-icon');
$menu->add('catalog', 'Catalog', 'admin.catalog.products.index', 3, 'catalog-icon');
$menu->add('catalog.products', 'Products', 'admin.catalog.products.index', 1);
$menu->add('catalog.categories', 'Categories', 'admin.catalog.categories.index', 2);
$menu->add('catalog.attributes', 'Attributes', 'admin.catalog.attributes.index', 3);
$menu->add('catalog.families', 'Families', 'admin.catalog.families.index', 4);
$menu->add('customers', 'Customers', 'admin.customer.index', 5, 'customer-icon');
$menu->add('customers.customers', 'Customers', 'admin.customer.index', 1, '');
$menu->add('customers.reviews', 'Review', 'admin.customer.review.index', 2, '');
// $menu->add('customers.blocked_customer', 'Blocked Customers', 'admin.account.edit', 2, '');
// $menu->add('customers.allowed_customer', 'Allowed Customers', 'admin.account.edit', 4, '');
$menu->add('configuration', 'Configure', 'admin.account.edit', 6, 'configuration-icon');
$menu->add('configuration.account', 'My Account', 'admin.account.edit', 1);
$menu->add('settings', 'Settings', 'admin.locales.index', 6, 'settings-icon');
$menu->add('settings.locales', 'Locales', 'admin.locales.index', 1, '');
$menu->add('settings.currencies', 'Currencies', 'admin.currencies.index', 2, '');
$menu->add('settings.exchange_rates', 'Exchange Rates', 'admin.exchange_rates.index', 3, '');
$menu->add('settings.inventory_sources', 'Inventory Sources', 'admin.inventory_sources.index', 4, '');
$menu->add('settings.channels', 'Channels', 'admin.channels.index', 5, '');
$menu->add('settings.users', 'Users', 'admin.users.index', 6, '');
$menu->add('settings.users.users', 'Users', 'admin.users.index', 1, '');
$menu->add('settings.users.roles', 'Roles', 'admin.roles.index', 2, '');
$menu->add('settings.sliders', 'Create Sliders', 'admin.sliders.index', 8, '');
$menu->add('settings.tax', 'Taxes', 'admin.tax-categories.index', 9, '');
$menu->add('settings.tax.tax-categories', 'Add Tax Category', 'admin.tax-categories.index', 1, '');
$menu->add('settings.tax.tax-rates', 'Add Tax Rates', 'admin.tax-rates.index', 2, '');
foreach($this->menuItems as $item){
if (bouncer()->hasPermission($item['key'])) {
$menu->add($item['key'], $item['name'], $item['route'], $item['sort'], $item['icon-class']);
}
}
});
}

View File

@ -6,8 +6,11 @@ return [
'country' => 'Country',
'state' => 'State'
],
'dashboard' => [
'title' => 'Dashboard'
],
'account' => [
'header-title' => 'My Account',
'title' => 'My Account',
'save-btn-title' => 'Save',
'general' => 'General',
'name' => 'Name',
@ -154,7 +157,7 @@ return [
],
'catalog' => [
'products' => [
'products' => 'Products',
'title' => 'Products',
'add-product-btn-title' => 'Add Product',
'add-title' => 'Add Product',
'edit-title' => 'Edit Product',
@ -185,6 +188,7 @@ return [
'add-image-btn-title' => 'Add Image'
],
'attributes' => [
'title' => 'Attributes',
'add-title' => 'Add Attribute',
'edit-title' => 'Edit Attribute',
'save-btn-title' => 'Save Attribute',
@ -225,7 +229,7 @@ return [
'is_visible_on_front' => 'Visible on Product View Page on Front-end'
],
'families' => [
'families' => 'Families',
'title' => 'Families',
'add-family-btn-title' => 'Add Family',
'add-title' => 'Add Family',
'edit-title' => 'Edit Family',
@ -243,7 +247,7 @@ return [
'group-exist-error' => 'Group with same name already exists.'
],
'categories' => [
'categories' => 'Categories',
'title' => 'Categories',
'add-title' => 'Add Category',
'edit-title' => 'Edit Category',
'save-btn-title' => 'Save Category',
@ -265,13 +269,10 @@ return [
],
'configuration' => [
'tax' => [
'title' => 'Taxes',
'add-title' => 'Add Tax Category'
],
'tax-categories' => [
'title' => 'Add Tax Category',
'title' => 'Tax Categories',
'add-title' => 'Add Tax Category',
'edit-title' => 'Edit Tax Category',
'save-btn-title' => 'Save Tax Category',
'general' => 'Tax Category',
'select-channel' => 'Select Channel',
@ -286,7 +287,9 @@ return [
],
'tax-rates' => [
'title' => 'Add Tax Rate',
'title' => 'Tax Rates',
'add-title' => 'Add Tax Rate',
'edit-title' => 'Edit Tax Rate',
'save-btn-title' => 'Save Tax Rate',
'general' => 'Tax Rate',
'identifier' => 'Identifier',
@ -342,7 +345,7 @@ return [
'general' => 'General',
'source_currency' => 'Source Currency',
'target_currency' => 'Target Currency',
'ratio' => 'Ratio'
'rate' => 'Rate'
],
'inventory_sources' => [
'title' => 'Inventory Sources',
@ -409,11 +412,46 @@ return [
'save-btn-title' => 'Save Customer'
],
'reviews' => [
'title' => 'Title',
'name' => 'Reviews',
'title' => 'Reviews',
'edit-title' => 'Edit Review',
'rating' => 'Rating',
'status' => 'Status',
'comment' => 'Comment'
]
],
'mail' => [
'order' => [
'subject' => 'New Order Confirmation',
'heading' => 'Order Confirmation!',
'dear' => 'Dear :customer_name',
'greeting' => 'Thanks for your Order :order_id placed on :created_at',
'summary' => 'Summary of Order',
'shipping-address' => 'Shipping Address',
'billing-address' => 'Billing Address',
'contact' => 'Contact',
'shipping' => 'Shipping',
'payment' => 'Payment',
'price' => 'Price',
'quantity' => 'Quantity',
'subtotal' => 'Subtotal',
'shipping-handling' => 'Shipping & Handling',
'tax' => 'Tax',
'grand-total' => 'Grand Total',
'final-summary' => 'Thanks for showing your intrest in our store. we will send you track number once it shiped.',
'help' => 'If you need any kind of help please contact us at :support_email',
'thanks' => 'Thanks!'
],
'invoice' => [
'heading' => 'Your Invoice #:invoice_id for Order #:order_id',
'subject' => 'Invoice for your order #:order_id',
'summary' => 'Summary of Invoice',
],
'shipment' => [
'heading' => 'Your Shipment #:shipment_id for Order #:order_id',
'subject' => 'Shipment for your order #:order_id',
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
'tracking-number' => 'Tracking Number'
]
]
];

View File

@ -1,12 +1,16 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.account.title') }}
@stop
@section('content')
<div class="content">
<form method="POST" action="" @submit.prevent="onSubmit">
<div class="page-header">
<div class="page-title">
<h1>
{{ __('admin::app.account.header-title') }}
{{ __('admin::app.account.title') }}
</h1>
</div>

View File

@ -1,10 +1,14 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.catalog.attributes.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">
<div class="page-title">
Attributes
<h1>{{ __('admin::app.catalog.attributes.title') }}</h1>
</div>
<div class="page-action">

View File

@ -1,10 +1,14 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.catalog.categories.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">
<div class="page-title">
Categories
<h1>{{ __('admin::app.catalog.categories.title') }}</h1>
</div>
<div class="page-action">

View File

@ -1,10 +1,14 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.catalog.families.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">
<div class="page-title">
{{ __('admin::app.catalog.families.families') }}
<h1>{{ __('admin::app.catalog.families.title') }}</h1>
</div>
<div class="page-action">

View File

@ -83,10 +83,14 @@
@if(view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
<div class="control-group" :class="[errors.has('{{ $attribute->code }}') ? 'has-error' : '']">
<div class="control-group {{ $attribute->type }}" :class="[errors.has('{{ $attribute->code }}') ? 'has-error' : '']">
<label for="{{ $attribute->code }}" {{ $attribute->is_required ? 'class=required' : '' }}>
{{ $attribute->admin_name }}
@if ($attribute->type == 'price')
<span class="currency-code">({{ core()->getBaseCurrencySymbol() }})</span>
@endif
<?php
$channel_locale = [];
if($attribute->value_per_channel) {

View File

@ -1,10 +1,14 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.catalog.products.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.catalog.products.products') }}</h1>
<h1>{{ __('admin::app.catalog.products.title') }}</h1>
</div>
<div class="page-action">

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.customers.customers.title') }}
@stop
@section('content')

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.customers.reviews.edit-title') }}
@stop
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.customer.review.update', $review->id) }}">
@ -7,7 +11,7 @@
<div class="page-header">
<div class="page-title">
<h1>
{{ __('admin::app.customers.reviews.name') }}
{{ __('admin::app.customers.reviews.edit-title') }}
</h1>
</div>

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.customers.reviews.title') }}
@stop
@section('content')
@ -9,7 +9,7 @@
<div class="content">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.customers.reviews.name') }}</h1>
<h1>{{ __('admin::app.customers.reviews.title') }}</h1>
</div>
<div class="page-action">
{{-- <a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.master')
@section('page_title')
{{ __('admin::app.dashboard.title') }}
@stop
@section('content-wrapper')
<div class="content full-page">
<h1>Dashboard</h1>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500" rel="stylesheet" type="text/css">
</head>
<body style="font-family: montserrat, sans-serif;">
<div style="max-width: 1000px; margin-left: auto; margin-right: auto;">
<div style="text-align: center;">
{{ $header ?? '' }}
</div>
<div>
{{ $slot }}
{{ $subcopy ?? '' }}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,175 @@
@component('admin::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
</a>
</div>
<?php $order = $invoice->order; ?>
<div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<span style="font-weight: bold;">
{{ __('admin::app.mail.invoice.heading', ['order_id' => $order->id, 'invoice_id' => $invoice->id]) }}
</span> <br>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!! __('admin::app.mail.order.greeting', [
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
'created_at' => $order->created_at
])
!!}
</p>
</div>
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
{{ __('admin::app.mail.invoice.summary') }}
</div>
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping-address') }}
</div>
<div>
{{ $order->shipping_address->name }}
</div>
<div>
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
</div>
<div>
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
</div>
<div style="font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping') }}
</div>
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ $order->shipping_title }}
</div>
</div>
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.billing-address') }}
</div>
<div>
{{ $order->billing_address->name }}
</div>
<div>
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
</div>
<div>
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
</div>
<div style="font-size: 16px; color: #242424;">
{{ __('admin::app.mail.order.payment') }}
</div>
<div style="font-weight: bold;font-size: 16px; color: #242424;">
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
</div>
</div>
</div>
@foreach ($invoice->items as $item)
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
{{ $item->name }}
</p>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.price') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ core()->formatPrice($item->price, $invoice->order_currency_code) }}
</span>
</div>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.quantity') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ $item->qty }}
</span>
</div>
<div style="">
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
Color : Gray, Size : S
</label>
</div>
</div>
@endforeach
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
<div>
<span>{{ __('admin::app.mail.order.subtotal') }}</span>
<span style="float: right;">
{{ core()->formatPrice($invoice->sub_total, $invoice->order_currency_code) }}
</span>
</div>
<div>
<span>{{ __('admin::app.mail.order.shipping-handling') }}</span>
<span style="float: right;">
{{ core()->formatPrice($invoice->shipping_amount, $invoice->order_currency_code) }}
</span>
</div>
<div>
<span>{{ __('admin::app.mail.order.tax') }}</span>
<span style="float: right;">
{{ core()->formatPrice($invoice->tax_amount, $invoice->order_currency_code) }}
</span>
</div>
<div style="font-weight: bold">
<span>{{ __('admin::app.mail.order.grand-total') }}</span>
<span style="float: right;">
{{ core()->formatPrice($invoice->grand_total, $invoice->order_currency_code) }}
</span>
</div>
</div>
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!!
__('admin::app.mail.order.help', [
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
])
!!}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.thanks') }}
</p>
</div>
</div>
@endcomponent

View File

@ -0,0 +1,177 @@
@component('admin::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
</a>
</div>
<div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<span style="font-weight: bold;">
{{ __('admin::app.mail.order.heading') }}
</span> <br>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!! __('admin::app.mail.order.greeting', [
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
'created_at' => $order->created_at
])
!!}
</p>
</div>
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
{{ __('admin::app.mail.order.summary') }}
</div>
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping-address') }}
</div>
<div>
{{ $order->shipping_address->name }}
</div>
<div>
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
</div>
<div>
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
</div>
<div style="font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping') }}
</div>
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ $order->shipping_title }}
</div>
</div>
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.billing-address') }}
</div>
<div>
{{ $order->billing_address->name }}
</div>
<div>
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
</div>
<div>
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
</div>
<div style="font-size: 16px; color: #242424;">
{{ __('admin::app.mail.order.payment') }}
</div>
<div style="font-weight: bold;font-size: 16px; color: #242424;">
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
</div>
</div>
</div>
@foreach ($order->items as $item)
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
{{ $item->name }}
</p>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.price') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
</span>
</div>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.quantity') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ $item->qty_ordered }}
</span>
</div>
<div style="">
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
Color : Gray, Size : S
</label>
</div>
</div>
@endforeach
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
<div>
<span>{{ __('admin::app.mail.order.subtotal') }}</span>
<span style="float: right;">
{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
</span>
</div>
<div>
<span>{{ __('admin::app.mail.order.shipping-handling') }}</span>
<span style="float: right;">
{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
</span>
</div>
<div>
<span>{{ __('admin::app.mail.order.tax') }}</span>
<span style="float: right;">
{{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}
</span>
</div>
<div style="font-weight: bold">
<span>{{ __('admin::app.mail.order.grand-total') }}</span>
<span style="float: right;">
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
</span>
</div>
</div>
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.final-summary') }}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!!
__('admin::app.mail.order.help', [
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
])
!!}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.thanks') }}
</p>
</div>
</div>
@endcomponent

View File

@ -0,0 +1,155 @@
@component('admin::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
</a>
</div>
<?php $order = $shipment->order; ?>
<div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<span style="font-weight: bold;">
{{ __('admin::app.mail.shipment.heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
</span> <br>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!! __('admin::app.mail.order.greeting', [
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
'created_at' => $order->created_at
])
!!}
</p>
</div>
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
{{ __('admin::app.mail.shipment.summary') }}
</div>
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping-address') }}
</div>
<div>
{{ $order->shipping_address->name }}
</div>
<div>
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
</div>
<div>
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
</div>
<div style="font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.shipping') }}
</div>
<div style="font-size: 16px;color: #242424;">
<div style="font-weight: bold;">
{{ $order->shipping_title }}
</div>
<div style="margin-top: 5px;">
<span style="font-weight: bold;">{{ __('admin::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
</div>
<div style="margin-top: 5px;">
<span style="font-weight: bold;">{{ __('admin::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
</div>
</div>
</div>
<div style="line-height: 25px;">
<div style="font-weight: bold;font-size: 16px;color: #242424;">
{{ __('admin::app.mail.order.billing-address') }}
</div>
<div>
{{ $order->billing_address->name }}
</div>
<div>
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
</div>
<div>
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
</div>
<div>---</div>
<div style="margin-bottom: 40px;">
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
</div>
<div style="font-size: 16px; color: #242424;">
{{ __('admin::app.mail.order.payment') }}
</div>
<div style="font-weight: bold;font-size: 16px; color: #242424;">
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
</div>
</div>
</div>
@foreach ($shipment->items as $item)
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
{{ $item->name }}
</p>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.price') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
</span>
</div>
<div style="margin-bottom: 10px;">
<label style="font-size: 16px;color: #5E5E5E;">
{{ __('admin::app.mail.order.quantity') }}
</label>
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
{{ $item->qty }}
</span>
</div>
<div style="">
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
Color : Gray, Size : S
</label>
</div>
</div>
@endforeach
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{!!
__('admin::app.mail.order.help', [
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
])
!!}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.order.thanks') }}
</p>
</div>
</div>
@endcomponent

View File

@ -5,6 +5,7 @@
@stop
@section('content-wrapper')
<?php $order = $invoice->order; ?>
<div class="content full-page">

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.channels.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.currencies.add-title') }}
@stop
@section('content')
<div class="content">

View File

@ -1,50 +0,0 @@
@extends('admin::layouts.content')
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.currencies.update', $currency->id) }}" @submit.prevent="onSubmit">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.settings.currencies.edit-title') }}</h1>
</div>
<div class="page-action">
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.currencies.save-btn-title') }}
</button>
</div>
</div>
<div class="page-content">
<div class="form-container">
@csrf()
<input name="_method" type="hidden" value="PUT">
<accordian :title="'{{ __('admin::app.settings.currencies.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
<label for="code" class="required">{{ __('admin::app.settings.currencies.code') }}</label>
<input v-validate="'required'" class="control" id="code" name="code" value="{{ old('code') ?: $currency->code }}" v-code/>
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
</div>
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
<label for="name" class="required">{{ __('admin::app.settings.currencies.name') }}</label>
<input v-validate="'required'" class="control" id="name" name="name" value="{{ old('name') ?: $currency->name }}"/>
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
</div>
<div class="control-group" :class="[errors.has('symbol') ? 'has-error' : '']">
<label for="symbol" class="required">{{ __('admin::app.settings.currencies.symbol') }}</label>
<input v-validate="'required'" class="control" id="symbol" name="symbol" value="{{ old('symbol') ?: $currency->symbol }}"/>
<span class="control-error" v-if="errors.has('symbol')">@{{ errors.first('symbol') }}</span>
</div>
</div>
</accordian>
</div>
</div>
</form>
</div>
@stop

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.currencies.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">

View File

@ -24,36 +24,49 @@
<div class="form-container">
@csrf()
<accordian :title="'{{ __('admin::app.settings.exchange_rates.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('source_currency') ? 'has-error' : '']">
<label for="source_currency" class="required">{{ __('admin::app.settings.exchange_rates.source_currency') }}</label>
<select v-validate="'required'" class="control" name="source_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('source_currency')">@{{ errors.first('source_currency') }}</span>
</div>
<div class="table">
<table>
<thead>
<tr>
<th>
{{ __('admin::app.settings.exchange_rates.source_currency') }}
</th>
<th>
{{ __('admin::app.settings.exchange_rates.target_currency') }}
</th>
<th>
{{ __('admin::app.settings.exchange_rates.rate') }}
</th>
</tr>
</thead>
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
<label for="target_currency" class="required">{{ __('admin::app.settings.exchange_rates.target_currency') }}</label>
<select v-validate="'required'" class="control" name="target_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
</div>
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
<label for="ratio" class="required">{{ __('admin::app.settings.exchange_rates.ratio') }}</label>
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') }}"/>
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
</div>
</div>
</accordian>
<tbody>
<tr>
<td>
{{ core()->getBaseCurrencyCode() }}
</td>
<td>
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
<select v-validate="'required'" class="control" name="target_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
</div>
</td>
<td>
<div class="control-group" :class="[errors.has('rate') ? 'has-error' : '']">
<input v-validate="'required'" class="control" id="rate" name="rate" value="{{ old('rate') }}"/>
<span class="control-error" v-if="errors.has('rate')">@{{ errors.first('rate') }}</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</form>

View File

@ -25,39 +25,51 @@
@csrf()
<input name="_method" type="hidden" value="PUT">
<accordian :title="'{{ __('admin::app.settings.exchange_rates.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('source_currency') ? 'has-error' : '']">
<label for="source_currency" class="required">{{ __('admin::app.settings.exchange_rates.source_currency') }}</label>
<select v-validate="'required'" class="control" name="source_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}" {{ $exchangeRate->source_currency == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('source_currency')">@{{ errors.first('source_currency') }}</span>
</div>
<div class="table">
<table>
<thead>
<tr>
<th>
{{ __('admin::app.settings.exchange_rates.source_currency') }}
</th>
<th>
{{ __('admin::app.settings.exchange_rates.target_currency') }}
</th>
<th>
{{ __('admin::app.settings.exchange_rates.rate') }}
</th>
</tr>
</thead>
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
<label for="target_currency" class="required">{{ __('admin::app.settings.exchange_rates.target_currency') }}</label>
<select v-validate="'required'" class="control" name="target_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}" {{ $exchangeRate->target_currency == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
</div>
<tbody>
<tr>
<td>
{{ core()->getBaseCurrencyCode() }}
</td>
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
<label for="ratio" class="required">{{ __('admin::app.settings.exchange_rates.ratio') }}</label>
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') ?: $exchangeRate->ratio }}"/>
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
</div>
</div>
</accordian>
<td>
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
<select v-validate="'required'" class="control" name="target_currency">
@foreach($currencies as $currency)
<option value="{{ $currency->id }}" {{ $exchangeRate->target_currency == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
</div>
</td>
<td>
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') ?: $exchangeRate->ratio }}"/>
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
</div>
</td>
<tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.locales.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.configuration.tax-categories.title') }}
{{ __('admin::app.configuration.tax-categories.add-title') }}
@stop
@section('content')
@ -9,7 +9,7 @@
<form method="POST" action="{{ route('admin.tax-categories.create') }}" @submit.prevent="onSubmit">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.configuration.tax-categories.title') }}</h1>
<h1>{{ __('admin::app.configuration.tax-categories.add-title') }}</h1>
</div>
<div class="page-action">

View File

@ -6,7 +6,7 @@
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.tax-categories.update', $data[0][0]['id']) }}" @submit.prevent="onSubmit">
<form method="POST" action="{{ route('admin.tax-categories.update', $taxCategory->id) }}" @submit.prevent="onSubmit">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.configuration.tax-categories.edit.title') }}</h1>
@ -32,7 +32,7 @@
<select class="control" name="channel">
@foreach(core()->getAllChannels() as $channelModel)
<option @if($data[0][0]['channel_id'] == $channelModel->id) selected @endif value="{{ $channelModel->id }}">
<option @if($taxCategory->channel_id == $channelModel->id) selected @endif value="{{ $channelModel->id }}">
{{ $channelModel->name }}
</option>
@ -45,7 +45,7 @@
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
<label for="code" class="required">{{ __('admin::app.configuration.tax-categories.code') }}</label>
<input v-validate="'required'" class="control" id="code" name="code" value="{{ $data[0][0]['code'] }}"/>
<input v-validate="'required'" class="control" id="code" name="code" value="{{ $taxCategory->code }}"/>
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
</div>
@ -53,7 +53,7 @@
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
<label for="name" class="required">{{ __('admin::app.configuration.tax-categories.name') }}</label>
<input v-validate="'required'" class="control" id="name" name="name" value="{{ $data[0][0]['name'] }}"/>
<input v-validate="'required'" class="control" id="name" name="name" value="{{ $taxCategory->name }}"/>
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
</div>
@ -61,7 +61,7 @@
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
<label for="description" class="required">{{ __('admin::app.configuration.tax-categories.description') }}</label>
<textarea v-validate="'required'" class="control" id="description" name="description">{{ $data[0][0]['description'] }}</textarea>
<textarea v-validate="'required'" class="control" id="description" name="description">{{ $taxCategory->description }}</textarea>
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
</div>
@ -74,12 +74,7 @@
<select multiple="multiple" class="control" id="taxrates" name="taxrates[]" v-validate="'required'">
@foreach($taxRates->all() as $taxRate)
<option value="{{ $taxRate->id }}"
@foreach($data[1] as $selectedRate)
@if($taxRate->id == $selectedRate['id'])
selected
@endif
@endforeach>
<option value="{{ $taxRate->id }}" {{ is_numeric($taxCategory->pluck('id')->search($taxRate->id)) ? 'selected' : '' }}>
{{ $taxRate->identifier }}
</option>

View File

@ -1,21 +1,25 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.configuration.tax-categories.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.configuration.tax.title') }}</h1>
<h1>{{ __('admin::app.configuration.tax-categories.title') }}</h1>
</div>
<div class="page-action">
<a href="{{ route('admin.tax-categories.show') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.configuration.tax.add-title') }}
{{ __('admin::app.configuration.tax-categories.add-title') }}
</a>
</div>
</div>
<div class="page-content">
@inject('taxCategories','Webkul\Admin\DataGrids\TaxRuleDataGrid')
@inject('taxCategories','Webkul\Admin\DataGrids\TaxCategoryDataGrid')
{!! $taxCategories->render() !!}
</div>
</div>

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.configuration.tax-rates.title') }}
{{ __('admin::app.configuration.tax-rates.add-title') }}
@stop
@section('content')
@ -9,7 +9,7 @@
<form method="POST" action="{{ route('admin.tax-rates.create') }}" @submit.prevent="onSubmit">
<div class="page-header">
<div class="page-title">
<h1>{{ __('admin::app.configuration.tax-rates.title') }}</h1>
<h1>{{ __('admin::app.configuration.tax-rates.add-title') }}</h1>
</div>
<div class="page-action">

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.configuration.tax-rates.title') }}
{{ __('admin::app.configuration.tax-rates.edit-title') }}
@stop
@section('content')

View File

@ -13,7 +13,7 @@
<div class="page-action">
<a href="{{ route('admin.tax-rates.show') }}" class="btn btn-lg btn-primary">
{{ __('admin::app.configuration.tax-rates.title') }}
{{ __('admin::app.configuration.tax-rates.add-title') }}
</a>
</div>
</div>

View File

@ -1,5 +1,9 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.users.roles.title') }}
@stop
@section('content')
<div class="content">
<div class="page-header">

View File

@ -164,7 +164,7 @@ class AttributeTableSeeder extends Seeder
'position' => 11,
'is_required' => 1,
'value_per_locale' => 0,
'value_per_channel' => 1,
'value_per_channel' => 0,
'is_filterable' => 1,
'is_configurable' => 0,
'is_user_defined' => 0
@ -192,7 +192,7 @@ class AttributeTableSeeder extends Seeder
'position' => 13,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
'value_per_channel' => 0,
'is_filterable' => 0,
'is_configurable' => 0,
'is_user_defined' => 0

View File

@ -127,6 +127,16 @@ class AttributeController extends Controller
*/
public function destroy($id)
{
//
$attribute = $this->attribute->findOrFail($id);
if(!$attribute->is_user_defined) {
session()->flash('error', 'Can not delete system attribute.');
} else {
$this->attribute->delete($id);
session()->flash('success', 'Attribute deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -135,6 +135,14 @@ class AttributeFamilyController extends Controller
*/
public function destroy($id)
{
//
if($this->attributeFamily->count() == 1) {
session()->flash('error', 'At least one family is required.');
} else {
$this->attributeFamily->delete($id);
session()->flash('success', 'Family deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -4,7 +4,6 @@ namespace Webkul\Attribute\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Routing\Router;
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
class AttributeServiceProvider extends ServiceProvider
{
@ -15,8 +14,6 @@ class AttributeServiceProvider extends ServiceProvider
*/
public function boot(Router $router)
{
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
}

View File

@ -133,6 +133,6 @@ class CategoryController extends Controller
*/
public function destroy($id)
{
//
$this->category->delete($id);
}
}

View File

@ -5,7 +5,6 @@ namespace Webkul\Category\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Routing\Router;
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
class CategoryServiceProvider extends ServiceProvider
{
@ -16,8 +15,6 @@ class CategoryServiceProvider extends ServiceProvider
*/
public function boot(Router $router)
{
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
}

View File

@ -300,8 +300,8 @@ class Cart {
//set the currency column with the respective currency
$cartData['global_currency_code'] = core()->getBaseCurrencyCode();
$cartData['base_currency_code'] = core()->getBaseCurrencyCode();
$cartData['channel_currency_code'] = core()->getBaseCurrencyCode();
$cartData['cart_currency_code'] = core()->getBaseCurrencyCode();
$cartData['channel_currency_code'] = core()->getChannelBaseCurrencyCode();
$cartData['cart_currency_code'] = core()->getCurrentCurrencyCode();
//set the cart items and quantity
$cartData['items_count'] = 1;
$cartData['items_qty'] = $data['quantity'];

View File

@ -9,7 +9,7 @@ use Webkul\Checkout\Repositories\CartRepository;
use Webkul\Checkout\Repositories\CartItemRepository;
//Product Image Helper Class
use Webkul\Product\Product\ProductImage;
use Webkul\Product\Helpers\ProductImage;
use Cart;

View File

@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Validator;
use Illuminate\Routing\Router;
use Illuminate\Foundation\AliasLoader;
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
use Webkul\Checkout\Facades\Cart;
use Webkul\Checkout\Providers\ComposerServiceProvider;
@ -19,10 +18,6 @@ class CheckoutServiceProvider extends ServiceProvider
include __DIR__ . '/../Http/helpers.php';
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
}
/**

View File

@ -3,63 +3,80 @@
namespace Webkul\Core;
use Carbon\Carbon;
use Webkul\Core\Models\Channel as ChannelModel;
use Webkul\Core\Models\Locale as LocaleModel;
use Webkul\Core\Models\Currency as CurrencyModel;
use Webkul\Core\Models\TaxCategory as TaxCategory;
use Webkul\Core\Models\TaxRate as TaxRate;
use Webkul\Core\Repositories\CurrencyRepository;
use Webkul\Core\Repositories\ExchangeRateRepository;
use Webkul\Core\Repositories\CountryRepository;
use Webkul\Core\Repositories\CountryStateRepository;
use Webkul\Core\Repositories\ChannelRepository;
use Webkul\Core\Repositories\LocaleRepository;
use Illuminate\Support\Facades\Config;
class Core
{
/**
* CurrencyRepository model
* ChannelRepository class
*
* @var mixed
*/
protected $channelRepository;
/**
* CurrencyRepository class
*
* @var mixed
*/
protected $currencyRepository;
/**
* ExchangeRateRepository model
* ExchangeRateRepository class
*
* @var mixed
*/
protected $exchangeRateRepository;
/**
* CountryRepository model
* CountryRepository class
*
* @var mixed
*/
protected $countryRepository;
/**
* CountryStateRepository model
* CountryStateRepository class
*
* @var mixed
*/
protected $countryStateRepository;
/**
* LocaleRepository class
*
* @var mixed
*/
protected $localeRepository;
/**
* Create a new instance.
*
* @param Webkul\Core\Repositories\ChannelRepository $channelRepository
* @param Webkul\Core\Repositories\CurrencyRepository $currencyRepository
* @param Webkul\Core\Repositories\ExchangeRateRepository $exchangeRateRepository
* @param Webkul\Core\Repositories\CountryRepository $countryRepository
* @param Webkul\Core\Repositories\CountryStateRepository $countryStateRepository
* @param Webkul\Core\Repositories\LocaleRepository $localeRepository
* @return void
*/
public function __construct(
ChannelRepository $channelRepository,
CurrencyRepository $currencyRepository,
ExchangeRateRepository $exchangeRateRepository,
CountryRepository $countryRepository,
CountryStateRepository $countryStateRepository
CountryStateRepository $countryStateRepository,
LocaleRepository $localeRepository
)
{
$this->channelRepository = $channelRepository;
$this->currencyRepository = $currencyRepository;
$this->exchangeRateRepository = $exchangeRateRepository;
@ -67,6 +84,8 @@ class Core
$this->countryRepository = $countryRepository;
$this->countryStateRepository = $countryStateRepository;
$this->localeRepository = $localeRepository;
}
/**
@ -80,7 +99,7 @@ class Core
if($channels)
return $channels;
return $channels = ChannelModel::all();
return $channels = $this->channelRepository->all();
}
/**
@ -94,7 +113,7 @@ class Core
if($channel)
return $channel;
return $channel = ChannelModel::first();
return $channel = $this->channelRepository->first();
}
/**
@ -122,7 +141,7 @@ class Core
if($channel)
return $channel;
return $channel = ChannelModel::first();
return $channel = $this->channelRepository->first();
}
/**
@ -150,7 +169,7 @@ class Core
if($locales)
return $locales;
return $locales = LocaleModel::all();
return $locales = $this->localeRepository->all();
}
/**
@ -165,7 +184,7 @@ class Core
if($currencies)
return $currencies;
return $currencies = CurrencyModel::all();
return $currencies = $this->currencyRepository->all();
}
/**
@ -180,9 +199,12 @@ class Core
if($currency)
return $currency;
$currenctChannel = $this->getCurrentChannel();
$baseCurrency = $this->currencyRepository->findOneByField('code', config('app.currency'));
return $currency = $currenctChannel->base_currency;
if(!$baseCurrency)
$baseCurrency = $this->currencyRepository->first();
return $currency = $baseCurrency;
}
/**
@ -212,7 +234,54 @@ class Core
if($currencySymbol)
return $currencySymbol;
return $currencySymbol = $this->getCurrentCurrency()->symbol;
return $currencySymbol = $this->getBaseCurrency()->symbol ?? $this->getBaseCurrencyCode();
}
/**
* Returns base channel's currency model
*
* @return mixed
*/
public function getChannelBaseCurrency()
{
static $currency;
if($currency)
return $currency;
$currenctChannel = $this->getCurrentChannel();
return $currency = $currenctChannel->base_currency;
}
/**
* Returns base channel's currency code
*
* @return string
*/
public function getChannelBaseCurrencyCode()
{
static $currencyCode;
if($currencyCode)
return $currencyCode;
return ($currency = $this->getChannelBaseCurrency()) ? $currencyCode = $currency->code : '';
}
/**
* Returns base channel's currency symbol
*
* @return string
*/
public function getChannelBaseCurrencySymbol()
{
static $currencySymbol;
if($currencySymbol)
return $currencySymbol;
return $currencySymbol = $this->getChannelBaseCurrency()->symbol;
}
/**
@ -227,7 +296,7 @@ class Core
if($currency)
return $currency;
return $currency = CurrencyModel::first();
return $currency = $this->currencyRepository->first();
}
/**
@ -261,39 +330,29 @@ class Core
}
/**
* Convert price with currency symbol
* Converts price
*
* @param float $price
* @return string
* @param float $price
* @param string $targetCurrencyCode
* @return string
*/
public function convertPrice($amount, $sourceCurrencyCode = null, $targetCurrencyCode = null)
public function convertPrice($amount, $targetCurrencyCode = null)
{
$sourceCurrency = !$sourceCurrencyCode
? $this->getBaseCurrency()
: $this->currencyRepository->findByField('code', $sourceCurrencyCode);
$targetCurrency = !$targetCurrencyCode
? $this->getCurrentCurrency()
: $this->currencyRepository->findByField('code', $targetCurrencyCode);
if(!$sourceCurrency || !$sourceCurrency)
return $amount;
if ($sourceCurrency->code === $targetCurrency->code)
if(!$targetCurrency)
return $amount;
$exchangeRate = $this->exchangeRateRepository->findOneWhere([
'source_currency' => $sourceCurrency->id,
'target_currency' => $targetCurrency->id,
]);
if (null === $exchangeRate)
return $amount;
if ($exchangeRate->source_currency->code === $sourceCurrencyCode)
return (float) round($amount * $exchangeRate->ratio);
return (float) round($amount / $exchangeRate->ratio);
return (float) round($amount * $exchangeRate->rate);
}
/**
@ -406,27 +465,6 @@ class Core
return preg_replace('#[ 0:-]#', '', $date) === '';
}
// $timezonelist = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL);
/**
* Find all the tax rates associated with a tax category.
*
* @return Array
*/
public function withRates($id) {
return TaxCategory::findOrFail($id)->tax_rates;
}
/**
* To fetch all tax rates.
*
* @return Collection
*/
public function getAllTaxRates() {
return TaxRate::all();
}
/**
* Format date using current channel.
*

View File

@ -15,10 +15,9 @@ class CreateCurrencyExchangeRatesTable extends Migration
{
Schema::create('currency_exchange_rates', function (Blueprint $table) {
$table->increments('id');
$table->integer('source_currency')->unsigned();
$table->decimal('rate', 10, 5);
$table->integer('target_currency')->unsigned();
$table->decimal('ratio', 10, 5);
$table->foreign('source_currency')->references('id')->on('currencies')->onDelete('cascade');
$table->foreign('target_currency')->references('id')->on('currencies')->onDelete('cascade');
$table->timestamps();
});

View File

@ -82,6 +82,14 @@ abstract class Repository extends BaseRepository {
return $this->parserResult($model);
}
/**
* @return mixed
*/
public function count()
{
return $this->model->count();
}
/**
* @return mixed
*/

View File

@ -133,6 +133,14 @@ class ChannelController extends Controller
*/
public function destroy($id)
{
//
if($this->channel->count() == 1) {
session()->flash('error', 'At least one channel is required.');
} else {
$this->channel->delete($id);
session()->flash('success', 'Channel deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -92,6 +92,14 @@ class CurrencyController extends Controller
*/
public function destroy($id)
{
//
if($this->currency->count() == 1) {
session()->flash('error', 'At least one currency is required.');
} else {
$this->currency->delete($id);
session()->flash('success', 'Currency deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -84,15 +84,9 @@ class ExchangeRateController extends Controller
*/
public function store(Request $request)
{
$sourceCurrency = request()->get('source_currency');
$this->validate(request(), [
'source_currency' => 'required',
'target_currency' => ['required', function ($attribute, $value, $fail) use ($sourceCurrency) {
if ($value == $sourceCurrency) {
$fail('The :attribute value should be different from source currency.');
}
}],
'ratio' => 'required|numeric'
'target_currency' => 'required',
'rate' => 'required|numeric'
]);
$this->exchangeRate->create(request()->all());
@ -127,7 +121,6 @@ class ExchangeRateController extends Controller
public function update(Request $request, $id)
{
$this->validate(request(), [
'source_currency' => 'required',
'target_currency' => 'required',
'ratio' => 'required|numeric'
]);
@ -147,6 +140,6 @@ class ExchangeRateController extends Controller
*/
public function destroy($id)
{
//
$this->exchangeRate->delete($id);
}
}

View File

@ -91,6 +91,14 @@ class LocaleController extends Controller
*/
public function destroy($id)
{
//
if($this->locale->count() == 1) {
session()->flash('error', 'At least one locale is required.');
} else {
$this->locale->delete($id);
session()->flash('success', 'Locale deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -12,6 +12,6 @@ class CurrencyExchangeRate extends Model
* @var array
*/
protected $fillable = [
'source_currency', 'target_currency', 'ratio'
'target_currency', 'rate'
];
}

View File

@ -18,19 +18,15 @@ class CoreServiceProvider extends ServiceProvider
public function boot(Router $router)
{
include __DIR__ . '/../Http/helpers.php';
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
$router->aliasMiddleware('locale', Locale::class);
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
// $this->publishes([
// __DIR__ . '/../../publishable/lang' => public_path('vendor/webkul/core/lang'),
// ], 'public');
Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes');
Validator::extend('code', 'Webkul\Core\Contracts\Validations\Code@passes');
}

View File

@ -1,61 +0,0 @@
<?php
namespace Webkul\Customer\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Customer\Repositories\CustomerRepository;
use Webkul\Sales\Repositories\OrderRepository;
use Auth;
/**
* Customer controlller for the customer
* basically for the tasks of customers
* which will be done after customer
* authenticastion.
*
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class OrdersController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
protected $_config;
protected $customer;
protected $order;
public function __construct(CustomerRepository $customer ,OrderRepository $order)
{
$this->middleware('customer');
$this->_config = request('_config');
$this->customer = $customer;
$this->order = $order;
}
public function index() {
$id = auth()->guard('customer')->user()->id;
$customer = $this->getCustomer($id);
return view($this->_config['view'])->with('customer', $customer);
}
public function orders() {
$id = auth()->guard('customer')->user()->id;
$orders = $this->order->customerOrder($id);
return view($this->_config['view'],compact('orders'));
}
}

View File

@ -1,51 +0,0 @@
<?php
namespace Webkul\Customer;
use Illuminate\Support\Facades\HTML;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\URL;
class Menu
{
public $items = array();
public $current;
public $currentKey;
public function __construct() {
$this->current = Request::url();
}
public static function create($callback)
{
$menu = new Menu();
$callback($menu);
return $menu;
}
public function add($route, $name)
{
$url = route($route);
$item = [
'name' => $name,
'url' => $url,
];
array_push($this->items, $item);
}
/**
* Method to find the active links
*
* @param array $item Item that
* needs to be checked if active
* @return string
*/
public function getActive($item)
{
$url = trim($item['url'], '/');
if ((strpos($this->current, $url) !== false) || (strpos($this->currentKey, $item['key']) === 0)) {
return 'active';
}
}
}

View File

@ -3,11 +3,8 @@
namespace Webkul\Customer\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Event;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Blade;
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
use Webkul\Customer\Providers\EventServiceProvider;
class CustomerServiceProvider extends ServiceProvider
{
@ -20,28 +17,5 @@ class CustomerServiceProvider extends ServiceProvider
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer');
$this->composeView();
$this->app->register(EventServiceProvider::class);
}
/**
* Register services.
*
* @return void
*/
public function register()
{
// $this->app->bind('datagrid', 'Webkul\Ui\DataGrid\DataGrid');
}
protected function composeView()
{
view()->composer(['shop::customers.account.partials.sidemenu'], function ($view) {
$menu = current(Event::fire('customer.menu.create'));
$view->with('menu', $menu);
});
}
}

View File

@ -1,52 +0,0 @@
<?php
namespace Webkul\Customer\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Webkul\Customer\Menu;
class EventServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
$this->createCustomerAccountSideMenu();
}
/**
* This method fires an event for menu creation, any package can add their menu item by listening to the customer.menu.build event
*
* @return void
*/
public function createCustomerAccountSideMenu()
{
Event::listen('customer.menu.create', function () {
return Menu::create(function ($menu) {
Event::fire('customer.menu.build', $menu);
});
});
Event::listen('customer.menu.build', function ($menu) {
$menu->add('customer.profile.index', 'Profile');
$menu->add('customer.orders.index', 'Orders');
$menu->add('customer.address.index', 'Address');
$menu->add('customer.reviews.index', 'Reviews');
$menu->add('customer.wishlist.index', 'Wishlist');
});
}
}

View File

@ -120,6 +120,14 @@ class InventorySourceController extends Controller
*/
public function destroy($id)
{
//
if($this->inventorySource->count() == 1) {
session()->flash('error', 'At least one inventory source is required.');
} else {
$this->inventorySource->delete($id);
session()->flash('success', 'Inventory source deleted successfully.');
}
return redirect()->back();
}
}

View File

@ -5,7 +5,6 @@ namespace Webkul\Inventory\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Routing\Router;
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
class InventoryServiceProvider extends ServiceProvider
{
@ -16,8 +15,6 @@ class InventoryServiceProvider extends ServiceProvider
*/
public function boot(Router $router)
{
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
}

View File

@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
use Webkul\Product\Helpers\AbstractProduct;
/**
* Class MyCriteria.

View File

@ -5,7 +5,7 @@ namespace Webkul\Product\Contracts\Criteria;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
use Webkul\Product\Helpers\AbstractProduct;
/**
* Class MyCriteria.

View File

@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
use Webkul\Product\Helpers\AbstractProduct;
/**
* Class MyCriteria.

View File

@ -5,7 +5,7 @@ namespace Webkul\Product\Contracts\Criteria;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
use Webkul\Product\Helpers\AbstractProduct;
/**
* Class MyCriteria.

View File

@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
use Webkul\Product\Helpers\AbstractProduct;
/**
* Class MyCriteria.

View File

@ -20,7 +20,7 @@ class CreateProductsTable extends Migration
$table->timestamps();
$table->integer('parent_id')->unsigned()->nullable();
$table->integer('attribute_family_id')->unsigned()->nullable();
$table->foreign('attribute_family_id')->references('id')->on('attribute_families')->onDelete('cascade');
$table->foreign('attribute_family_id')->references('id')->on('attribute_families')->onDelete('restrict');
});
Schema::table('products', function (Blueprint $table) {
@ -45,7 +45,7 @@ class CreateProductsTable extends Migration
$table->integer('product_id')->unsigned();
$table->integer('attribute_id')->unsigned();
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
$table->foreign('attribute_id')->references('id')->on('attributes')->onDelete('cascade');
$table->foreign('attribute_id')->references('id')->on('attributes')->onDelete('restrict');
});
Schema::create('product_up_sells', function (Blueprint $table) {

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
use Webkul\Product\Models\ProductAttributeValue;

View File

@ -1,10 +1,10 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
use Webkul\Product\Product\ProductImage;
use Webkul\Product\Product\Price;
use Webkul\Product\Helpers\ProductImage;
use Webkul\Product\Helpers\Price;
use Webkul\Product\Models\Product;
use Webkul\Product\Models\ProductAttributeValue;
@ -35,8 +35,8 @@ class ConfigurableOption extends AbstractProduct
* Create a new controller instance.
*
* @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOption
* @param Webkul\Product\Product\ProductImage $productImage
* @param Webkul\Product\Product\Price $price
* @param Webkul\Product\Helpers\ProductImage $productImage
* @param Webkul\Product\Helpers\Price $price
* @return void
*/
public function __construct(

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
use Webkul\Attribute\Repositories\AttributeRepository as Attribute;
use Webkul\Product\Models\ProductAttributeValue;

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
use Illuminate\Support\Facades\Storage;

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
class Review extends AbstractProduct
{

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
class Toolbar extends AbstractProduct
{

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Product\Product;
namespace Webkul\Product\Helpers;
class View extends AbstractProduct
{
@ -17,7 +17,7 @@ class View extends AbstractProduct
$attributes = $product->attribute_family->custom_attributes;
foreach($attributes as $attribute) {
if($attribute->is_visible_on_front) {
if($attribute->is_visible_on_front && $product->{$attribute->code}) {
$data[] = [
'code' => $attribute->code,
'label' => $attribute->name,

View File

@ -176,6 +176,6 @@ class ProductController extends Controller
*/
public function destroy($id)
{
//
$this->product->delete($id);
}
}

View File

@ -45,7 +45,7 @@ class Order extends Model implements OrderContract
*/
public function getTotalDueAttribute()
{
return $this->grand_total - $this->base_total_invoiced;
return $this->grand_total - $this->grand_total_invoiced;
}
/**

View File

@ -286,13 +286,4 @@ class OrderRepository extends Repository
return $order;
}
/**
* @param int $customerId
* @return void
*/
public function customerOrder($customerId)
{
return $this->model->where('customer_id',$customerId)->get();
}
}

View File

@ -8,8 +8,8 @@ use Webkul\Checkout\Repositories\CartRepository;
use Webkul\Checkout\Repositories\CartItemRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Customer\Repositories\CustomerRepository;
use Webkul\Product\Product\ProductImage;
use Webkul\Product\Product\View as ProductView;
use Webkul\Product\Helpers\ProductImage;
use Webkul\Product\Helpers\View as ProductView;
use Cart;
/**

View File

@ -13,7 +13,6 @@ use Webkul\Core\Repositories\SliderRepository as Sliders;
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class HomeController extends controller
{
protected $_config;

View File

@ -0,0 +1,73 @@
<?php
namespace Webkul\Shop\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Sales\Repositories\OrderRepository;
use Auth;
/**
* Customer controlller for the customer basically for the tasks of customers
* which will be done after customer authenticastion.
*
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class OrderController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* OrderrRepository object
*
* @var array
*/
protected $order;
/**
* Create a new controller instance.
*
* @param Webkul\Order\Repositories\OrderRepository $order
* @return void
*/
public function __construct(OrderRepository $order)
{
$this->middleware('customer');
$this->_config = request('_config');
$this->order = $order;
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() {
$orders = $this->order->findWhere([
'customer_id' => auth()->guard('customer')->user()->id
]);
return view($this->_config['view'], compact('orders'));
}
/**
* Show the view for the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function view($id)
{
$order = $this->order->find($id);
return view($this->_config['view'], compact('order'));
}
}

View File

@ -172,10 +172,14 @@ Route::group(['middleware' => ['web']], function () {
])->name('customer.wishlist.index');
/* Orders route */
Route::get('orders', 'Webkul\Customer\Http\Controllers\OrdersController@orders')->defaults('_config', [
'view' => 'shop::customers.account.orders.orders'
Route::get('orders', 'Webkul\Shop\Http\Controllers\OrderController@index')->defaults('_config', [
'view' => 'shop::customers.account.orders.index'
])->name('customer.orders.index');
Route::get('orders/view/{id}', 'Webkul\Shop\Http\Controllers\OrderController@view')->defaults('_config', [
'view' => 'shop::customers.account.orders.view'
])->name('customer.orders.view');
/* Reviews route */
Route::get('reviews', 'Webkul\Customer\Http\Controllers\CustomerController@reviews')->defaults('_config', [
'view' => 'shop::customers.account.reviews.index'

View File

@ -5,7 +5,7 @@ namespace Webkul\Shop\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Webkul\Product\Product\ProductImage;
use Webkul\Product\Helpers\ProductImage;
use View;
class ComposerServiceProvider extends ServiceProvider

View File

@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Event;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Blade;
use Webkul\Shop\Providers\ComposerServiceProvider;
use Webkul\Ui\Menu;
class ShopServiceProvider extends ServiceProvider
{
@ -28,14 +29,49 @@ class ShopServiceProvider extends ServiceProvider
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
$this->app->register(ComposerServiceProvider::class);
$this->composeView();
$this->createCustomerMenu();
}
/**
* Register services.
* Bind the the data to the views
*
* @return void
*/
public function register()
protected function composeView()
{
view()->composer('shop::customers.account.partials.sidemenu', function ($view) {
$menu = current(Event::fire('customer.menu.create'));
$view->with('menu', $menu);
});
}
/**
* This method fires an event for menu creation, any package can add their menu item by listening to the customer.menu.build event
*
* @return void
*/
public function createCustomerMenu()
{
Event::listen('customer.menu.create', function () {
return Menu::create(function ($menu) {
Event::fire('customer.menu.build', $menu);
});
});
Event::listen('customer.menu.build', function ($menu) {
$menu->add('profile', 'Profile', 'customer.profile.index', 1);
$menu->add('orders', 'Orders', 'customer.orders.index', 2);
$menu->add('address', 'Address', 'customer.address.index', 3);
$menu->add('reviews', 'Reviews', 'customer.reviews.index', 4);
$menu->add('wishlist', 'Wishlist', 'customer.wishlist.index', 5);
});
}
}

View File

@ -1065,7 +1065,7 @@ section.product-detail {
.full-specifications {
td {
padding: 10px 0;
color: $font-color-light;
color: $other-font-color;
&:first-child {
padding-right: 40px;
@ -1897,8 +1897,8 @@ section.review {
border: 1px solid $border-color;
width: 25%;
height: 100%;
text-transform: capitalize;
color: $font-color-light;
position: relative;
li {
width: 95%;
@ -1910,6 +1910,16 @@ section.review {
align-items: center;
border-bottom: 1px solid $border-color;
text-align: center;
a {
color: #5E5E5E;
}
.icon {
display: none;
position: absolute;
right: 12px;
}
}
li:first-child {
@ -1921,14 +1931,24 @@ section.review {
}
li.active {
color: $brand-color;
a {
color: $brand-color;
}
.icon {
display: inline-block;
}
}
}
//customer account pages content
.account-layout {
margin-left: 5.5%;
margin-top: 1%;
margin-left: 40px;
width: 100%;
.account-head {
margin-bottom: 20px;
}
}
}
@ -1957,4 +1977,98 @@ section.review {
flex-direction: column;
min-height: 345px;
padding: 25px;
}
.sale-container {
color: #5E5E5E;
.sale-section {
.secton-title {
font-size: 18px;
color: #8E8E8E;
padding: 15px 0;
border-bottom: 1px solid $border-color;
}
.section-content {
display: block;
padding: 20px 0;
border-bottom: 1px solid #E8E8E8;
.row {
display: block;
padding: 7px 0;
.title {
width: 200px;
letter-spacing: -0.26px;
display: inline-block;
}
.value {
letter-spacing: -0.26px;
display: inline-block;
}
}
.order-box-container {
display: inline-block;
width: 100%;
.box {
float: left;
width: 25%;
.box-title {
padding: 10px 0;
font-size: 18px;
color: #8E8E8E;
}
.box-content {
color: #3A3A3A;
}
}
}
.qty-row {
display: block;
}
}
}
.totals {
padding-top: 20px;
display: inline-block;
width: 100%;
border-top: solid 1px #E8E8E8;
.sale-summary {
height: 130px;
float: right;
border-collapse: collapse;
tr {
td {
padding: 5px 8px;
width: auto;
color: #3A3A3A;
}
&.bold {
font-weight: 600;
font-size: 15px;
}
&.border {
td {
border-bottom: 1px solid $border-color;
}
}
}
}
}
}

View File

@ -113,13 +113,47 @@ return [
'order' => [
'index' => [
'page-title' => 'Customer-Order',
'page-title' => 'Customer - Orders',
'title' => 'Orders',
'order_id' => 'Order ID',
'date' => 'Date',
'status' => 'Status',
'item' => 'Item',
'total' => 'total'
'total' => 'Total'
],
'view' => [
'page-tile' => 'Order #:order_id',
'info' => 'Information',
'placed-on' => 'Placed On',
'products-ordered' => 'Products Ordered',
'invoices' => 'Invoices',
'shipments' => 'Shipments',
'SKU' => 'SKU',
'product-name' => 'Name',
'qty' => 'Qty',
'item-status' => 'Item Status',
'item-ordered' => 'Ordered (:qty_ordered)',
'item-invoice' => 'Invoiced (:qty_invoiced)',
'item-shipped' => 'shipped (:qty_shipped)',
'item-canceled' => 'Canceled (:qty_canceled)',
'price' => 'Price',
'total' => 'Total',
'subtotal' => 'Subtotal',
'shipping-handling' => 'Shipping & Handling',
'tax' => 'Tax',
'tax-percent' => 'Tax Percent',
'tax-amount' => 'Tax Amount',
'discount-amount' => 'Discount Amount',
'grand-total' => 'Grand Total',
'total-paid' => 'Total Paid',
'total-refunded' => 'Total Refunded',
'total-due' => 'Total Due',
'shipping-address' => 'Shipping Address',
'billing-address' => 'Billing Address',
'shipping-method' => 'Shipping Method',
'payment-method' => 'Payment Method',
'individual-invoice' => 'Invoice #:invoice_id',
'individual-shipment' => 'Shipment #:shipment_id',
]
],

View File

@ -6,7 +6,7 @@
@section('content-wrapper')
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<section class="cart">

View File

@ -43,7 +43,7 @@
</div>
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<div class="cart-item-list">
@foreach($cart->items as $item)

View File

@ -1,372 +1,65 @@
@extends('shop::layouts.master')
@section('content-wrapper')
<div class="account-content">
<!-- @include('shop::customers.account.partials.sidemenu') -->
<div class="order">
<div class="order-section-head">
<span class="order-number">Order #456103</span>
<span class="order-status">PROCESSING</span>
<span class="order-cancel"><a href="#">Cancel Order</a></span>
<div class="horizontal-rule"></div>
</div>
<div class="order-section-head-small">
<div class="horizon-rule">
</div>
<span class="icon">
<img src="{{asset('themes/default/assets/images/icon-menu-back.svg')}}" />
</span>
<span class="order-number">
ORDER #456103
</span>
<span class="cancel">
Cancel
</span>
<div class="horizon-rule">
</div>
</div>
<div class="payment-place">
<div class="placed-on">
<div class="place-text">
<span>Placed On</span>
<span class="processing">PROCESSING </span>
</div>
<div class="place-date">
<span>July 11, 2018 3:57AM</span>
</div>
</div>
<div class="payment-status">
<div class="payment-text">
<span>Payment Status</span>
</div>
<div class="status">
<span>Recieved</span>
</div>
</div>
<div class="horizontal-rule"></div>
</div>
<div class="order-details">
<span class="detail">Order Details</span>
</div>
<div class="table">
<table>
<thead>
<tr>
<th>SKU</th>
<th>Product Name</th>
<th>Item Status</th>
<th>Price</th>
<th>Qty</th>
<th>Row total</th>
</tr>
</thead>
<tbody>
<tr>
<td>PROD124</td>
<td>Apple iPhone 7- White-32GB</td>
<td>Packed (2)</td>
<td>$350.00</td>
<td>2</td>
<td>$700.00</td>
</tr>
<tr>
<td>PROD128</td>
<td>Blue Linen T-Shirt for Men- Small- Red</td>
<td>Shipped (2)</td>
<td>$45.00</td>
<td>2</td>
<td>$35.00</td>
</tr>
</tbody>
</table>
</div>
<div class="product-config">
<div class="product-attribute">
<div class="product-property">
<span>
SKU
</span>
</div>
<div class="property-name">
<span>
PROD128
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Product Name
</span>
</div>
<div class="property-name">
<span>
Apple iPhone 7 - White - 32GB
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Item Status
</span>
</div>
<div class="property-name">
<span>
Packed (2)
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Price
</span>
</div>
<div class="property-name">
<span>
$ 350.00
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Qty
</span>
</div>
<div class="property-name">
<span>
2
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Row Total
</span>
</div>
<div class="property-name">
<span>
$770.00
</span>
</div>
</div>
</div>
<div class="product-config">
<div class="product-attribute">
<div class="product-property">
<span>
SKU
</span>
</div>
<div class="property-name">
<span>
PROD128
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Product Name
</span>
</div>
<div class="property-name">
<span>
Apple iPhone 7 - White - 32GB
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Item Status
</span>
</div>
<div class="property-name">
<span>
Packed (2)
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Price
</span>
</div>
<div class="property-name">
<span>
$ 350.00
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Qty
</span>
</div>
<div class="property-name">
<span>
2
</span>
</div>
</div>
<div class="product-attribute">
<div class="product-property">
<span>
Row Total
</span>
</div>
<div class="property-name">
<span>
$770.00
</span>
</div>
</div>
</div>
<div class="total">
<div class="calculate">
<div class="sub-total">
<span class="left">
Subtotal
</span>
<span class="middle">
-
</span>
<span class="right">
$805.00
</span>
</div>
<div class="ship-handle">
<span class="left">
Shipping & handling
</span>
<span class="middle">
-
</span>
<span class="right">
$5.00
</span>
</div>
<div class="discount">
<span class="left">
Discounts
</span>
<span class="middle">
-
</span>
<span class="right">
$15.00
</span>
</div>
<div class="grand-total">
<span class="left">
Grand Total
</span>
<span class="middle">
-
</span>
<span class="right">
$15.00
</span>
</div>
<div class="due">
<span class="left">
Total Due
</span>
<span class="middle">
-
</span>
<span class="right">
$15.00
</span>
</div>
</div>
</div>
<div class="horizontal-rule"></div>
<div class="order-information">
<div class="order-address-method">
<span class="address-method">
Shipping Address
</span>
<p>0933 crossing suite 128 Dallas,Texas United States 75001</p>
</div>
<div class="order-address-method">
<span class="address-method">
Billing Address
</span>
<p>0933 crossing suite 128 Dallas,Texas United States 75001</p>
</div>
<div class="order-address-method">
<span class="address-method">
Shipping Method
</span>
<p>Flat Rate- Fixed</p>
</div>
<div class="order-address-method">
<span class="address-method">
Payment Method
</span>
<p>Bank Wire Transfer</p>
</div>
</div>
</div>
</div>
@section('page_title')
{{ __('shop::app.customer.account.order.index.page-title') }}
@endsection
@section('content-wrapper')
<div class="account-content">
@include('shop::customers.account.partials.sidemenu')
<div class="account-layout">
<div class="account-head">
<span class="account-heading">
{{ __('shop::app.customer.account.order.index.title') }}
</span>
</div>
<div class="account-items-list">
<div class="table">
<table>
<thead>
<tr>
<th> {{ __('shop::app.customer.account.order.index.order_id') }}</th>
<th> {{ __('shop::app.customer.account.order.index.date') }} </th>
<th> {{ __('shop::app.customer.account.order.index.total') }} </th>
<th> {{ __('shop::app.customer.account.order.index.status')}} </th>
</tr>
</thead>
<tbody>
@foreach($orders as $order)
<tr>
<td>
<a href="{{ route('customer.orders.view', $order->id) }}">
#{{ $order->id }}
</a>
</td>
<td>{{ core()->formatDate($order->created_at, 'd M Y') }}</td>
<td>
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
</td>
<td>
<span class="order-status {{ $order->status }}">{{ $order->status_label }}</span>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -1,53 +0,0 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.customer.account.order.index.page-title') }}
@endsection
@section('content-wrapper')
<div class="account-content">
@include('shop::customers.account.partials.sidemenu')
<div class="account-layout">
<div class="account-head">
<span class="account-heading">{{ __('shop::app.customer.account.order.index.title') }}</span>
<div class="horizontal-rule"></div>
</div>
<div class="account-items-list">
<div class="table">
<table>
<thead>
<tr>
<th> {{ __('shop::app.customer.account.order.index.order_id') }}</th>
<th> {{ __('shop::app.customer.account.order.index.date') }} </th>
<th> {{ __('shop::app.customer.account.order.index.status')}} </th>
<th> {{ __('shop::app.customer.account.order.index.item') }} </th>
<th> {{ __('shop::app.customer.account.order.index.total') }} </th>
</tr>
</thead>
<tbody>
@foreach($orders as $order)
<tr>
<td>{{ $order->id }}</td>
<td></td>
<td>Shipped (2)</td>
<td>2</td>
<td>$35.00</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,328 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->id]) }}
@endsection
@section('content-wrapper')
<div class="account-content">
@include('shop::customers.account.partials.sidemenu')
<div class="account-layout">
<div class="account-head">
<span class="account-heading">
{{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->id]) }}
</span>
</div>
<div class="sale-container">
<tabs>
<tab name="{{ __('shop::app.customer.account.order.view.info') }}" :selected="true">
<div class="sale-section">
<div class="section-content">
<div class="row">
<span class="title">
{{ __('shop::app.customer.account.order.view.placed-on') }}
</span>
<span class="value">
{{ core()->formatDate($order->created_at, 'd M Y') }}
</span>
</div>
</div>
</div>
<div class="sale-section">
<div class="secton-title">
<span>{{ __('shop::app.customer.account.order.view.products-ordered') }}</span>
</div>
<div class="section-content">
<div class="table">
<table>
<thead>
<tr>
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
<th>{{ __('shop::app.customer.account.order.view.price') }}</th>
<th>{{ __('shop::app.customer.account.order.view.item-status') }}</th>
<th>{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
<th>{{ __('shop::app.customer.account.order.view.tax-percent') }}</th>
<th>{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
<th>{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
</tr>
</thead>
<tbody>
@foreach ($order->items as $item)
<tr>
<td>
{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}
</td>
<td>{{ $item->name }}</td>
<td>{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
<td>
<span class="qty-row">
{{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $item->qty_ordered]) }}
</span>
<span class="qty-row">
{{ $item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $item->qty_invoiced]) : '' }}
</span>
<span class="qty-row">
{{ $item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $item->qty_shipped]) : '' }}
</span>
<span class="qty-row">
{{ $item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $item->qty_canceled]) : '' }}
</span>
</td>
<td>{{ core()->formatPrice($item->total, $order->order_currency_code) }}</td>
<td>{{ number_format($item->tax_percent, 2) }}%</td>
<td>{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}</td>
<td>{{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}</td>
</tr>
@endforeach
</table>
</div>
<div class="totals">
<table class="sale-summary">
<tbody>
<tr>
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}</td>
</tr>
<tr>
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}</td>
</tr>
<tr class="border">
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}</td>
</tr>
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}</td>
</tr>
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.total-paid') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->grand_total_invoiced, $order->order_currency_code) }}</td>
</tr>
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.total-refunded') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->grand_total_refunded, $order->order_currency_code) }}</td>
</tr>
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.total-due') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</td>
</tr>
<tbody>
</table>
</div>
</div>
</div>
</tab>
@if ($order->invoices->count())
<tab name="{{ __('shop::app.customer.account.order.view.invoices') }}">
@foreach ($order->invoices as $invoice)
<div class="sale-section">
<div class="secton-title">
<span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->id]) }}</span>
</div>
<div class="section-content">
<div class="table">
<table>
<thead>
<tr>
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
<th>{{ __('shop::app.customer.account.order.view.price') }}</th>
<th>{{ __('shop::app.customer.account.order.view.qty') }}</th>
<th>{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
<th>{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
<th>{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
</tr>
</thead>
<tbody>
@foreach ($invoice->items as $item)
<tr>
<td>{{ $item->child ? $item->child->sku : $item->sku }}</td>
<td>{{ $item->name }}</td>
<td>{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
<td>{{ $item->qty }}</td>
<td>{{ core()->formatPrice($item->total, $order->order_currency_code) }}</td>
<td>{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}</td>
<td>{{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="totals">
<table class="sale-summary">
<tr>
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($invoice->sub_total, $order->order_currency_code) }}</td>
</tr>
<tr>
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($invoice->shipping_amount, $order->order_currency_code) }}</td>
</tr>
<tr>
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}</td>
</tr>
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($invoice->grand_total, $order->order_currency_code) }}</td>
</tr>
</table>
</div>
</div>
</div>
@endforeach
</tab>
@endif
@if ($order->shipments->count())
<tab name="{{ __('shop::app.customer.account.order.view.shipments') }}">
@foreach ($order->shipments as $shipment)
<div class="sale-section">
<div class="secton-title">
<span>{{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $shipment->id]) }}</span>
</div>
<div class="section-content">
<div class="table">
<table>
<thead>
<tr>
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
<th>{{ __('shop::app.customer.account.order.view.qty') }}</th>
</tr>
</thead>
<tbody>
@foreach ($shipment->items as $item)
<tr>
<td>{{ $item->sku }}</td>
<td>{{ $item->name }}</td>
<td>{{ $item->qty }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endforeach
</tab>
@endif
</tabs>
<div class="sale-section">
<div class="section-content" style="border-bottom: 0">
<div class="order-box-container">
<div class="box">
<div class="box-title">
{{ __('shop::app.customer.account.order.view.shipping-address') }}
</div>
<div class="box-content">
@include ('admin::sales.address', ['address' => $order->billing_address])
</div>
</div>
<div class="box">
<div class="box-title">
{{ __('shop::app.customer.account.order.view.billing-address') }}
</div>
<div class="box-content">
@include ('admin::sales.address', ['address' => $order->shipping_address])
</div>
</div>
<div class="box">
<div class="box-title">
{{ __('shop::app.customer.account.order.view.shipping-method') }}
</div>
<div class="box-content">
{{ $order->shipping_title }}
</div>
</div>
<div class="box">
<div class="box-title">
{{ __('shop::app.customer.account.order.view.payment-method') }}
</div>
<div class="box-content">
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@ -1,12 +1,13 @@
{{-- <div class="side-menu-title mb-20" id="side-menu-title">
<strong>Menu</strong>
<i class="icon icon-arrow-down right" id="down-icon"></i>
</div> --}}
<ul class="account-side-menu">
@foreach($menu->items as $key=>$value)
@foreach($menu->items as $menuItem)
<li><a href="{{ $value['url'] }}">{{ $value['name'] }}</a></li>
<li class="menu-item {{ $menu->getActive($menuItem) }}">
<a href="{{ $menuItem['url'] }}">
{{ $menuItem['name'] }}
</a>
<i class="icon angle-right-icon"></i>
</li>
@endforeach
</ul>

View File

@ -1,4 +1,4 @@
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
@extends('shop::layouts.master')
@section('content-wrapper')

View File

@ -1,4 +1,4 @@
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
@extends('shop::layouts.master')
@section('content-wrapper')

View File

@ -3,7 +3,7 @@
@section('content-wrapper')
<div class="account-content">
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
@include('shop::customers.account.partials.sidemenu')

View File

@ -74,7 +74,7 @@
<?php $cart = cart()->getCart(); ?>
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<li class="cart-dropdown">
<span class="icon cart-icon"></span>

View File

@ -19,7 +19,7 @@
@include ('shop::products.list.toolbar')
@inject ('toolbarHelper', 'Webkul\Product\Product\Toolbar')
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@if ($toolbarHelper->getCurrentMode() == 'grid')
<div class="product-grid-3">

View File

@ -1,6 +1,6 @@
<div class="product-card">
@inject ('productImageHelper', 'Webkul\Product\Product\ProductImage')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<?php $productBaseImage = $productImageHelper->getProductBaseImage($product); ?>

Some files were not shown because too many files have changed in this diff Show More