Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
ce5dc3c09d
|
|
@ -51,7 +51,7 @@ class NewCustomerNotification extends Mailable
|
|||
public function build()
|
||||
{
|
||||
return $this->to($this->customer->email)
|
||||
->subject(trans('shop::app.mail.customer.subject'))
|
||||
->subject(trans('shop::app.mail.customer.new.subject'))
|
||||
->view('shop::emails.customer.new-customer')->with(['customer' => $this->customer, 'password' => $this->password]);
|
||||
}
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ class SubscriptionController extends Controller
|
|||
$subscriber = $this->subscribers->findOrFail($id);
|
||||
|
||||
try {
|
||||
$this->subscriber->delete($id);
|
||||
$this->subscribers->delete($id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Subscriber']));
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,32 @@ class CustomerController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$id = auth()->guard('customer')->user()->id;
|
||||
|
||||
$customer = $this->customer->findorFail($id);
|
||||
|
||||
try {
|
||||
$this->customer->delete($id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Customer']));
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Customer']));
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the view for the customer account panel, showing approved reviews.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
|||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Webkul\Customer\Mail\RegistrationEmail;
|
||||
use Webkul\Customer\Mail\VerificationEmail;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
|
@ -97,6 +98,15 @@ class RegistrationController extends Controller
|
|||
session()->flash('info', trans('shop::app.customer.signup-form.success-verify-email-unsent'));
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
Mail::queue(new RegistrationEmail(request()->all()));
|
||||
|
||||
session()->flash('success', trans('shop::app.customer.signup-form.success-verify')); //customer registered successfully
|
||||
} catch (\Exception $e) {
|
||||
session()->flash('info', trans('shop::app.customer.signup-form.success-verify-email-unsent'));
|
||||
}
|
||||
|
||||
|
||||
session()->flash('success', trans('shop::app.customer.signup-form.success'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
/**
|
||||
* Registration Mail class
|
||||
*
|
||||
* @author Prateek Srivastava
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class RegistrationEmail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $data;
|
||||
|
||||
public function __construct($data) {
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->to($this->data['email'])
|
||||
->from(env('SHOP_MAIL_FROM'))
|
||||
->subject(trans('shop::app.mail.customer.registration.customer-registration'))
|
||||
->view('shop::emails.customer.registration')->with('data', $this->data);
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ class VerificationEmail extends Mailable
|
|||
{
|
||||
return $this->to($this->verificationData['email'])
|
||||
->from(env('SHOP_MAIL_FROM'))
|
||||
->subject('Verification email')
|
||||
->subject(trans('shop::app.mail.customer.verification.subject'))
|
||||
->view('shop::emails.customer.verification-email')->with('data', ['email' => $this->verificationData['email'], 'token' => $this->verificationData['token']]);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ return [
|
|||
'class' => 'Webkul\Payment\Payment\CashOnDelivery',
|
||||
'active' => true,
|
||||
'sort' => 1,
|
||||
'default' => 'no'
|
||||
'default' => 'yes'
|
||||
],
|
||||
|
||||
'moneytransfer' => [
|
||||
|
|
@ -17,7 +17,7 @@ return [
|
|||
'class' => 'Webkul\Payment\Payment\MoneyTransfer',
|
||||
'active' => true,
|
||||
'sort' => 2,
|
||||
'default' => 'yes'
|
||||
'default' => 'no'
|
||||
],
|
||||
|
||||
'paypal_standard' => [
|
||||
|
|
|
|||
|
|
@ -210,6 +210,12 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
Route::post('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@update')->defaults('_config', [
|
||||
'redirect' => 'customer.profile.index'
|
||||
])->name('customer.profile.edit');
|
||||
|
||||
//Customer Profile Delete Form Store
|
||||
Route::post('profile/destroy', 'Webkul\Customer\Http\Controllers\CustomerController@destroy')->defaults('_config', [
|
||||
'redirect' => 'customer.profile.index'
|
||||
])->name('customer.profile.destroy');
|
||||
|
||||
/* Profile Routes Ends Here */
|
||||
|
||||
/* Routes for Addresses */
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class SubscriptionEmail extends Mailable
|
|||
{
|
||||
return $this->to($this->subscriptionData['email'])
|
||||
->from(env('SHOP_MAIL_FROM'))
|
||||
->subject('subscription email')
|
||||
->subject(trans('shop::app.mail.customer.subscription.subject'))
|
||||
->view('shop::emails.customer.subscription-email')->with('data', ['content' => 'You Are Subscribed', 'token' => $this->subscriptionData['token']]);
|
||||
}
|
||||
}
|
||||
|
|
@ -117,6 +117,7 @@ return [
|
|||
'verified' => 'Your Account Has Been Verified, Try To Login Now',
|
||||
'verify-failed' => 'We Cannot Verify Your Mail Account',
|
||||
'dont-have-account' => 'You Do Not Have Account With Us',
|
||||
'customer-registration' => 'Customer Registered Successfully'
|
||||
],
|
||||
|
||||
'login-text' => [
|
||||
|
|
@ -543,7 +544,40 @@ return [
|
|||
'thanks' => 'Thanks!'
|
||||
],
|
||||
'customer' => [
|
||||
'subject' => 'New Customer Registration'
|
||||
'new' => [
|
||||
'dear' => 'Dear :customer_name',
|
||||
'username-email' => 'UserName/Email',
|
||||
'subject' => 'New Customer Registration',
|
||||
'password' => 'Password',
|
||||
'summary' => 'Your account has been created in bagisto.
|
||||
Your account details are below: ',
|
||||
'thanks' => 'Thanks!',
|
||||
],
|
||||
|
||||
'registration' => [
|
||||
'subject' => 'New Customer Registration',
|
||||
'customer-registration' => 'Customer Registered Successfully',
|
||||
'dear' => 'Dear :customer_name',
|
||||
'greeting' => 'Welcome and thank you for registering at Bagisto!',
|
||||
'summary' => 'Your account has now been created successfully and you can login using your email address and password credentials. Upon logging in, you will be able to access other services including reviewing past orders, wishlists and editing your account information.',
|
||||
'thanks' => 'Thanks!',
|
||||
],
|
||||
|
||||
'verification' => [
|
||||
'heading' => 'Bagisto - Email Verification',
|
||||
'subject' => 'Verification Mail',
|
||||
'verify' => 'Verify Your Account',
|
||||
'summary' => 'This is the mail to verify that the email address you entered is yours.
|
||||
Kindly click the Verify Your Account button below to verify your account.'
|
||||
],
|
||||
|
||||
'subscription' => [
|
||||
'subject' => 'Subscription Email',
|
||||
'greeting' => ' Welcome to Bagisto - Email Subscription',
|
||||
'unsubscribe' => 'Unsubscribe',
|
||||
'summary' => 'Thanks for putting me into your inbox. It’s been a while since you’ve read Bagisto email, and we don’t want to overwhelm your inbox. If you still do not want to receive
|
||||
the latest email marketing news then for sure click the button below.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,11 @@
|
|||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
<a class="btn btn-lg btn-primary" @click = backToSavedBillingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<a class="btn btn-lg btn-primary" @click = backToSavedBillingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
|
|
@ -293,9 +295,11 @@
|
|||
<h1>{{ __('shop::app.checkout.onepage.shipping-address') }}</h1>
|
||||
|
||||
@auth('customer')
|
||||
<a class="btn btn-lg btn-primary" @click = backToSavedShippingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<a class="btn btn-lg btn-primary" @click = backToSavedShippingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.order-id') }} -</span>
|
||||
<span class="value">#{{ $invoice->order_id }}</span>
|
||||
<span class="value">#{{ $invoice->order->increment_id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
|||
|
|
@ -67,6 +67,18 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<accordian :title="'{{ __('shop::app.customer.account.profile.index.title') }}'" :active="true">
|
||||
<div slot="body">
|
||||
<div class="page-action">
|
||||
<form method="POST" action="{{ route('customer.profile.destroy') }}">
|
||||
@csrf
|
||||
<input type="submit" class="btn btn-lg btn-primary mt-10" value="Delete">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,15 +8,23 @@
|
|||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
Hi {{ $customer['name'] }}, your new account has been created in bagisto.
|
||||
Your account details are below
|
||||
{{ __('shop::app.mail.customer.new.dear', ['customer_name' => $customer['name']]) }},
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<b>UserName/Email</b> - {{ $customer['email'] }} <br>
|
||||
<b>Password</b> - {{ $password}}
|
||||
{!! __('shop::app.mail.customer.new.summary') !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<b> {!! __('shop::app.mail.customer.new.username-email') !!} </b> - {{ $customer['email'] }} <br>
|
||||
<b> {!! __('shop::app.mail.customer.new.password') !!} </b> - {{ $password}}
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.new.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<img src="{{ bagisto_asset('images/logo.svg') }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-weight: bold;font-size: 20px;color: #242424;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.dear', ['customer_name' => $data['first_name']. ' ' .$data['last_name']]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.customer.registration.greeting') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #5E5E5E;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.customer.registration.summary') }}
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -8,18 +8,18 @@
|
|||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
Welcome to Bagisto - Email Subscription
|
||||
{!! __('shop::app.mail.customer.subscription.greeting') !!}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Thanks for putting me into your inbox. It’s been a while since you’ve read Bagisto
|
||||
email, and we don’t want to overwhelm your inbox. If you still do not want to receive
|
||||
the latest email marketing news then for sure click the button below.
|
||||
{!! __('shop::app.mail.customer.subscription.summary') !!}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 40px; text-align: center">
|
||||
<a href="{{ route('shop.unsubscribe', $data['token']) }}" style="font-size: 16px;
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">Unsubscribe</a>
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">
|
||||
{!! __('shop::app.mail.customer.subscription.unsubscribe') !!}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,17 +8,18 @@
|
|||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
Bagisto - Email Verification
|
||||
{!! __('shop::app.mail.customer.verification.heading') !!}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
This is the mail to verify that the email address you entered is yours.
|
||||
Kindly click the 'Verify Your Account' button below to verify your account.
|
||||
{!! __('shop::app.mail.customer.verification.summary') !!}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 40px; text-align: center">
|
||||
<a href="{{ route('customer.verify', $data['token']) }}" style="font-size: 16px;
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">Verify Your Account</a>
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">
|
||||
{!! __('shop::app.mail.customer.verification.verify') !!}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue