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 resources/views/cart/queries/fragments/cart.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ fragment cart on Cart {
carrier_code
method_code
method_title
error_message
amount {
value
}
Expand Down
21 changes: 17 additions & 4 deletions resources/views/checkout/steps/shipping-method.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
<label class="flex items-center p-5 border rounded relative bg-white" v-if="!cart.value.shipping_addresses?.[0]?.uid">
<span>@lang('Please enter a shipping address first')</span>
</label>
<label class="flex items-center gap-x-1.5 p-5 border rounded bg-white cursor-pointer text-sm text" v-for="(method, index) in cart.value.shipping_addresses?.[0]?.available_shipping_methods">
<label class="flex gap-x-1.5 p-5 border rounded bg-white text-sm text has-[[disabled]]:cursor-not-allowed" v-for="(method, index) in cart.value.shipping_addresses?.[0]?.available_shipping_methods">
<template v-if="false"></template>
@stack('shipping_methods')

@stack('shipping_methods')

<template v-else>
<x-rapidez::input.radio.base
name="shipping_method"
Expand All @@ -32,9 +34,20 @@
data-testid="shipping-method"
v-on:change="mutate"
required
class="mr-1"
/>
<span class="ml-1">@{{ method.method_title }}</span>
<span v-if="method.amount.value">- @{{ price(method.amount.value) }}</span>
<span class="flex flex-col">
<span>
<span v-if="method.method_title" class="font-medium">
@{{ method.method_title }}
</span>
<span v-else class="font-medium">
@{{ method.carrier_title }}
</span>
<span v-if="method.amount.value"> - @{{ price(method.amount.value) }}</span>
</span>
<span class="basis-full text-muted" v-if="method.error_message" v-text="method.error_message"></span>
</span>
</template>
</label>
</fieldset>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.