¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -3,7 +3,7 @@
@section('title', trans('storefront::cart.cart'))
@section('content')
<cart-index inline-template v-cloak>
<cart-index inline-template>
<div>
<section class="shopping-cart-wrap">
<div class="container">
@@ -13,7 +13,6 @@
<div class="shopping-cart">
<div class="shopping-cart-inner">
@include('public.cart.index.cart_items')
@include('public.cart.index.coupon')
</div>
@include('public.cart.index.order_summary')

View File

@@ -18,24 +18,34 @@
<tbody>
<tr v-for="cartItem in cart.items" :key="cartItem.id">
<td>
<div class="product-image">
<a :href="productUrl(cartItem)" class="product-image">
<img
:src="baseImage(cartItem.product)"
:class="{ 'image-placeholder': ! hasBaseImage(cartItem.product) }"
alt="product image"
:src="baseImage(cartItem)"
:class="{ 'image-placeholder': !hasBaseImage(cartItem) }"
:alt="cartItem.product.name"
>
</div>
</a>
</td>
<td>
<a
:href="productUrl(cartItem.product)"
:href="productUrl(cartItem)"
class="product-name"
v-text="cartItem.product.name"
>
</a>
<ul class="list-inline product-options" v-cloak>
<ul v-cloak v-if="Object.values(cartItem.variations).length !== 0" class="list-inline product-options">
<li
v-for="(variation, key, index) in cartItem.variations"
:key="index"
>
<label>@{{ variation.name }}:</label>
@{{ variation.values[0].label }}@{{ index === Object.values(cartItem.variations).length - 1 ? "" : "," }}
</li>
</ul>
<ul v-cloak v-if="Object.values(cartItem.options).length !== 0" class="list-inline product-options">
<li v-for="option in cartItem.options">
<label>@{{ option.name }}:</label> @{{ optionValues(option) }}
</li>
@@ -53,23 +63,34 @@
<div class="number-picker">
<div class="input-group-quantity">
<button type="button" class="btn btn-number btn-minus" data-type="minus" :disabled="cartItem.qty == 1">
<i class="las la-angle-left"></i>
<button
type="button"
class="btn btn-number btn-minus"
:disabled="cartItem.qty <= 1"
@click="updateQuantity(cartItem, cartItem.qty - 1)"
>
-
</button>
<input
type="text"
:value="cartItem.qty"
min="1"
:max="cartItem.product.manage_stock ? cartItem.product.qty : ''"
:max="maxQuantity(cartItem)"
class="form-control input-number input-quantity"
@input="updateQuantity(cartItem, $event.target.value)"
@focus="$event.target.select()"
@input="changeQuantity(cartItem, Number($event.target.value))"
@keydown.up="updateQuantity(cartItem, cartItem.qty + 1)"
@keydown.down="updateQuantity(cartItem, cartItem.qty - 1)"
>
<button type="button" class="btn btn-number btn-plus" data-type="plus">
<i class="las la-angle-right"></i>
<button
type="button"
class="btn btn-number btn-plus"
:disabled="isQtyIncreaseDisabled(cartItem)"
@click="updateQuantity(cartItem, cartItem.qty + 1)"
>
+
</button>
</div>
</div>
@@ -82,7 +103,7 @@
</td>
<td>
<button class="btn-remove" @click="remove(cartItem)">
<button class="btn-remove" @click="removeCartItem(cartItem)">
<i class="las la-times"></i>
</button>
</td>

View File

@@ -9,68 +9,16 @@
<li>
<label>{{ trans('storefront::cart.subtotal') }}</label>
<span
class="price-amount"
v-html="cart.subTotal.inCurrentCurrency.formatted"
>
</span>
<span v-text="cart.subTotal.inCurrentCurrency.formatted"></span>
</li>
<li v-for="tax in cart.taxes">
<label v-text="tax.name"></label>
<span
class="price-amount"
v-html="tax.amount.inCurrentCurrency.formatted"
>
</span>
</li>
<li v-if="hasCoupon" v-cloak>
<label>
{{ trans('storefront::cart.coupon') }}
<span class="coupon-code">
[@{{ cart.coupon.code }}]
<span class="btn-remove-coupon" @click="removeCoupon">
<i class="las la-times"></i>
</span>
</span>
</label>
<span
class="price-amount"
v-html="'-' + cart.coupon.value.inCurrentCurrency.formatted"
>
</span>
<span v-text="tax.amount.inCurrentCurrency.formatted"></span>
</li>
</ul>
<div class="shipping-methods" v-if="hasShippingMethod" v-cloak>
<h6>{{ trans('storefront::cart.shipping_method') }}</h6>
<div class="form-group">
<div class="form-radio" v-for="shippingMethod in cart.availableShippingMethods">
<input
type="radio"
name="shipping_method"
v-model="shippingMethodName"
:value="shippingMethod.name"
:id="shippingMethod.name"
@change="updateShippingMethod(shippingMethod.name)"
>
<label :for="shippingMethod.name" v-text="shippingMethod.label"></label>
<span
class="price-amount"
v-html="shippingMethod.cost.inCurrentCurrency.formatted"
>
</span>
</div>
</div>
</div>
<div class="order-summary-total">
<label>{{ trans('storefront::cart.total') }}</label>
<span class="total-price" v-html="cart.total.inCurrentCurrency.formatted"></span>

View File

@@ -6,29 +6,29 @@
<a href="{{ route('cart.index') }}" class="step-tab-link">
<span class="step-tab-text">
{{ trans('storefront::cart.shopping_cart') }}
<span class="bg-text">01</span>
<span class="bg-text">{{ trans('storefront::cart.01') }}</span>
</span>
</a>
@else
<span class="step-tab-text">
{{ trans('storefront::cart.shopping_cart') }}
<span class="bg-text">01</span>
<span class="bg-text">{{ trans('storefront::cart.01') }}</span>
</span>
@endif
</li>
<li class="step-tab {{ request()->routeIs('checkout.create') ? 'active' : '' }}">
@if (request()->routeIs('cart.index') && Cart::hasAvailableShippingMethod())
@if (request()->routeIs('cart.index'))
<a href="{{ route('checkout.create') }}" class="step-tab-link">
<span class="step-tab-text">
{{ trans('storefront::cart.checkout') }}
<span class="bg-text">02</span>
<span class="bg-text">{{ trans('storefront::cart.02') }}</span>
</span>
</a>
@else
<span class="step-tab-text">
{{ trans('storefront::cart.checkout') }}
<span class="bg-text">02</span>
<span class="bg-text">{{ trans('storefront::cart.02') }}</span>
</span>
@endif
</li>
@@ -36,7 +36,7 @@
<li class="step-tab {{ request()->routeIs('checkout.complete.show') ? 'active' : '' }}">
<span class="step-tab-text">
{{ trans('storefront::cart.order_complete') }}
<span class="bg-text">03</span>
<span class="bg-text">{{ trans('storefront::cart.03') }}</span>
</span>
</li>
</ul>