Fix checkout success page UX flow
- Reorder template conditional logic to show success page instead of error after order placement - Move orderPlaced state check before checkoutCart validation in CheckoutPage.vue - Resolves issue where users saw "Cart not found" error instead of success confirmation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7145af3f83
commit
813cc86b3d
1 changed files with 15 additions and 16 deletions
|
|
@ -5,6 +5,21 @@
|
|||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-primary"></div>
|
||||
</div>
|
||||
|
||||
<!-- Order Success State -->
|
||||
<div v-else-if="orderPlaced" class="text-center py-12">
|
||||
<CheckCircle class="w-16 h-16 text-green-600 mx-auto mb-4" />
|
||||
<h2 class="text-2xl font-bold text-green-600 mb-4">Order Placed Successfully!</h2>
|
||||
<p class="text-muted-foreground mb-6">Your order has been sent to the merchant. You'll receive updates as the order progresses.</p>
|
||||
<div class="flex gap-3 justify-center">
|
||||
<Button @click="$router.push('/market')" variant="outline">
|
||||
Continue Shopping
|
||||
</Button>
|
||||
<Button @click="$router.push('/market/dashboard')" variant="default">
|
||||
View My Orders
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Error State -->
|
||||
<div v-else-if="error || !checkoutCart" class="text-center py-12">
|
||||
<h2 class="text-2xl font-bold text-red-600 mb-4">Checkout Error</h2>
|
||||
|
|
@ -248,22 +263,6 @@
|
|||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<!-- Order Placed Success -->
|
||||
<Card v-if="orderPlaced">
|
||||
<CardContent class="text-center py-8">
|
||||
<CheckCircle class="w-16 h-16 text-green-600 mx-auto mb-4" />
|
||||
<h3 class="text-xl font-semibold text-foreground mb-2">Order Placed Successfully!</h3>
|
||||
<p class="text-muted-foreground mb-6">Your order has been sent to the merchant.</p>
|
||||
<div class="flex gap-3 justify-center">
|
||||
<Button @click="$router.push('/market')" variant="outline">
|
||||
Continue Shopping
|
||||
</Button>
|
||||
<Button @click="$router.push('/market/dashboard')" variant="default">
|
||||
View Orders
|
||||
</Button>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue