This commit is contained in:
parent
f857c40ca2
commit
d1ee94e5c4
@ -49,7 +49,7 @@ export const useCheckout = createSharedComposable(() => {
|
||||
]
|
||||
|
||||
const currentCheckoutStep
|
||||
= ref(checkoutSteps.find(value => value.title === route.path.split('/').pop()) || checkoutSteps[0])
|
||||
= ref(checkoutSteps.find(value => value.route === route.path.split('/').pop()) || checkoutSteps[0])
|
||||
|
||||
function previewStep() {
|
||||
if (isPickupPointSelected.value && !isMobile.value) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="cart">
|
||||
<div class="cart__items">
|
||||
<div v-if="cart.line_items.length > 0" class="cart__items">
|
||||
<div
|
||||
v-for="cartItem in cart?.line_items"
|
||||
:key="cartItem.variation_id"
|
||||
@ -9,7 +9,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<PayBlock :is-summary="true" />
|
||||
<div v-else>
|
||||
Корзина пока что пуста
|
||||
</div>
|
||||
|
||||
<ClientOnly>
|
||||
<PayBlock :is-summary="true" />
|
||||
</ClientOnly>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,7 +28,7 @@ const { cart, cartRemoveAllItems } = useCart()
|
||||
const { checkoutContacts, checkoutPickupPoint } = useCheckout()
|
||||
|
||||
onMounted(async () => {
|
||||
if (!route?.query?.ID)
|
||||
if (!route?.query?.ID || cart.value.line_items.length === 0)
|
||||
return
|
||||
|
||||
await $fetch('/api/create', {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user