conflict resolve
This commit is contained in:
commit
3c0c4481a2
|
|
@ -83,8 +83,7 @@ php artisan vendor:publish
|
|||
~~~
|
||||
|
||||
|
||||
> That's it, now just execute the project on your specified domain entry point on the installation on public folder inside
|
||||
project installation directory.
|
||||
> That's it, now just execute the project on your specified domain entry point pointing to public folder inside installation directory.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -442,28 +442,29 @@ Route::group(['middleware' => ['web']], function () {
|
|||
Route::put('/account', 'Webkul\User\Http\Controllers\AccountController@update')->name('admin.account.update');
|
||||
|
||||
// Admin Store Front Settings Route
|
||||
//slider index
|
||||
Route::get('/slider','Webkul\Shop\Http\Controllers\SliderController@index')->defaults('_config',[
|
||||
'view' => 'admin::settings.sliders.index'
|
||||
])->name('admin.sliders.index');
|
||||
|
||||
// Admin Store Front Settings Route
|
||||
|
||||
//slider create
|
||||
//slider create show
|
||||
Route::get('slider/create','Webkul\Shop\Http\Controllers\SliderController@create')->defaults('_config',[
|
||||
'view' => 'admin::settings.sliders.create'
|
||||
])->name('admin.sliders.create');
|
||||
|
||||
//slider create show
|
||||
Route::post('slider/create','Webkul\Shop\Http\Controllers\SliderController@store')->defaults('_config',[
|
||||
'redirect' => 'admin::sliders.index'
|
||||
'redirect' => 'admin.sliders.index'
|
||||
])->name('admin.sliders.store');
|
||||
|
||||
//slider edit
|
||||
//slider edit show
|
||||
Route::get('slider/edit/{id}','Webkul\Shop\Http\Controllers\SliderController@edit')->defaults('_config',[
|
||||
'view' => 'admin::settings.sliders.edit'
|
||||
])->name('admin.sliders.edit');
|
||||
|
||||
//slider edit update
|
||||
Route::post('slider/edit/{id}','Webkul\Shop\Http\Controllers\SliderController@update')->defaults('_config',[
|
||||
'redirect' => 'admin::sliders.index'
|
||||
'redirect' => 'admin.sliders.index'
|
||||
])->name('admin.sliders.update');
|
||||
|
||||
//destroy a slider item
|
||||
|
|
|
|||
|
|
@ -418,11 +418,18 @@ return [
|
|||
'sliders' => [
|
||||
'title' => 'Sliders',
|
||||
'add-title' => 'Create Slider',
|
||||
'edit-title' => 'Edit Slider',
|
||||
'save-btn-title' => 'Save Slider',
|
||||
'general' => 'General',
|
||||
'image' => 'Image',
|
||||
'content' => 'Content',
|
||||
'channels' => 'Channel'
|
||||
'channels' => 'Channel',
|
||||
'created-success' => 'Slider Item Created Successfully',
|
||||
'created-fault' => 'Error In Creating Slider Item',
|
||||
'update-success' => 'Slider Item Successfully Updated',
|
||||
'update-fail' => 'Slider Cannot Be Updated',
|
||||
'delete-success' => 'Cannot Delete The Last Slider Item',
|
||||
'delete-fail' => 'Slider Item Successfully Deleted'
|
||||
],
|
||||
],
|
||||
'customers' => [
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<link rel="icon" sizes="16x16" href="{{ asset('vendor/webkul/ui/assets/images/favicon.ico') }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('vendor/webkul/admin/assets/css/admin.css') }}">
|
||||
|
|
@ -18,7 +17,7 @@
|
|||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="loadTinyMCE()">
|
||||
<div id="app">
|
||||
|
||||
<flash-wrapper ref='flashes'></flash-wrapper>
|
||||
|
|
@ -55,9 +54,27 @@
|
|||
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/admin/assets/js/admin.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/ui/assets/js/ui.js') }}"></script>
|
||||
|
||||
@stack('scripts')
|
||||
|
||||
<script src="{{ asset('js/tinyMCE/tinymce.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
function loadTinyMCE() {
|
||||
tinymce.init({
|
||||
selector: 'textarea#tiny',
|
||||
height: 300,
|
||||
width: 535,
|
||||
plugins: 'image imagetools media wordcount save fullscreen',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
|
||||
image_advtab: true,
|
||||
templates: [
|
||||
{ title: 'Test template 1', content: 'Test 1' },
|
||||
{ title: 'Test template 2', content: 'Test 2' }
|
||||
],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal-overlay"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -22,51 +22,37 @@
|
|||
<div class="page-content">
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
<accordian :title="'{{ __('admin::app.settings.sliders.general') }}'" :active="true">
|
||||
<div slot="body">
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title">{{ __('admin::app.settings.sliders.title') }}</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'">
|
||||
<span class="control-error" v-if="errors.has('title')">@{{ errors.first('title') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title">{{ __('admin::app.settings.sliders.title') }}</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'">
|
||||
<span class="control-error" v-if="errors.has('title')">@{{ errors.first('title') }}</span>
|
||||
</div>
|
||||
<?php $channels = core()->getAllChannels() ?>
|
||||
<div class="control-group" :class="[errors.has('channel_id') ? 'has-error' : '']">
|
||||
<label for="channel_id">{{ __('admin::app.settings.sliders.channels') }}</label>
|
||||
<select class="control" id="channel_id" name="channel_id" v-validate="'required'">
|
||||
@foreach($channels as $channel)
|
||||
<option value="{{ $channel->id }}" @if($channel->id == old('channel_id')) selected @endif>
|
||||
{{ __($channel->name) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
<?php $channels = core()->getAllChannels() ?>
|
||||
<div class="control-group" :class="[errors.has('channel_id') ? 'has-error' : '']">
|
||||
<label for="channel_id">{{ __('admin::app.settings.sliders.channels') }}</label>
|
||||
<select class="control" id="channel_id" name="channel_id" v-validate="'required'">
|
||||
@foreach($channels as $channel)
|
||||
<option value="{{ $channel->id }}" @if($channel->id == old('channel_id')) selected @endif>
|
||||
{{ __($channel->name) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
||||
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
||||
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false"></image-wrapper>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
||||
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
||||
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
||||
<label for="content">{{ __('admin::app.settings.sliders.content') }}</label>
|
||||
|
||||
<image-upload>
|
||||
<textarea id="tiny" class="control" id="add_content" name="content" rows="5"></textarea>
|
||||
|
||||
<input type="file" class="control" id="add_image" name="image" value="" v-validate="'image|required'" placeholder="Upload from Outer"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('image')">@{{ errors.first('image') }}</span>
|
||||
{{-- The image field validation is not working, resolve it. --}}
|
||||
|
||||
</image-upload>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
||||
<label for="content">{{ __('admin::app.settings.sliders.content') }}</label>
|
||||
|
||||
<textarea class="control" id="add_content" name="content" v-validate="'required'" rows="5"></textarea>
|
||||
|
||||
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.settings.sliders.add-title') }}
|
||||
{{ __('admin::app.settings.sliders.edit-title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<form method="POST" action="{{ route('admin.sliders.update', $slider->id) }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.settings.sliders.add-title') }}</h1>
|
||||
<h1>{{ __('admin::app.settings.sliders.edit-title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -43,25 +43,20 @@
|
|||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
||||
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
||||
|
||||
<image-upload>
|
||||
<input type="file" class="control" id="add_image" name="image" value="" v-validate="'image|required'" placeholder="Upload Image" />
|
||||
|
||||
<span class="control-error" v-if="errors.has('image')">@{{ errors.first('image') }}</span>
|
||||
</image-upload>
|
||||
<div class="control-group">
|
||||
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false" :images='"{{ url('storage/'.$slider->path) }}"'></image-wrapper>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
||||
<label for="content">{{ __('admin::app.settings.sliders.content') }}</label>
|
||||
|
||||
<textarea class="control" id="add_content" name="content" v-validate="'required'" rows="5">{{ $slider->content ? : old('content') }}</textarea>
|
||||
<div class="panel-body">
|
||||
<textarea id="tiny" class="control" id="add_content" name="content" v-validate="'required'" rows="5">{{ $slider->content ? : old('content') }}</textarea>
|
||||
</div>
|
||||
|
||||
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ class Cart {
|
|||
|
||||
/**
|
||||
* Can Add the product or not will check the quantity for that particular product
|
||||
* before adding it each time.
|
||||
* before creation of the cart.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
|
|
@ -1149,6 +1149,7 @@ class Cart {
|
|||
* @return mixed
|
||||
*/
|
||||
public function moveConfigurableFromWishlistToCart($configurableproductId, $productId) {
|
||||
// dd('moving configurable');
|
||||
$product = $this->product->find($configurableproductId);
|
||||
|
||||
$canAdd = $this->product->find($productId)->haveSufficientQuantity(1);
|
||||
|
|
@ -1196,7 +1197,7 @@ class Cart {
|
|||
'weight' => $weight = ($product->type == 'configurable' ? $child->weight : $product->weight),
|
||||
'total_weight' => $weight,
|
||||
'base_total_weight' => $weight,
|
||||
'additional' => json_encode($additional)
|
||||
'additional' => $additional
|
||||
];
|
||||
|
||||
return ['parent' => $parentData, 'child' => $childData];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Search extends Model
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
|
||||
use Webkul\Product\Repositories\ProductRepository as Product;
|
||||
|
||||
// use Webkul\Product\Contracts\Criteria\searchByAttributeCriteria;
|
||||
|
||||
/**
|
||||
* Search Reposotory
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class SearchRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected $product;
|
||||
|
||||
|
||||
public function __construct(App $app, Product $product) {
|
||||
parent::__construct($app);
|
||||
|
||||
$this->product = $product;
|
||||
}
|
||||
|
||||
function model()
|
||||
{
|
||||
return 'Webkul\Product\Models\Product';
|
||||
}
|
||||
|
||||
public function searchAttributes(){
|
||||
// $this->pushCriteria(app(searchByAttributeCriteria::class));
|
||||
}
|
||||
|
||||
public function search($data) {
|
||||
$term = $data['term'];
|
||||
|
||||
$products = $this->product->searchProductByAttribute($term);
|
||||
|
||||
dd($products);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,20 +41,37 @@ class SliderRepository extends Repository
|
|||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function create(array $data)
|
||||
public function save(array $data)
|
||||
{
|
||||
|
||||
$channelName = $this->channel->find($data['channel_id'])->name;
|
||||
|
||||
$dir = 'slider_images/' . $channelName;
|
||||
|
||||
$image = request()->file('image')->store($dir);
|
||||
$uploaded = false;
|
||||
$image = false;
|
||||
|
||||
unset($data['image'], $data['_token']);
|
||||
if(isset($data['image'])) {
|
||||
$image = $first = array_first($data['image'], function ($value, $key) {
|
||||
if($value)
|
||||
return $value;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$data['path'] = $image;
|
||||
if($image != false) {
|
||||
$uploaded = $image->store($dir);
|
||||
|
||||
$this->model->create($data);
|
||||
unset($data['image'], $data['_token']);
|
||||
}
|
||||
|
||||
if($uploaded) {
|
||||
$data['path'] = $uploaded;
|
||||
} else {
|
||||
unset($data['image']);
|
||||
}
|
||||
|
||||
return $this->create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -67,13 +84,37 @@ class SliderRepository extends Repository
|
|||
|
||||
$dir = 'slider_images/' . $channelName;
|
||||
|
||||
$image = request()->file('image')->store($dir);
|
||||
$uploaded = false;
|
||||
$image = false;
|
||||
|
||||
unset($data['image'], $data['_token']);
|
||||
if(isset($data['image'])) {
|
||||
$image = $first = array_first($data['image'], function ($value, $key) {
|
||||
if($value)
|
||||
return $value;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$data['path'] = $image;
|
||||
if($image != false) {
|
||||
$uploaded = $image->store($dir);
|
||||
|
||||
unset($data['image'], $data['_token']);
|
||||
}
|
||||
|
||||
if($uploaded) {
|
||||
$sliderItem = $this->find($id);
|
||||
|
||||
$deleted = Storage::delete($sliderItem->path);
|
||||
|
||||
$data['path'] = $uploaded;
|
||||
} else {
|
||||
unset($data['image']);
|
||||
}
|
||||
|
||||
$this->update($data, $id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ModifyCustomerAddressTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('customer_addresses')) {
|
||||
Schema::table('customer_addresses', function (Blueprint $table) {
|
||||
$table->boolean('default_address')->default(0)->after('phone');
|
||||
$table->string('name')->nullable()->after('phone');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('customer_addresses')) {
|
||||
Schema::table('customer_addresses', function (Blueprint $table) {
|
||||
$table->dropColumn(['default', 'name']);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,10 +9,8 @@ use Webkul\Customer\Repositories\CustomerAddressRepository;
|
|||
use Auth;
|
||||
|
||||
/**
|
||||
* Customer controlller for the customer
|
||||
* basically for the tasks of customers
|
||||
* which will be done after customer
|
||||
* authenticastion.
|
||||
* 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)
|
||||
|
|
@ -34,35 +32,18 @@ class AddressController extends Controller
|
|||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->customer = $customer;
|
||||
$this->customer = auth()->guard('customer')->user();
|
||||
|
||||
$this->address = $address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting logged in customer address helper
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getAddress($id) {
|
||||
|
||||
$address = collect($this->address->findOneWhere(['customer_id'=>$id]));
|
||||
|
||||
return $address;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Route index page
|
||||
*
|
||||
* @return view
|
||||
*/
|
||||
public function index() {
|
||||
$id = auth()->guard('customer')->user()->id;
|
||||
|
||||
$address = $this->getAddress($id);
|
||||
|
||||
return view($this->_config['view'])->with('address', $address);
|
||||
return view($this->_config['view'])->with('addresses', $this->customer->addresses);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,90 +61,64 @@ class AddressController extends Controller
|
|||
* @return view
|
||||
*/
|
||||
public function create() {
|
||||
|
||||
$id = auth()->guard('customer')->user()->id;
|
||||
|
||||
$data = collect(request()->input())->except('_token')->toArray();
|
||||
|
||||
$this->validate(request(), [
|
||||
|
||||
'address1' => 'string|required',
|
||||
'address2' => 'string|required',
|
||||
'country' => 'string|required',
|
||||
'state' => 'string|required',
|
||||
'city' => 'string|required',
|
||||
'postcode' => 'required',
|
||||
|
||||
]);
|
||||
|
||||
$cust_id['customer_id'] = $id;
|
||||
|
||||
$cust_id['customer_id'] = $this->customer->id;
|
||||
$data = array_merge($cust_id, $data);
|
||||
|
||||
$address = $this->getAddress($id);
|
||||
|
||||
|
||||
if(count($address) == 0 || $address->isEmpty()) {
|
||||
if($this->address->create($data)) {
|
||||
session()->flash('success', 'Address have been successfully added.');
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
|
||||
} else {
|
||||
session()->flash('error', 'Address cannot be added.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
} else {
|
||||
session()->flash('error', 'Cannot create a new address due to previously existing address');
|
||||
|
||||
return redirect()-route('customer.address.edit');
|
||||
if($this->customer->addresses->count() == 0) {
|
||||
$data['default_address'] = 1;
|
||||
}
|
||||
|
||||
if($this->address->create($data)) {
|
||||
session()->flash('success', 'Address have been successfully added.');
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
} else {
|
||||
session()->flash('error', 'Address cannot be added.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* For editing the existing address of the customer
|
||||
* For editing the existing addresses of current logged in customer
|
||||
*
|
||||
* @return view
|
||||
*/
|
||||
public function showEdit() {
|
||||
|
||||
$id = auth()->guard('customer')->user()->id;
|
||||
|
||||
$address = $this->getAddress($id);
|
||||
|
||||
return view($this->_config['view'])->with('address', $address);
|
||||
public function showEdit($id) {
|
||||
$address = $this->customer->addresses->where('id', $id);
|
||||
|
||||
return view($this->_config['view'])->with('address', $address->first());
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits the premade resource of customer called
|
||||
* Edit's the premade resource of customer called
|
||||
* Address.
|
||||
*
|
||||
* @return redirect
|
||||
*/
|
||||
public function edit() {
|
||||
|
||||
$id = auth()->guard('customer')->user()->id;
|
||||
|
||||
public function edit($id) {
|
||||
$this->validate(request(), [
|
||||
|
||||
'address1' => 'string|required',
|
||||
'address2' => 'string|required',
|
||||
'country' => 'string|required',
|
||||
'state' => 'string|required',
|
||||
'city' => 'string|required',
|
||||
'postcode' => 'required',
|
||||
|
||||
]);
|
||||
|
||||
$data = collect(request()->input())->except('_token')->toArray();
|
||||
|
||||
$address = $this->getAddress($id);
|
||||
|
||||
if($this->address->update($data, $id)) {
|
||||
Session()->flash('success','Address Updated Successfully.');
|
||||
|
||||
|
|
@ -174,4 +129,38 @@ class AddressController extends Controller
|
|||
return redirect()->route('customer.address.edit');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To change the default address or make the default address, by default when first address is created will be the default address
|
||||
*
|
||||
* @return Mixed | @return response
|
||||
*/
|
||||
public function makeDefault($id) {
|
||||
$default = $this->customer->defaultAddress;
|
||||
|
||||
$result = $this->address->find($default->id)->update(['default_address' => 0]);
|
||||
|
||||
if($this->address->find($id)->update(['default_address' => 1])) {
|
||||
|
||||
} else {
|
||||
session()->flash('success', 'Default Cannot Be Address Changed');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete address of the current customer
|
||||
*
|
||||
* @param integer $id
|
||||
*
|
||||
* @return response mixed
|
||||
*/
|
||||
public function destroy($id) {
|
||||
$this->address->delete($id);
|
||||
|
||||
session()->flash('success', trans('shop::app.address.delete.success'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ use Illuminate\Http\Response;
|
|||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
|
||||
/**
|
||||
* Forgot Password controlller for the customer.
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ class RegistrationController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Opens up the
|
||||
* user's sign up
|
||||
* form.
|
||||
* Opens up the user's sign up form.
|
||||
*
|
||||
* @return view
|
||||
*/
|
||||
|
|
@ -43,9 +41,7 @@ class RegistrationController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Method to store
|
||||
* user's sign up
|
||||
* form data to DB
|
||||
* Method to store user's sign up form data to DB.
|
||||
*
|
||||
* @return Mixed
|
||||
*/
|
||||
|
|
@ -69,7 +65,9 @@ class RegistrationController extends Controller
|
|||
|
||||
session()->flash('success', 'Account Created Successfully');
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
return redirect()->back();
|
||||
|
||||
// return redirect()->route($this->_config['redirect'])->with('message', 'Account Created Successfully, Try To Log In');
|
||||
|
||||
} else {
|
||||
session()->flash('error', 'Cannot Create Your Account');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ use Illuminate\Support\Facades\Hash;
|
|||
use Illuminate\Auth\Events\PasswordReset;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* Reset Password controlller for the customer.
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Event;
|
|||
use Webkul\Customer\Models\Customer;
|
||||
use Webkul\Customer\Http\Listeners\CustomerEventsHandler;
|
||||
use Cart;
|
||||
|
||||
/**
|
||||
* Session controller for the user customer
|
||||
*
|
||||
|
|
@ -27,7 +28,6 @@ class SessionController extends Controller
|
|||
{
|
||||
|
||||
$this->middleware('customer')->except(['show','create']);
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$subscriber = new CustomerEventsHandler;
|
||||
|
|
@ -53,13 +53,11 @@ class SessionController extends Controller
|
|||
]);
|
||||
|
||||
if (!auth()->guard('customer')->attempt(request(['email', 'password']))) {
|
||||
|
||||
session()->flash('error', 'Please check your credentials and try again.');
|
||||
return back();
|
||||
}
|
||||
|
||||
//Event passed to prepare cart after login
|
||||
|
||||
Event::fire('customer.after.login', $request->input('email'));
|
||||
|
||||
return redirect()->intended(route($this->_config['redirect']));
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@ use Cart;
|
|||
use Auth;
|
||||
|
||||
/**
|
||||
* Customer controlller for the customer
|
||||
* basically for the tasks of customers
|
||||
* which will be done after customer
|
||||
* authenticastion.
|
||||
* 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)
|
||||
|
|
|
|||
|
|
@ -50,8 +50,16 @@ class Customer extends Authenticatable
|
|||
/**
|
||||
* Get the customer address that owns the customer.
|
||||
*/
|
||||
public function address()
|
||||
public function addresses()
|
||||
{
|
||||
return $this->hasOne(CustomerAddress::class);
|
||||
return $this->hasMany(CustomerAddress::class, 'customer_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default customer address that owns the customer.
|
||||
*/
|
||||
public function defaultAddress()
|
||||
{
|
||||
return $this->hasOne(CustomerAddress::class, 'customer_id')->where('default_address', 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ class CustomerAddress extends Model
|
|||
{
|
||||
protected $table = 'customer_addresses';
|
||||
|
||||
protected $fillable = ['customer_id' ,'address1', 'address2', 'country', 'state', 'city', 'postcode'];
|
||||
protected $fillable = ['customer_id' ,'address1', 'address2', 'country', 'state', 'city', 'postcode', 'default_address'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,32 +23,4 @@ class CustomerAddressRepository extends Repository
|
|||
{
|
||||
return 'Webkul\Customer\Models\CustomerAddress';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function create(array $data)
|
||||
{
|
||||
$address = $this->model->create($data);
|
||||
|
||||
return $address;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param $id
|
||||
* @param string $attribute
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function update(array $data, $id, $attribute = "id")
|
||||
{
|
||||
$address = $this->findOneByField('customer_id', $id);
|
||||
|
||||
$address->update($data);
|
||||
|
||||
return $address;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Contracts\Criteria;
|
||||
|
||||
use Prettus\Repository\Contracts\CriteriaInterface;
|
||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
|
||||
use Webkul\Product\Helpers\AbstractProduct;
|
||||
|
||||
/**
|
||||
* Class MyCriteria.
|
||||
*
|
||||
* @package namespace App\Criteria;
|
||||
*/
|
||||
class SearchByAttributeCriteria extends AbstractProduct implements CriteriaInterface
|
||||
{
|
||||
/**
|
||||
* @param Webkul\Attribute\Repositories\AttributeRepository $attribute
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(AttributeRepository $attribute)
|
||||
{
|
||||
$this->attribute = $attribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply criteria in query repository
|
||||
*
|
||||
* @param string $model
|
||||
* @param RepositoryInterface $repository
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function apply($model, RepositoryInterface $repository)
|
||||
{
|
||||
return $model = $model->leftJoin('product_attribute_values as pav', 'products.id', '=', 'pav.product_id')->where('attribute_id', '=', 75)->where('products.parent_id', '=', null);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Contracts\Criteria;
|
||||
|
||||
use Prettus\Repository\Contracts\CriteriaInterface;
|
||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
|
||||
use Webkul\Product\Helpers\AbstractProduct;
|
||||
|
||||
/**
|
||||
* Class MyCriteria.
|
||||
*
|
||||
* @package namespace App\Criteria;
|
||||
*/
|
||||
class SearchByCategoryCriteria extends AbstractProduct implements CriteriaInterface
|
||||
{
|
||||
/**
|
||||
* Apply criteria in query repository
|
||||
*
|
||||
* @param string $model
|
||||
* @param RepositoryInterface $repository
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function apply($model, RepositoryInterface $repository)
|
||||
{
|
||||
|
||||
//->leftJoin('category_translations', 'categories.id', '=', 'category_translations.id')->addSelect('category_translations.name')
|
||||
|
||||
$model = $model->leftJoin('product_categories', 'products.id', '=', 'product_categories.product_id')->leftJoin('categories', 'product_categories.category_id', '=', 'categories.id')->leftJoin('category_translations', 'categories.id', '=', 'category_translations.id');
|
||||
|
||||
return $model;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Contracts\Criteria;
|
||||
|
||||
use Prettus\Repository\Contracts\CriteriaInterface;
|
||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
|
||||
use Webkul\Product\Helpers\AbstractProduct;
|
||||
|
||||
/**
|
||||
* Class MyCriteria.
|
||||
*
|
||||
* @package namespace App\Criteria;
|
||||
*/
|
||||
class SearchBySuperAttributeCriteria extends AbstractProduct implements CriteriaInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ class ReviewController extends Controller
|
|||
return view($this->_config['view'],compact('review'));
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
|
|
@ -93,7 +93,7 @@ class ReviewController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete the review of the current product
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ use Webkul\Product\Contracts\Criteria\FilterByAttributesCriteria;
|
|||
use Webkul\Product\Contracts\Criteria\FilterByCategoryCriteria;
|
||||
use Webkul\Product\Contracts\Criteria\NewProductsCriteria;
|
||||
use Webkul\Product\Contracts\Criteria\FeaturedProductsCriteria;
|
||||
use Webkul\Product\Contracts\Criteria\SearchByAttributeCriteria;
|
||||
use Webkul\Product\Contracts\Criteria\SearchByCategoryCriteria;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
|
||||
/**
|
||||
|
|
@ -471,4 +473,31 @@ class ProductRepository extends Repository
|
|||
return $query->distinct()->addSelect('products.*')->orderBy('id', 'desc');
|
||||
})->paginate(4, ['products.id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Product by Attribute
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchProductByAttribute($term) {
|
||||
// $findIn = $this->breakTheTerm($term);
|
||||
|
||||
$this->pushCriteria(app(SearchByAttributeCriteria::class));
|
||||
// $this->pushCriteria(app(SearchByCategoryCriteria::class));
|
||||
|
||||
return $this->scopeQuery(function($query) use($term) {
|
||||
return $query->distinct()->addSelect('products.*')->where('pav.text_value', 'like', '%'.$term.'%');
|
||||
// ->where('category_translations.name', 'like', '%'.'clothes'.'%');
|
||||
})->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* break the search term into explode by using space and tell which exploded item is attribute
|
||||
* , category, super attribute or combination of them.
|
||||
*/
|
||||
public function breakTheTerm($term) {
|
||||
$explodedTerm = (explode(" ", $term));
|
||||
|
||||
dd($term);
|
||||
}
|
||||
}
|
||||
|
|
@ -31400,6 +31400,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
|
||||
mounted: function mounted() {
|
||||
this.getProps();
|
||||
|
||||
this.getTest();
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -31407,8 +31409,10 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
getProps: function getProps() {
|
||||
this.setProps();
|
||||
},
|
||||
getTest: function getTest() {
|
||||
console.log('hello world');
|
||||
},
|
||||
setProps: function setProps() {
|
||||
|
||||
var this_this = this;
|
||||
|
||||
this.slides.forEach(function (slider) {
|
||||
|
|
@ -31425,22 +31429,17 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
|
||||
|
||||
changeIndexLeft: function changeIndexLeft() {
|
||||
|
||||
if (this.currentIndex > 0) {
|
||||
|
||||
this.currentIndex--;
|
||||
} else if (this.currentIndex == 0) {
|
||||
|
||||
this.currentIndex = this.images.length - 1;
|
||||
}
|
||||
},
|
||||
|
||||
changeIndexRight: function changeIndexRight() {
|
||||
|
||||
if (this.currentIndex < this.images.length - 1) {
|
||||
|
||||
this.currentIndex++;
|
||||
} else if (this.currentIndex == this.images.length - 1) {
|
||||
|
||||
this.currentIndex = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Webkul\Shop\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Category\Repositories\CategoryRepository as Category;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Webkul\Shop\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Webkul\Core\Repositories\SliderRepository as Sliders;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Webkul\Shop\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Auth;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ class ReviewController extends Controller
|
|||
*/
|
||||
public function __construct(Product $product, ProductReview $productReview)
|
||||
{
|
||||
$this->middleware('admin')->only(['update', 'destroy']);
|
||||
|
||||
$this->middleware('customer')->only(['create', 'store', 'destroy']);
|
||||
|
||||
$this->product = $product;
|
||||
|
|
@ -57,16 +55,6 @@ class ReviewController extends Controller
|
|||
$this->_config = request('_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
|
|
@ -94,8 +82,10 @@ class ReviewController extends Controller
|
|||
'title' => 'required',
|
||||
]);
|
||||
|
||||
$data=$request->all();
|
||||
$data = request()->all();
|
||||
|
||||
$customer_id = auth()->guard('customer')->user()->id;
|
||||
|
||||
$data['status'] = 'pending';
|
||||
$data['product_id'] = $id;
|
||||
$data['customer_id'] = $customer_id;
|
||||
|
|
@ -120,35 +110,6 @@ class ReviewController extends Controller
|
|||
return view($this->_config['view'],compact('product'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$review = $this->productReview->find($id);
|
||||
|
||||
return view($this->_config['view'],compact('review'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$this->productReview->update(request()->all(), $id);
|
||||
|
||||
session()->flash('success', 'Review updated successfully.');
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the review of the current product
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Webkul\Shop\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
use Webkul\Core\Repositories\SearchRepository as Search;
|
||||
|
||||
/**
|
||||
* Search controller
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
|
||||
class SearchController extends controller
|
||||
{
|
||||
protected $_config;
|
||||
|
||||
protected $search;
|
||||
|
||||
public function __construct(Search $search)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->search = $search;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index to handle the view loaded with the search results
|
||||
*/
|
||||
public function index() {
|
||||
$results = null;
|
||||
|
||||
$results = $this->search->search(request()->all());
|
||||
|
||||
if($results) {
|
||||
return view($this->_config['view'])->with('results', $results);
|
||||
} else {
|
||||
return view($this->_config['view'])->with('results', null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Webkul\Shop\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Webkul\Core\Repositories\SliderRepository as Slider;
|
||||
|
||||
/**
|
||||
|
|
@ -24,7 +25,6 @@ class SliderController extends controller
|
|||
{
|
||||
$this->slider = $slider;
|
||||
$this->_config = request('_config');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -54,12 +54,20 @@ class SliderController extends controller
|
|||
* @return response
|
||||
*/
|
||||
public function store() {
|
||||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
'image' => 'required',
|
||||
]);
|
||||
|
||||
$this->slider->create(request()->all());
|
||||
$result = $this->slider->save(request()->all());
|
||||
|
||||
session()->flash('success', 'Slider created successfully.');
|
||||
if($result)
|
||||
session()->flash('success', trans('admin::app.settings.sliders.created-success'));
|
||||
else
|
||||
session()->flash('success', trans('admin::app.settings.sliders.created-fail'));
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -79,13 +87,20 @@ class SliderController extends controller
|
|||
* @return response
|
||||
*/
|
||||
public function update($id) {
|
||||
if($this->slider->updateItem(request()->all(), $id)) {
|
||||
session()->flash('success', 'Slider Item Successfully Updated');
|
||||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
]);
|
||||
|
||||
$result = $this->slider->updateItem(request()->all(), $id);
|
||||
|
||||
if($result) {
|
||||
session()->flash('success', trans('admin::app.settings.sliders.update-success'));
|
||||
} else {
|
||||
session()->flash('error', 'Slider Cannot Be Updated');
|
||||
session()->flash('error', trans('admin::app.settings.sliders.update-fail'));
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -95,11 +110,11 @@ class SliderController extends controller
|
|||
*/
|
||||
public function destroy($id) {
|
||||
if($this->slider->findWhere(['channel_id' => core()->getCurrentChannel()->id])->count() == 1) {
|
||||
session()->flash('warning', 'Cannot Delete The Last Slider Item');
|
||||
session()->flash('warning', trans('admin::app.settings.sliders.delete-success'));
|
||||
} else {
|
||||
$this->slider->destroy($id);
|
||||
|
||||
session()->flash('success', 'Slider Item Successfully Deleted');
|
||||
session()->flash('success', trans('admin::app.settings.sliders.delete-fail'));
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
|
|
|
|||
|
|
@ -2,186 +2,230 @@
|
|||
|
||||
Route::group(['middleware' => ['web', 'theme', 'locale', 'currency']], function () {
|
||||
|
||||
//Store front home
|
||||
Route::get('/', 'Webkul\Shop\Http\Controllers\HomeController@index')->defaults('_config', [
|
||||
'view' => 'shop::home.index'
|
||||
])->name('shop.home.index');
|
||||
|
||||
//Store front header nav-menu fetch
|
||||
Route::get('/categories/{slug}', 'Webkul\Shop\Http\Controllers\CategoryController@index')->defaults('_config', [
|
||||
'view' => 'shop::products.index'
|
||||
]);
|
||||
|
||||
//Store front search
|
||||
Route::get('/search', 'Webkul\Shop\Http\Controllers\SearchController@index')->defaults('_config', [
|
||||
'view' => 'shop::search.search'
|
||||
])->name('shop.search.index');
|
||||
|
||||
//checkout and cart
|
||||
//Cart Items(listing)
|
||||
Route::get('checkout/cart', 'Webkul\Shop\Http\Controllers\CartController@index')->defaults('_config', [
|
||||
'view' => 'shop::checkout.cart.index'
|
||||
])->name('shop.checkout.cart.index');
|
||||
|
||||
//Cart Items Add
|
||||
Route::post('checkout/cart/add/{id}', 'Webkul\Shop\Http\Controllers\CartController@add')->name('cart.add');
|
||||
|
||||
//Cart Items Add Configurable for more
|
||||
Route::get('checkout/cart/addconfigurable/{slug}', 'Webkul\Shop\Http\Controllers\CartController@addconfigurable')->name('cart.add.configurable');
|
||||
|
||||
//Cart Items Remove
|
||||
Route::get('checkout/cart/remove/{id}', 'Webkul\Shop\Http\Controllers\CartController@remove')->name('cart.remove');
|
||||
|
||||
//Cart Update Before Checkout
|
||||
Route::post('/checkout/cart', 'Webkul\Shop\Http\Controllers\CartController@updateBeforeCheckout')->defaults('_config',[
|
||||
'redirect' => 'shop.checkout.cart.index'
|
||||
])->name('shop.checkout.cart.update');
|
||||
|
||||
//Cart Items Remove
|
||||
Route::get('/checkout/cart/remove/{id}', 'Webkul\Shop\Http\Controllers\CartController@remove')->defaults('_config',[
|
||||
'redirect' => 'shop.checkout.cart.index'
|
||||
])->name('shop.checkout.cart.remove');
|
||||
|
||||
//Checkout Index page
|
||||
Route::get('/checkout/onepage', 'Webkul\Shop\Http\Controllers\OnepageController@index')->defaults('_config', [
|
||||
'view' => 'shop::checkout.onepage'
|
||||
])->name('shop.checkout.onepage.index');
|
||||
|
||||
//Checkout Save Address Form Store
|
||||
Route::post('/checkout/save-address', 'Webkul\Shop\Http\Controllers\OnepageController@saveAddress')->name('shop.checkout.save-address');
|
||||
|
||||
//Checkout Save Shipping Address Form Store
|
||||
Route::post('/checkout/save-shipping', 'Webkul\Shop\Http\Controllers\OnepageController@saveShipping')->name('shop.checkout.save-shipping');
|
||||
|
||||
//Checkout Save Payment Method Form
|
||||
Route::post('/checkout/save-payment', 'Webkul\Shop\Http\Controllers\OnepageController@savePayment')->name('shop.checkout.save-payment');
|
||||
|
||||
//Checkout Save Order
|
||||
Route::post('/checkout/save-order', 'Webkul\Shop\Http\Controllers\OnepageController@saveOrder')->name('shop.checkout.save-order');
|
||||
|
||||
//Checkout Order Successfull
|
||||
Route::get('/checkout/success', 'Webkul\Shop\Http\Controllers\OnepageController@success')->defaults('_config', [
|
||||
'view' => 'shop::checkout.success'
|
||||
])->name('shop.checkout.success');
|
||||
|
||||
//buy now
|
||||
//Shop buynow button action
|
||||
Route::get('buynow/{id}', 'Webkul\Shop\Http\Controllers\CartController@test')->name('shop.product.buynow');
|
||||
|
||||
//Show Product Details Page(For individually Viewable Product)
|
||||
Route::get('/products/{slug}', 'Webkul\Shop\Http\Controllers\ProductController@index')->defaults('_config', [
|
||||
'view' => 'shop::products.view'
|
||||
])->name('shop.products.index');
|
||||
|
||||
|
||||
// Product Review routes
|
||||
// Show Product Review Form
|
||||
Route::get('/reviews/{slug}', 'Webkul\Shop\Http\Controllers\ReviewController@show')->defaults('_config', [
|
||||
'view' => 'shop::products.reviews.index'
|
||||
])->name('shop.reviews.index');
|
||||
|
||||
// Show Product Review(listing)
|
||||
Route::get('/product/{slug}/review', 'Webkul\Shop\Http\Controllers\ReviewController@create')->defaults('_config', [
|
||||
'view' => 'shop::products.reviews.create'
|
||||
])->name('shop.reviews.create');
|
||||
|
||||
// Show Product Review Form Store
|
||||
Route::post('/product/{slug}/review', 'Webkul\Shop\Http\Controllers\ReviewController@store')->defaults('_config', [
|
||||
'redirect' => 'customer.reviews.index'
|
||||
])->name('shop.reviews.store');
|
||||
|
||||
|
||||
//customer routes starts here
|
||||
Route::prefix('customer')->group(function () {
|
||||
// forgot Password Routes
|
||||
// Forgot Password Form Show
|
||||
Route::get('/forgot-password', 'Webkul\Customer\Http\Controllers\ForgotPasswordController@create')->defaults('_config', [
|
||||
'view' => 'shop::customers.signup.forgot-password'
|
||||
])->name('customer.forgot-password.create');
|
||||
|
||||
// Forgot Password Form Store
|
||||
Route::post('/forgot-password', 'Webkul\Customer\Http\Controllers\ForgotPasswordController@store')->name('customer.forgot-password.store');
|
||||
|
||||
//Reset Password create
|
||||
// Reset Password Form Show
|
||||
Route::get('/reset-password/{token}', 'Webkul\Customer\Http\Controllers\ResetPasswordController@create')->defaults('_config', [
|
||||
'view' => 'shop::customers.signup.reset-password'
|
||||
])->name('customer.reset-password.create');
|
||||
|
||||
// Reset Password Form Store
|
||||
Route::post('/reset-password', 'Webkul\Customer\Http\Controllers\ResetPasswordController@store')->defaults('_config', [
|
||||
'redirect' => 'customer.session.index'
|
||||
])->name('customer.reset-password.store');
|
||||
|
||||
// Login Routes
|
||||
// Login form show
|
||||
Route::get('login', 'Webkul\Customer\Http\Controllers\SessionController@show')->defaults('_config', [
|
||||
'view' => 'shop::customers.session.index',
|
||||
])->name('customer.session.index');
|
||||
|
||||
// Login form store
|
||||
Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [
|
||||
'redirect' => 'customer.profile.index'
|
||||
])->name('customer.session.create');
|
||||
|
||||
// Registration Routes
|
||||
//registration form show
|
||||
Route::get('register', 'Webkul\Customer\Http\Controllers\RegistrationController@show')->defaults('_config', [
|
||||
'view' => 'shop::customers.signup.index' //hint path
|
||||
'view' => 'shop::customers.signup.index'
|
||||
])->name('customer.register.index');
|
||||
|
||||
//registration form store
|
||||
Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [
|
||||
'redirect' => 'customer.account.index',
|
||||
])->name('customer.register.create'); //redirect attribute will get changed immediately to account.index when account's index page will be made
|
||||
])->name('customer.register.create');
|
||||
|
||||
// Auth Routes
|
||||
Route::group(['middleware' => ['customer']], function () {
|
||||
|
||||
//route for logout which will be under the auth guard of the customer by default
|
||||
//Customer logout
|
||||
Route::get('logout', 'Webkul\Customer\Http\Controllers\SessionController@destroy')->defaults('_config', [
|
||||
'redirect' => 'customer.session.index'
|
||||
])->name('customer.session.destroy');
|
||||
|
||||
//wishlist
|
||||
//Customer Wishlist add
|
||||
Route::get('wishlist/add/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@add')->name('customer.wishlist.add');
|
||||
|
||||
//Customer Wishlist remove
|
||||
Route::get('wishlist/remove/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@remove')->name('customer.wishlist.remove');
|
||||
|
||||
//Customer Wishlist move to cart
|
||||
Route::get('wishlist/move/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@move')->name('customer.wishlist.move');
|
||||
|
||||
//Customer Wishlist move all to cart
|
||||
Route::get('wishlist/moveall', 'Webkul\Customer\Http\Controllers\WishlistController@moveAll')->name('customer.wishlist.moveall');
|
||||
|
||||
//customer account
|
||||
Route::prefix('account')->group(function () {
|
||||
|
||||
//Customer Dashboard Route
|
||||
Route::get('index', 'Webkul\Customer\Http\Controllers\AccountController@index')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.index'
|
||||
])->name('customer.account.index');
|
||||
|
||||
|
||||
/* Profile Routes Starts Here */
|
||||
//Customer Profile Show
|
||||
Route::get('profile', 'Webkul\Customer\Http\Controllers\CustomerController@index')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.profile.index'
|
||||
])->name('customer.profile.index');
|
||||
|
||||
//profile edit
|
||||
//Customer Profile Edit Form Show
|
||||
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@editIndex')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.profile.edit'
|
||||
])->name('customer.profile.edit');
|
||||
|
||||
//Customer Profile Edit Form Store
|
||||
Route::post('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@edit')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.profile.edit'
|
||||
])->name('customer.profile.edit');
|
||||
/* Profile Routes Ends Here */
|
||||
|
||||
/* Routes for Addresses */
|
||||
//Customer Address Show
|
||||
Route::get('address/index', 'Webkul\Customer\Http\Controllers\AddressController@index')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.address.address'
|
||||
])->name('customer.address.index');
|
||||
|
||||
//Customer Address Create Form Show
|
||||
Route::get('address/create', 'Webkul\Customer\Http\Controllers\AddressController@show')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.address.create'
|
||||
])->name('customer.address.create');
|
||||
|
||||
//Customer Address Create Form Store
|
||||
Route::post('address/create', 'Webkul\Customer\Http\Controllers\AddressController@create')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.address.address',
|
||||
'redirect' => 'customer.address.index'
|
||||
])->name('customer.address.create');
|
||||
|
||||
Route::get('address/edit', 'Webkul\Customer\Http\Controllers\AddressController@showEdit')->defaults('_config', [
|
||||
//Customer Address Edit Form Show
|
||||
Route::get('address/edit/{id}', 'Webkul\Customer\Http\Controllers\AddressController@showEdit')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.address.edit'
|
||||
])->name('customer.address.edit');
|
||||
|
||||
Route::post('address/edit', 'Webkul\Customer\Http\Controllers\AddressController@edit')->defaults('_config', [
|
||||
//Customer Address Edit Form Store
|
||||
Route::post('address/edit/{id}', 'Webkul\Customer\Http\Controllers\AddressController@edit')->defaults('_config', [
|
||||
'redirect' => 'customer.address.index'
|
||||
])->name('customer.address.edit');
|
||||
/* Routes for Addresses ends here */
|
||||
|
||||
//Customer Address Make Default
|
||||
Route::get('address/default/{id}', 'Webkul\Customer\Http\Controllers\AddressController@makeDefault')->name('make.default.address');
|
||||
|
||||
//Customer Address Delete
|
||||
Route::get('address/delete/{id}', 'Webkul\Customer\Http\Controllers\AddressController@destroy')->name('address.delete');
|
||||
|
||||
/* Wishlist route */
|
||||
//Customer wishlist(listing)
|
||||
Route::get('wishlist', 'Webkul\Customer\Http\Controllers\WishlistController@index')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.wishlist.wishlist'
|
||||
])->name('customer.wishlist.index');
|
||||
|
||||
/* Orders route */
|
||||
//Customer orders(listing)
|
||||
Route::get('orders', 'Webkul\Shop\Http\Controllers\OrderController@index')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.orders.index'
|
||||
])->name('customer.orders.index');
|
||||
|
||||
//Customer orders view summary and status
|
||||
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\Shop\Http\Controllers\ReviewController@reviews')->defaults('_config', [
|
||||
//Customer reviews(listing) only approved
|
||||
Route::get('reviews', 'Webkul\Customer\Http\Controllers\CustomerController@reviews')->defaults('_config', [
|
||||
'view' => 'shop::customers.account.reviews.index'
|
||||
])->name('customer.reviews.index');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<div class="slider-content" v-if="images.length>0">
|
||||
|
||||
<ul class="slider-images">
|
||||
<li v-for="(image,index) in images" :key="index" v-bind:class="{'show': index==currentIndex}">
|
||||
<li v-for="(image, index) in images" :key="index" v-bind:class="{'show': index==currentIndex}">
|
||||
<img class="slider-item" :src="image" />
|
||||
<!-- <div class="show-content"></div> -->
|
||||
<div class="show-content" v-bind:class="{'show': index==currentIndex}" :key="index" v-html="content[index]"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -56,11 +56,12 @@ export default {
|
|||
},
|
||||
|
||||
setProps() {
|
||||
|
||||
var this_this = this;
|
||||
|
||||
this.slides.forEach(function(slider) {
|
||||
this_this.images.push(this_this.public_path+'/storage/'+slider.path);
|
||||
|
||||
this_this.content.push(slider.content);
|
||||
});
|
||||
this.currentIndex = 0;
|
||||
|
||||
|
|
@ -69,39 +70,22 @@ export default {
|
|||
} else {
|
||||
this.images_loaded = true;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
changeIndexLeft: function() {
|
||||
|
||||
if (this.currentIndex > 0) {
|
||||
|
||||
this.currentIndex--;
|
||||
|
||||
}
|
||||
|
||||
else if(this.currentIndex == 0) {
|
||||
|
||||
} else if(this.currentIndex == 0) {
|
||||
this.currentIndex = this.images.length-1;
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
changeIndexRight: function() {
|
||||
|
||||
if(this.currentIndex < this.images.length-1) {
|
||||
|
||||
this.currentIndex++;
|
||||
|
||||
}
|
||||
|
||||
else if(this.currentIndex == this.images.length-1) {
|
||||
|
||||
} else if(this.currentIndex == this.images.length-1) {
|
||||
this.currentIndex = 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@ body {
|
|||
font-family: "Montserrat", sans-serif;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
.btn.btn-primary{
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
|
@ -140,7 +144,64 @@ body {
|
|||
margin-top: 90px;
|
||||
}
|
||||
|
||||
|
||||
//components
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
color: #3A3A3A;
|
||||
}
|
||||
|
||||
/* The container */
|
||||
.radio-container {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 35px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Create a custom radio button */
|
||||
.checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
background-color: white;
|
||||
border: 2px solid #FF6472;
|
||||
border-radius: 50%;
|
||||
}
|
||||
/* Create the indicator (the dot/circle - hidden when not checked) */
|
||||
.checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkmark:after {
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #FF6472;
|
||||
}
|
||||
}
|
||||
|
||||
/* Show the indicator (dot/circle) when checked */
|
||||
.radio-container input:checked ~ .checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
//wishlist icon hover properties
|
||||
.add-to-wishlist {
|
||||
|
|
@ -516,6 +577,10 @@ section.slider-block {
|
|||
|
||||
ul.slider-images {
|
||||
|
||||
.show-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
li{
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
|
@ -523,10 +588,23 @@ section.slider-block {
|
|||
|
||||
li.show {
|
||||
display:block;
|
||||
position: relative;
|
||||
visibility: visible;
|
||||
width: 100%;
|
||||
animation-name: example;
|
||||
animation-duration: 4s;
|
||||
|
||||
.show-content {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes example {
|
||||
|
|
@ -649,6 +727,11 @@ section.slider-block {
|
|||
height: 24px;
|
||||
width: 24px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
outline: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2751,11 +2834,15 @@ section.review {
|
|||
margin-top: 2%;
|
||||
|
||||
table tbody tr {
|
||||
<<<<<<< HEAD
|
||||
height: 70px;
|
||||
|
||||
td {
|
||||
display: block;
|
||||
}
|
||||
=======
|
||||
margin-bottom: 20px;
|
||||
>>>>>>> e2c036ced0d1382b03c6a963bb7965d1d40488e2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2767,9 +2854,15 @@ section.review {
|
|||
display: none;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
.responsive-empty {
|
||||
display: block;
|
||||
}
|
||||
=======
|
||||
//Account content inside a table
|
||||
.account-table-content {
|
||||
color: $font-color;
|
||||
>>>>>>> e2c036ced0d1382b03c6a963bb7965d1d40488e2
|
||||
|
||||
.responsive-table {
|
||||
border: 1px solid $border-color;
|
||||
|
|
@ -2791,6 +2884,7 @@ section.review {
|
|||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
.account-items-list.table {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -2799,6 +2893,72 @@ section.review {
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
=======
|
||||
//address holder and address card
|
||||
.address-holder {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.address-card {
|
||||
width: 260px;
|
||||
border: 1px solid #E8E8E8;
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
padding: 25px 1px 22px 15px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
.control-group {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.details {
|
||||
font-weight: lighter;
|
||||
margin-left: 15px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.control-links {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.btn {
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.default-address {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: -3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.edit-form {
|
||||
display: flex;
|
||||
border: 1px solid $border-color;
|
||||
flex-direction: column;
|
||||
min-height: 345px;
|
||||
padding: 25px;
|
||||
>>>>>>> e2c036ced0d1382b03c6a963bb7965d1d40488e2
|
||||
}
|
||||
|
||||
.sale-container {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ return [
|
|||
'locale' => 'Locale',
|
||||
],
|
||||
|
||||
'search' => [
|
||||
'no-results' => 'No Results Found.',
|
||||
'page-title' => 'Bagisto - Search'
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'title' => 'Title',
|
||||
'add-review-page-title' => 'Add Review',
|
||||
|
|
@ -122,6 +127,9 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'empty' => 'You don\'t have any saved addresses here, please create a new one by clicking the link below.',
|
||||
'create' => 'Create Address',
|
||||
'delete' => 'Delete',
|
||||
'make-default' => 'Make Default',
|
||||
'default' => 'Default'
|
||||
],
|
||||
|
||||
'create' => [
|
||||
|
|
@ -140,6 +148,10 @@ return [
|
|||
'page-title' => 'Customer - Edit Address',
|
||||
'title' => 'Edit Address',
|
||||
'submit' => 'Edit Address'
|
||||
],
|
||||
'delete' => [
|
||||
'success' => 'Address Successfully Deleted',
|
||||
'failure' => 'Address Cannot Be Deleted'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -16,62 +16,65 @@
|
|||
<span class="back-icon"><a href="{{ route('customer.account.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.address.index.title') }}</span>
|
||||
|
||||
@if(!$address->isEmpty())
|
||||
<span class="account-action">
|
||||
<a href="{{ route('customer.address.edit') }}">
|
||||
{{ __('shop::app.customer.account.address.index.edit') }}
|
||||
</a>
|
||||
</span>
|
||||
@if(!$addresses->isEmpty())
|
||||
<span class="account-action">
|
||||
<a href="{{ route('customer.address.create') }}">{{ __('shop::app.customer.account.address.index.add') }}</a>
|
||||
</span>
|
||||
@else
|
||||
<span></span>
|
||||
<span></span>
|
||||
@endif
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
<div class="account-table-content">
|
||||
@if($address->isEmpty())
|
||||
@if($addresses->isEmpty())
|
||||
<div>{{ __('shop::app.customer.account.address.index.empty') }}</div>
|
||||
<br/>
|
||||
<a href="{{ route('customer.address.create') }}">{{ __('shop::app.customer.account.address.index.add') }}</a>
|
||||
@else
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.address1') }}</td>
|
||||
<td>{{ $address['address1'] }}</td>
|
||||
</tr>
|
||||
<div class="address-holder">
|
||||
@foreach($addresses as $address)
|
||||
<div class="address-card">
|
||||
{{-- <div class="control-group">
|
||||
<label class="radio-container">
|
||||
<input class="control" type="radio" name="radio">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div> --}}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.address2') }}</td>
|
||||
<td>{{ $address['address2'] }}</td>
|
||||
</tr>
|
||||
<div class="details">
|
||||
<span class="bold">{{ auth()->guard('customer')->user()->name }}</span>
|
||||
<span>{{ $address['address1'] }}</span>
|
||||
<span>{{ $address['address2'] }}</span>
|
||||
<span>{{ $address['country'] }}</span>
|
||||
<span>{{ $address['state'] }}</span>
|
||||
<span>{{ $address['city'] }}</span>
|
||||
<span>{{ $address['postcode'] }}</span>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.country') }}</td>
|
||||
<td>{{ $address['country'] }}</td>
|
||||
</tr>
|
||||
<div class="control-links mt-20">
|
||||
<span>
|
||||
<a href="{{ route('customer.address.edit', $address['id']) }}"><i class="icon pencil-lg-icon"></i></a>
|
||||
</span>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.state') }}</td>
|
||||
<td>{{ $address['state'] }}</td>
|
||||
</tr>
|
||||
<span>
|
||||
<a href="{{ route('address.delete', $address['id']) }}"><i class="icon trash-icon"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.city') }}</td>
|
||||
<td>{{ $address['city'] }}</td>
|
||||
</tr>
|
||||
@if($address['default_address'] == 1)
|
||||
<span class="default-address badge badge-md badge-success">{{ __('shop::app.customer.account.address.index.default') }}</span>
|
||||
@else
|
||||
<div class="make-default mt-20">
|
||||
<a href="{{ route('make.default.address', $address['id']) }}" class="btn btn-md btn-primary">{{ __('shop::app.customer.account.address.index.make-default') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.address.create.postcode') }}</td>
|
||||
<td>{{ $address['postcode'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<span></span>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{{ route('customer.address.edit') }}">
|
||||
<form method="post" action="{{ route('customer.address.edit', $address['id']) }}">
|
||||
|
||||
<div class="account-table-content">
|
||||
@csrf
|
||||
|
|
|
|||
|
|
@ -1,25 +1,19 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.login-form.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="auth-content">
|
||||
|
||||
<div class="sign-up-text">
|
||||
{{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
|
||||
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('customer.session.create') }}">
|
||||
|
||||
<form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
|
||||
<div class="login-text">{{ __('shop::app.customer.login-text.title') }}</div>
|
||||
<div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email">{{ __('shop::app.customer.login-form.email') }}</label>
|
||||
|
|
@ -38,7 +32,6 @@
|
|||
</div>
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
|
||||
<div class="login-text">{{ __('shop::app.customer.signup-form.title') }}</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
|
|
@ -48,7 +47,7 @@
|
|||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="signup-confirm" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
{{-- <div class="signup-confirm" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'">
|
||||
<label class="checkbox-view" for="checkbox2"></label>
|
||||
|
|
@ -57,6 +56,14 @@
|
|||
</span>
|
||||
</span>
|
||||
<span class="control-error" v-if="errors.has('agreement')">@{{ errors.first('agreement') }}</span>
|
||||
</div> --}}
|
||||
<div class="control-group" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
|
||||
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'">
|
||||
<span>{{ __('shop::app.customer.signup-form.agree') }}
|
||||
<a href="">{{ __('shop::app.customer.signup-form.terms') }}</a> & <a href="">{{ __('shop::app.customer.signup-form.conditions') }}</a> {{ __('shop::app.customer.signup-form.using') }}.
|
||||
</span>
|
||||
<span class="control-error" v-if="errors.has('agreement')">@{{ errors.first('agreement') }}</span>
|
||||
</div>
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.signup-form.button_title') }}">
|
||||
|
|
|
|||
|
|
@ -15,11 +15,13 @@
|
|||
|
||||
<ul class="search-container">
|
||||
<li class="search-group">
|
||||
<input type="search" class="search-field" placeholder="Search for products">
|
||||
<form role="search" action="{{ route('shop.search.index') }}" method="GET" @submit.prevent="onSubmit" style="display: inherit;">
|
||||
<input type="search" name="term" class="search-field" placeholder="products, categories" v-validate="'required'">
|
||||
|
||||
<div class="search-icon-wrapper">
|
||||
<span class="icon icon-search"></span>
|
||||
</div>
|
||||
<div class="search-icon-wrapper">
|
||||
<button class="icon icon-search" class="background: none;"></button>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
<input type="hidden" id="rating" name="rating" v-validate="'required'">
|
||||
|
||||
{{-- <div class="control-error" v-if="errors.has('rating')">@{{ errors.first('rating') }}</div> --}}
|
||||
<div class="control-error" v-if="errors.has('rating')">@{{ errors.first('rating') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -110,20 +110,23 @@
|
|||
this.selectedProductId = attribute.options[attribute.selectedIndex].allowedProducts[0];
|
||||
}
|
||||
|
||||
var prevLink = $('#wishlist-changer').attr('href');
|
||||
if(this.selectedProductId != '') {
|
||||
var splitted = prevLink.split("/");
|
||||
@auth('customer')
|
||||
var prevLink = $('#wishlist-changer').attr('href');
|
||||
|
||||
var lastItem = splitted.pop();
|
||||
if(this.selectedProductId != '') {
|
||||
var splitted = prevLink.split("/");
|
||||
|
||||
lastItem = this.selectedProductId;
|
||||
var lastItem = splitted.pop();
|
||||
|
||||
var joined = splitted.join('/');
|
||||
lastItem = this.selectedProductId;
|
||||
|
||||
var newWishlistUrl = joined+'/'+lastItem;
|
||||
var joined = splitted.join('/');
|
||||
|
||||
$('#wishlist-changer').attr('href', newWishlistUrl);
|
||||
}
|
||||
var newWishlistUrl = joined+'/'+lastItem;
|
||||
|
||||
$('#wishlist-changer').attr('href', newWishlistUrl);
|
||||
}
|
||||
@endauth
|
||||
} else {
|
||||
attribute.selectedIndex = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.search.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
@if(!$results)
|
||||
{{ __('shop::app.search.no-results') }}
|
||||
@endif
|
||||
@endsection
|
||||
Loading…
Reference in New Issue