Skip to content

Commit 6406d32

Browse files
committed
Added error message to shipping methods
1 parent 7e55888 commit 6406d32

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

resources/views/cart/queries/fragments/cart.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ fragment cart on Cart {
9999
carrier_code
100100
method_code
101101
method_title
102+
error_message
102103
amount {
103104
value
104105
}

resources/views/checkout/steps/shipping-method.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
v-if="!cart.is_virtual"
1818
>
1919
<fieldset class="flex flex-col gap-3" partial-submit="mutate" v-on:change="window.app.$emit('setShippingAddressesOnCart')">
20-
<label class="flex items-center p-5 border rounded relative bg-white" v-if="!cart.shipping_addresses?.[0]?.uid">
20+
<label class="flex items-center flex-wrap p-5 border rounded relative bg-white" v-if="!cart.shipping_addresses?.[0]?.uid">
2121
<span>@lang('Please enter a shipping address first')</span>
2222
</label>
2323
<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.shipping_addresses?.[0]?.available_shipping_methods">
@@ -35,6 +35,7 @@
3535
/>
3636
<span class="ml-1">@{{ method.method_title }}</span>
3737
<span v-if="method.amount.value">- @{{ method.amount.value | price }}</span>
38+
<span class="basis-full text-red-600" v-if="method.error_message" v-text="method.error_message"></span>
3839
</template>
3940
</label>
4041
</fieldset>

0 commit comments

Comments
 (0)