¨4.0.1¨
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user