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