-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update templates and steps to support V3 #118
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6669a87
Update templates and steps to support V3
indykoning 0a73938
Add success container
indykoning e3a870f
Ensure payment_method composers are triggered
indykoning 1f09d7d
Translation checker workflow (#123)
Jade-GG 99999cf
Update Core requirement
indykoning 9128ab3
Merge branch 'master' of github.com:rapidez/checkout-theme into featu…
indykoning 6a4ecb0
Disable checkout button and add notice if not in stock
BobWez98 26a2524
Added translations
BobWez98 af0db21
span to div
BobWez98 5b561b4
Rename submit fieldsets function
indykoning 05430c2
[3.x] Disable checkout button and add notice if not in stock
BobWez98 1597a1d
Changed breakpoints and checkout fixes (#125)
Roene-JustBetter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 was deleted.
Oops, something went wrong.
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 @@ | ||
@include('rapidez-ct::checkout.pages.credentials') |
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 @@ | ||
@include('rapidez-ct::checkout.pages.login') |
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 @@ | ||
@include('rapidez-ct::checkout.pages.payment') |
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,15 +1,3 @@ | ||
Vue.component('checkout-address', () => import('./components/CheckoutAddress.vue')) | ||
Vue.component('checkout-success-addresses', () => import('./components/CheckoutSuccessAddresses.vue')) | ||
Vue.component('address-card', () => import('./components/AddressCard.vue')) | ||
|
||
Vue.mixin({ | ||
computed: { | ||
billingAndShippingAreTheSame() { | ||
if (this.$root.checkout.shipping_address?.customer_address_id) { | ||
this.$root.checkout.hide_billing = this.$root.checkout.shipping_address?.customer_address_id == this.$root.checkout.billing_address?.customer_address_id | ||
} | ||
|
||
return this.$root.checkout.hide_billing | ||
} | ||
} | ||
}) | ||
Vue.component('address-card', () => import('./components/AddressCard.vue')) |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<x-rapidez-ct::title-progress-bar> | ||
@lang('Cart') | ||
</x-rapidez-ct::title-progress-bar> | ||
<div class="flex flex-wrap gap-1 items-baseline justify-between"> | ||
<x-rapidez-ct::title> | ||
@lang('Cart') | ||
</x-rapidez-ct::title> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
@extends('rapidez::layouts.app') | ||
|
||
@section('title', __('Checkout')) | ||
|
||
@section('robots', 'NOINDEX,NOFOLLOW') | ||
|
||
@section('content') | ||
<div class="container"> | ||
<x-rapidez-ct::layout class="mt-8 sm:mt-14"> | ||
<x-rapidez-ct::title-progress-bar :href="route('cart')" :$checkoutSteps :$currentStep :$currentStepKey> | ||
@lang('Credentials') | ||
</x-rapidez-ct::title-progress-bar> | ||
|
||
<form | ||
class="contents" | ||
v-on:submit.prevent="(e) => { | ||
submitFieldsets(e.target?.form ?? e.target) | ||
.then((result) => | ||
window.app.$emit('checkout-credentials-saved') | ||
&& window.Turbo.visit(window.url('{{ route('checkout', ['step' => 'payment']) }}')) | ||
).catch(); | ||
}" | ||
> | ||
@include('rapidez-ct::checkout.steps.credentials') | ||
<x-rapidez-ct::toolbar> | ||
<x-rapidez-ct::button.outline :href="route('cart')"> | ||
@lang('Back to cart') | ||
</x-rapidez-ct::button.outline> | ||
|
||
<x-rapidez-ct::button.accent loader> | ||
@lang('Next') | ||
</x-rapidez-ct::button.accent> | ||
</x-rapidez-ct::toolbar> | ||
</form> | ||
<x-slot:sidebar> | ||
@include('rapidez-ct::checkout.partials.sidebar.sidebar') | ||
</x-slot:sidebar> | ||
</x-rapidez-ct::layout> | ||
</div> | ||
@endsection |
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,31 @@ | ||
@extends('rapidez::layouts.app') | ||
|
||
@section('title', __('Checkout')) | ||
|
||
@section('robots', 'NOINDEX,NOFOLLOW') | ||
|
||
@section('content') | ||
<div class="container"> | ||
<x-rapidez-ct::title-progress-bar :href="route('cart')" :$checkoutSteps :$currentStep :$currentStepKey> | ||
@lang('Credentials') | ||
</x-rapidez-ct::title-progress-bar> | ||
|
||
<form | ||
v-if="hasCart" | ||
v-on:submit.prevent="(e) => { | ||
submitFieldsets(e.target?.form ?? e.target) | ||
.then((result) => | ||
window.Turbo.visit(window.url('{{ route('checkout', ['step' => 'credentials']) }}')) | ||
).catch(); | ||
}" | ||
class="max-w-md mx-auto" | ||
v-cloak | ||
> | ||
@include('rapidez-ct::checkout.steps.login') | ||
|
||
<x-rapidez-ct::button.accent loader type="submit" dusk="continue" class="mt-3"> | ||
@lang('Next') | ||
</x-rapidez-ct::button.accent> | ||
</form> | ||
</div> | ||
@endsection |
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,30 @@ | ||
@extends('rapidez::layouts.app') | ||
|
||
@section('title', __('Checkout')) | ||
|
||
@section('robots', 'NOINDEX,NOFOLLOW') | ||
|
||
@section('content') | ||
<div class="container"> | ||
<x-rapidez-ct::layout class="mt-8 sm:mt-14"> | ||
<x-rapidez-ct::title-progress-bar :href="route('checkout', ['step' => 'credentials'])" :$checkoutSteps :$currentStep :$currentStepKey> | ||
@lang('Payment') | ||
</x-rapidez-ct::title-progress-bar> | ||
<form | ||
class="contents" | ||
v-on:submit.prevent="(e) => { | ||
submitFieldsets(e.target?.form ?? e.target) | ||
.then((result) => | ||
window.app.$emit('checkout-payment-saved') | ||
&& window.app.$emit('placeOrder') | ||
).catch(); | ||
}" | ||
> | ||
@include('rapidez-ct::checkout.steps.payment_method') | ||
</form> | ||
<x-slot:sidebar> | ||
@include('rapidez-ct::checkout.partials.sidebar.sidebar') | ||
</x-slot:sidebar> | ||
</x-rapidez-ct::layout> | ||
</div> | ||
@endsection |
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,19 +1,56 @@ | ||
<div class="grid gap-5 lg:grid-cols-2"> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="isType('billing', userAddress)" | ||
v-bind:shipping="isType('shipping', userAddress)" | ||
v-bind:check="isType('billing', userAddress) || isType('shipping', userAddress)" | ||
class="w-full sm:min-w-[350px]" | ||
> | ||
<x-rapidez-ct::button.link v-if="!isType('shipping', userAddress)" v-on:click.prevent="select('shipping', userAddress)"> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
<x-rapidez-ct::button.link v-if="!isType('billing', userAddress)" v-on:click.prevent="select('billing', userAddress)"> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
<graphql-mutation | ||
:query="config.queries.setExistingShippingAddressesOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.shipping_addresses[0]?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setShippingAddressesOnCart" | ||
v-slot="setShippingAddress" | ||
> | ||
<div> | ||
<graphql-mutation | ||
:query="config.queries.setExistingBillingAddressOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.billing_address?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setBillingAddressOnCart" | ||
v-slot="setBillingAddress" | ||
> | ||
<div> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="setBillingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:shipping="setShippingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:check="setBillingAddress.variables.customer_address_id === userAddress.id || setShippingAddress.variables.customer_address_id === userAddress.id" | ||
class="w-full sm:min-w-[350px]" | ||
> | ||
<x-rapidez-ct::button.link | ||
v-if="!cart.is_virtual && setShippingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setShippingAddress.variables, 'customer_address_id', userAddress.id) && setShippingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setShippingAddress.mutating}" | ||
> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
|
||
<x-rapidez-ct::button.link | ||
v-if="setBillingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setBillingAddress.variables, 'customer_address_id', userAddress.id) && setBillingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setBillingAddress.mutating}" | ||
> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
</div> | ||
</graphql-mutation> | ||
</div> | ||
</graphql-mutation> | ||
</div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Form with contents, i know this fixes the styling but this isn't really the way to go in my opinion. Ill put it on my list to look at this and tag you whenever i have a counter suggestion! [For internal ref: RAP-790]