карты пвз
All checks were successful
Deploy / build (push) Successful in 6m4s

This commit is contained in:
alsaze 2025-11-13 16:41:12 +03:00
parent f857c40ca2
commit d1ee94e5c4
2 changed files with 10 additions and 4 deletions

View File

@ -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) {

View File

@ -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', {