Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"and use a different e-mail address.": "en gebruik een ander e-mailadres.",
"Back to account": "Terug naar account",
"Back to cart": "Terug naar winkelwagen",
"This product it out of stock, remove it to continue your order.": "Dit product is niet op voorraad, verwijder het om verder te gaan met je bestelling.",
"Back to credentials": "Terug naar inloggegevens",
"Back to dashboard": "Terug naar dashboard",
"Back to login": "Terug naar inloggen",
Expand Down
3 changes: 3 additions & 0 deletions resources/views/cart/partials/product/description.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<div v-for="option in item.customizable_options">
@{{ option.label }}: @{{ option.values[0].label || option.values[0].value }}
</div>
<div class="text-red-600" v-if="!canOrderCartItem(item)">
@lang('This product it out of stock, remove it to continue your order.')
</div>
<div v-for="option in config.cart_attributes">
<template v-if="item.product.attribute_values?.[option] && typeof item.product.attribute_values[option] === 'object'">
@{{ option }}: <span v-html="item.product.attribute_values[option]?.join(', ')"></span>
Expand Down
17 changes: 11 additions & 6 deletions resources/views/cart/partials/sidebar/summary.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@
<dd>@{{ cart.prices.grand_total.value | price }}</dd>
</div>
</x-rapidez-ct::separated-listing>

<x-rapidez-ct::button.enhanced :href="route('checkout')" class="flex w-full items-center justify-center gap-1 mt-6" dusk="checkout">
@lang('To checkout')
<x-heroicon-o-arrow-right class="h-4" />
</x-rapidez-ct::button.enhanced>

<div class="w-full" :class="{ 'cursor-not-allowed': !canOrder }">
<x-rapidez-ct::button.enhanced
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the disabled attribute not better suited for this instead of pointer-events-none?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this button has a href, this is a <a href and not a button. The disabled attribute does not work for a link.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right!

Copy link
Collaborator

@jordythevulder jordythevulder Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what if we replaced the "continue" button with a button that removes the "Out of stock" products. "Remove out of stock products" for example. Or doesn't that functionality cover the scope of this user story?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, create a story for it.

:href="route('checkout')"
class="flex w-full items-center justify-center gap-1 mt-6"
v-bind:class="{ 'pointer-events-none': !canOrder }"
dusk="checkout"
>
@lang('To checkout')
<x-heroicon-o-arrow-right class="h-4" />
</x-rapidez-ct::button.enhanced>
</div>
<div class="mt-4 flex items-center justify-center gap-1 text-center text-sm">
<x-heroicon-o-check class="h-5 text-ct-accent" />
@lang('Ordered within 2 minutes')
Expand Down
Loading