карты пвз
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 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) {

View File

@ -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>
<div v-else>
Корзина пока что пуста
</div>
<ClientOnly>
<PayBlock :is-summary="true" /> <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', {