-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rapidez v3 frontend finetuning (#126)
- Loading branch information
1 parent
6cc528c
commit 21b8627
Showing
24 changed files
with
155 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,4 @@ class="w-full sm:min-w-[350px]" | |
</template> | ||
</div> | ||
</graphql-mutation> | ||
</graphql-mutation> | ||
</graphql-mutation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 40 additions & 40 deletions
80
resources/views/checkout/partials/sections/payment.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
<graphql-mutation | ||
:query="config.queries.setPaymentMethodOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
code: cart.selected_payment_method.code, | ||
}" | ||
group="payment" | ||
:before-request="handleBeforePaymentMethodHandlers" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setPaymentMethodOnCart" | ||
v-slot="{ mutate, variables }" | ||
> | ||
<div partial-submit="mutate"> | ||
<div v-for="(method, index) in cart.available_payment_methods"> | ||
@include('rapidez-ct::checkout.partials.sections.payment.payment-methods') | ||
</div> | ||
<graphql-mutation | ||
:query="config.queries.setPaymentMethodOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
code: cart.selected_payment_method.code, | ||
}" | ||
group="payment" | ||
:before-request="handleBeforePaymentMethodHandlers" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setPaymentMethodOnCart" | ||
v-slot="{ mutate, variables }" | ||
> | ||
<div partial-submit="mutate"> | ||
<div v-for="(method, index) in cart.available_payment_methods"> | ||
@include('rapidez-ct::checkout.partials.sections.payment.payment-methods') | ||
</div> | ||
</graphql-mutation> | ||
<graphql query="{ checkoutAgreements { agreement_id name checkbox_text content is_html mode } }"> | ||
<div v-if="data?.checkoutAgreements?.length" class="mt-5 flex flex-col gap-y-4" slot-scope="{ data }"> | ||
<div v-for="agreement in data.checkoutAgreements"> | ||
<label | ||
class="text-ct-primary cursor-pointer text-sm underline" | ||
v-bind:for="agreement.checkbox_text" | ||
v-if="agreement.mode == 'AUTO'" | ||
> | ||
@{{ agreement.checkbox_text }} | ||
</label> | ||
<template v-else> | ||
@include('rapidez-ct::checkout.partials.sections.payment.agreement-checkbox') | ||
</template> | ||
<x-rapidez-ct::slideover id="agreement.checkbox_text"> | ||
<x-slot name="title"> | ||
@{{ agreement.name }} | ||
</x-slot> | ||
<div v-if="agreement.is_html" v-html="agreement.content"></div> | ||
<div v-else class="whitespace-pre-wrap" v-text="agreement.content"></div> | ||
</x-rapidez-ct::slideover> | ||
</div> | ||
</div> | ||
</graphql-mutation> | ||
<graphql query="{ checkoutAgreements { agreement_id name checkbox_text content is_html mode } }"> | ||
<div v-if="data?.checkoutAgreements?.length" class="mt-5 flex flex-col gap-y-4" slot-scope="{ data }"> | ||
<div v-for="agreement in data.checkoutAgreements"> | ||
<label | ||
class="text-ct-primary cursor-pointer text-sm underline" | ||
v-bind:for="agreement.checkbox_text" | ||
v-if="agreement.mode == 'AUTO'" | ||
> | ||
@{{ agreement.checkbox_text }} | ||
</label> | ||
<template v-else> | ||
@include('rapidez-ct::checkout.partials.sections.payment.agreement-checkbox') | ||
</template> | ||
<x-rapidez-ct::slideover id="agreement.checkbox_text"> | ||
<x-slot name="title"> | ||
@{{ agreement.name }} | ||
</x-slot> | ||
<div v-if="agreement.is_html" v-html="agreement.content"></div> | ||
<div v-else class="whitespace-pre-wrap" v-text="agreement.content"></div> | ||
</x-rapidez-ct::slideover> | ||
</div> | ||
</graphql> | ||
</div> | ||
</graphql> |
19 changes: 19 additions & 0 deletions
19
resources/views/checkout/partials/sections/success/features.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<x-rapidez-ct::card> | ||
<x-rapidez-ct::title.lg class="mb-5"> | ||
@lang('Success usps') | ||
</x-rapidez-ct::title.lg> | ||
<x-rapidez-ct::usp-list> | ||
<li> | ||
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-ct-accent" stroke-width="2.5" /> | ||
<span>@lang('Success usp 1')</span> | ||
</li> | ||
<li> | ||
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-ct-accent" stroke-width="2.5" /> | ||
<span>@lang('Success usp 2')</span> | ||
</li> | ||
<li> | ||
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-ct-accent" stroke-width="2.5" /> | ||
<span>@lang('Success usp 3')</span> | ||
</li> | ||
</x-rapidez-ct::usp-list> | ||
</x-rapidez-ct::card> |
13 changes: 8 additions & 5 deletions
13
resources/views/checkout/partials/shipping-billing-fields.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
<div> | ||
<dt>@lang('Subtotal')</dt> | ||
<dd>@{{ cart.prices.subtotal_including_tax.value | price }}</dd> | ||
<dd v-cloak>@{{ cart.prices.subtotal_including_tax.value | price }}</dd> | ||
</div> | ||
<div v-if="cart.prices.applied_taxes.length"> | ||
<dt>@lang('Tax')</dt> | ||
<dd>@{{ cart.prices.applied_taxes[0].amount.value | price }}</dd> | ||
<dd v-cloak>@{{ cart.prices.applied_taxes[0].amount.value | price }}</dd> | ||
</div> | ||
<div v-if="cart.shipping_addresses.length && cart.shipping_addresses[0]?.selected_shipping_method"> | ||
<dt> | ||
@lang('Shipping')<br> | ||
<small>@{{ cart.shipping_addresses[0]?.selected_shipping_method.carrier_title }} - @{{ cart.shipping_addresses[0]?.selected_shipping_method.method_title }}</small> | ||
<small v-cloak>@{{ cart.shipping_addresses[0]?.selected_shipping_method.carrier_title }} - @{{ cart.shipping_addresses[0]?.selected_shipping_method.method_title }}</small> | ||
</dt> | ||
<dd v-if="cart.shipping_addresses[0]?.selected_shipping_method.amount.value > 0">@{{ cart.shipping_addresses[0]?.selected_shipping_method.amount.value | price }}</dd> | ||
<dd v-cloak v-if="cart.shipping_addresses[0]?.selected_shipping_method.amount.value > 0">@{{ cart.shipping_addresses[0]?.selected_shipping_method.amount.value | price }}</dd> | ||
<dd v-else class="text-ct-enhanced font-medium"> | ||
@lang('Free') | ||
</dd> | ||
</div> | ||
|
||
<div v-for="discount in cart.prices.discounts"> | ||
<dt>@{{ discount.label }}</dt> | ||
<dd>-@{{ discount.amount.value | price }}</dd> | ||
<dt v-cloak>@{{ discount.label }}</dt> | ||
<dd v-cloak>-@{{ discount.amount.value | price }}</dd> | ||
</div> | ||
<div class="font-bold"> | ||
<dt>@lang('Total')</dt> | ||
<dd>@{{ cart.prices.grand_total.value | price }}</dd> | ||
<dd v-cloak>@{{ cart.prices.grand_total.value | price }}</dd> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
@php($checkoutSteps = config('rapidez.frontend.checkout_steps.' . config('rapidez.store_code')) ?: config('rapidez.frontend.checkout_steps.default')) | ||
<checkout-success> | ||
<div slot-scope="{ order, refreshOrder, hideBilling, shipping, billing, items }" dusk="checkout-success" class="container"> | ||
<div class="flex flex-wrap gap-1 items-baseline justify-between"> | ||
<x-rapidez-ct::layout class="mt-4 sm:mt-12"> | ||
<x-rapidez-ct::title> | ||
@lang('Thank you for your order') | ||
</x-rapidez-ct::title> | ||
</div> | ||
<x-rapidez-ct::sections> | ||
@include('rapidez-ct::checkout.partials.sections.success.order-completed-note') | ||
</x-rapidez-ct::sections> | ||
<x-rapidez-ct::sections> | ||
@include('rapidez-ct::checkout.partials.sections.success.order-info') | ||
@include('rapidez-ct::checkout.partials.sections.success.products') | ||
@include('rapidez-ct::checkout.partials.sections.success.newsletter') | ||
@includeWhen( | ||
config('rapidez.checkout-theme.checkout.success.register'), | ||
'rapidez-ct::checkout.partials.sections.success.create-account' | ||
) | ||
</x-rapidez-ct::sections> | ||
|
||
<x-rapidez-ct::sections> | ||
@include('rapidez-ct::checkout.partials.sections.success.order-completed-note') | ||
</x-rapidez-ct::sections> | ||
|
||
<x-rapidez-ct::sections> | ||
@include('rapidez-ct::checkout.partials.sections.success.order-info') | ||
@include('rapidez-ct::checkout.partials.sections.success.products') | ||
@include('rapidez-ct::checkout.partials.sections.success.newsletter') | ||
@includeWhen( | ||
config('rapidez.checkout-theme.checkout.success.register'), | ||
'rapidez-ct::checkout.partials.sections.success.create-account' | ||
) | ||
</x-rapidez-ct::sections> | ||
<x-slot:sidebar> | ||
@include('rapidez-ct::checkout.partials.sections.success.features') | ||
</x-slot:sidebar> | ||
</x-rapidez-ct::layout> | ||
</div> | ||
</checkout-success> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.