Added view event manager to checkout and cart page
This commit is contained in:
parent
e7c5c373e2
commit
33a75c306d
|
|
@ -33,16 +33,28 @@
|
|||
|
||||
<div class="item-details">
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-title">
|
||||
<a href="{{ url()->to('/').'/products/'.$item->product->url_key }}">
|
||||
{{ $item->product->name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.name.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="price">
|
||||
{{ core()->currency($item->base_price) }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.price.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if ($item->type == 'configurable')
|
||||
|
||||
<div class="summary">
|
||||
|
|
@ -51,6 +63,12 @@
|
|||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.options.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="misc">
|
||||
<div class="control-group" :class="[errors.has('qty[{{$item->id}}]') ? 'has-error' : '']">
|
||||
<div class="wrap">
|
||||
|
|
@ -76,6 +94,8 @@
|
|||
@endauth
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
@if (! cart()->isItemHaveQuantity($item))
|
||||
<div class="error-message mt-15">
|
||||
* {{ __('shop::app.checkout.cart.quantity-error') }}
|
||||
|
|
@ -87,6 +107,8 @@
|
|||
@endforeach
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
|
||||
|
||||
<div class="misc-controls">
|
||||
<a href="{{ route('shop.home.index') }}" class="link">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>
|
||||
|
||||
|
|
@ -102,11 +124,17 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="right-side">
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
|
||||
|
||||
@include('shop::checkout.total.summary', ['cart' => $cart])
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,42 +22,63 @@
|
|||
<div class="dropdown-header">
|
||||
<p class="heading">
|
||||
{{ __('shop::app.checkout.cart.cart-subtotal') }} -
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.subtotal.before', ['cart' => $cart]) !!}
|
||||
|
||||
{{ core()->currency($cart->base_sub_total) }}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.subtotal.after', ['cart' => $cart]) !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-content">
|
||||
@foreach ($items as $item)
|
||||
{{-- @if ($item->type == "configurable") --}}
|
||||
<div class="item">
|
||||
<div class="item-image" >
|
||||
<?php
|
||||
if ($item->type == "configurable")
|
||||
$images = $productImageHelper->getProductBaseImage($item->child->product);
|
||||
else
|
||||
$images = $productImageHelper->getProductBaseImage($item->product);
|
||||
?>
|
||||
<img src="{{ $images['small_image_url'] }}" />
|
||||
</div>
|
||||
|
||||
<div class="item-details">
|
||||
{{-- @if ($item->type == "configurable")
|
||||
<div class="item-name">{{ $item->child->name }}</div>
|
||||
@else --}}
|
||||
<div class="item-name">{{ $item->name }}</div>
|
||||
{{-- @endif --}}
|
||||
|
||||
@if ($item->type == "configurable")
|
||||
<div class="item-options">
|
||||
{{ trim(Cart::getProductAttributeOptionDetails($item->child->product)['html']) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="item-price">{{ core()->currency($item->base_total) }}</div>
|
||||
|
||||
<div class="item-qty">Quantity - {{ $item->quantity }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-image" >
|
||||
<?php
|
||||
if ($item->type == "configurable")
|
||||
$images = $productImageHelper->getProductBaseImage($item->child->product);
|
||||
else
|
||||
$images = $productImageHelper->getProductBaseImage($item->product);
|
||||
?>
|
||||
<img src="{{ $images['small_image_url'] }}" />
|
||||
</div>
|
||||
|
||||
<div class="item-details">
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-name">{{ $item->name }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if ($item->type == "configurable")
|
||||
<div class="item-options">
|
||||
{{ trim(Cart::getProductAttributeOptionDetails($item->child->product)['html']) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-price">{{ core()->currency($item->base_total) }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-qty">Quantity - {{ $item->quantity }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.after', ['item' => $item]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,10 +61,17 @@
|
|||
|
||||
<div class="item-details">
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-title">
|
||||
{{ $product->name }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.price') }}
|
||||
|
|
@ -74,6 +81,11 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.price.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.quantity') }}
|
||||
|
|
@ -83,13 +95,19 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
@if ($product->type == 'configurable')
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
|
||||
|
||||
<div class="summary" >
|
||||
|
||||
{{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }}
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue