cart move to wishlist issue resolved
This commit is contained in:
parent
11746a9ca6
commit
cf2610f239
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=675532589d017eb0ed04",
|
||||
"/js/velocity.js": "/js/velocity.js?id=eded4243db3e3a003186",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
|
||||
"/css/velocity.css": "/css/velocity.css?id=4109f5e05451bbc83138"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@
|
|||
|
||||
{{ isActive ? 'favorite' : 'favorite_border' }}
|
||||
</i>
|
||||
|
||||
<span style="vertical-align: super;" v-html="text"></span>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script type="text/javascript">
|
||||
export default {
|
||||
props: [
|
||||
'text',
|
||||
'active',
|
||||
'addClass',
|
||||
'addedText',
|
||||
|
|
@ -33,6 +36,7 @@
|
|||
'removeText',
|
||||
'isCustomer',
|
||||
'productSlug',
|
||||
'moveToWishlist',
|
||||
],
|
||||
|
||||
data: function () {
|
||||
|
|
@ -78,6 +82,10 @@
|
|||
this.isActive ? this.addedText : this.removeText
|
||||
);
|
||||
|
||||
if (this.moveToWishlist) {
|
||||
window.location.href = this.moveToWishlist;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -116,28 +116,18 @@
|
|||
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
|
||||
])
|
||||
@else
|
||||
<a
|
||||
class="unset"
|
||||
href="{{ route('shop.movetowishlist', $item->child->id) }}"
|
||||
onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">
|
||||
|
||||
<wishlist-component
|
||||
active="false"
|
||||
add-class="align-vertical-top">
|
||||
</wishlist-component>
|
||||
|
||||
<span class="align-vertical-top">
|
||||
{{ __('shop::app.layouts.wishlist') }}
|
||||
</span>
|
||||
</a>
|
||||
@include('shop::products.wishlist', [
|
||||
'route' => route('shop.movetowishlist', $item->child->id),
|
||||
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
|
||||
])
|
||||
@endif
|
||||
@endauth
|
||||
|
||||
@guest('customer')
|
||||
@include('shop::products.wishlist')
|
||||
<span class="align-vertical-top">
|
||||
{{ __('shop::app.checkout.cart.move-to-wishlist') }}
|
||||
</span>
|
||||
@include('shop::products.wishlist', [
|
||||
'isMoveToWishlist' => route('shop.checkout.cart.remove', ['id' => $item->id]),
|
||||
'text' => "<span class='align-vertical-top'>$moveToWishlist</span>"
|
||||
])
|
||||
@endguest
|
||||
|
||||
<a
|
||||
|
|
|
|||
|
|
@ -30,9 +30,12 @@
|
|||
<wishlist-component
|
||||
active="false"
|
||||
is-customer="false"
|
||||
text="{{ $text ?? null }}"
|
||||
product-id="{{ $product->id }}"
|
||||
item-id="{{ $item->id ?? null}}"
|
||||
product-slug="{{ $product->url_key }}"
|
||||
add-class="{{ $addWishlistClass ?? '' }}"
|
||||
move-to-wishlist="{{ $isMoveToWishlist ?? null}}"
|
||||
added-text="{{ __('shop::app.customer.account.wishlist.add') }}"
|
||||
remove-text="{{ __('shop::app.customer.account.wishlist.remove') }}">
|
||||
</wishlist-component>
|
||||
|
|
|
|||
Loading…
Reference in New Issue