Commit f68b67a4 by Angel MAS

medio acordar con el vendedor

parent 3e82a44a
<?php
namespace Onestartup\Shop\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Onestartup\Shop\Model\ClientShop as Client;
class PaymentAcordarClient extends Notification
{
use Queueable;
protected $tipo;
protected $client;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($tipo, Client $client)
{
$this->tipo = $tipo;
$this->client = $client;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->greeting('¡Hola!')
->subject('Orden: Acordar con el vendedor '.env('APP_NAME'))
//->replyTo($this->interested->email, $this->interested->name)
->line('Un cliente elijió la opcion de acordar con el vendedor')
->line('Datos del cliente:')
->line('Nombre: '.$this->client->name.' '.$this->client->lastname)
->line('Telefono: '.$this->client->phone)
->line('Correo: '.$this->client->email);
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}
......@@ -86,6 +86,7 @@ Route::group(['middleware' => ['web']], function(){
Route::post('cart/payment', 'Onestartup\Shop\Controller\CartController@payment')->name('cart.payment');
Route::post('cart/paymentCash', 'Onestartup\Shop\Controller\CartController@paymentCash')->name('cart.paymentCash');
Route::post('cart/acordar', 'Onestartup\Shop\Controller\CartController@acordar')->name('cart.acordar');
Route::get('cart/update/{product_slug}/{quantity}', 'Onestartup\Shop\Controller\CartController@update')
->where('quantity', '[0-9]+')
......
......@@ -67,6 +67,10 @@ setlocale(LC_MONETARY, 'en_US');
@include('shop-public::forms.form-paypal')
<br>
<br>
@include('shop-public::forms.form-acordar')
<br>
</section>
......
<form action="{{route('cart.acordar')}}" method="POST">
{{ csrf_field() }}
<button type="submit">
Acordar con el vendedor: {{ money_format('%(#10n', ($total + $addres->shipping_price->cost)) }}
</button>
</form>
\ No newline at end of file
......@@ -64,6 +64,12 @@ $util = new Onestartup\Shop\Libs\Util();
</script>
@endif
@if(Session::has('acordar'))
<script type="text/javascript">
swal("Compra registrada", "Gracias! En breve nos comunicaremos contigo para cerrar la venta", "success")
</script>
@endif
@if(Session::has('url_ficha'))
<script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment