-
Notifications
You must be signed in to change notification settings - Fork 11
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
[3.x] GraphQL checkout #503
Conversation
Merge master in graphql-checkout
Merged, feedback is still appreciated. Maybe @Jade-GG or @BobWez98? Internal reference RAP-980 was created to process possible feedback on this. But with this we can proceed with other things depending on this. While reviewing; think about upgrading and keep an eye on the upgrade guide: https://docs.rapidez.io/3.x/upgrading.html |
/resources/views/cart/queries/*.graphql | ||
/resources/views/cart/queries/**/*.graphql | ||
/resources/views/checkout/queries/*.graphql | ||
/resources/views/checkout/queries/**/*.graphql | ||
/resources/views/customer/queries/*.graphql | ||
/resources/views/customer/queries/**/*.graphql |
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.
Just one line isn't possible?
@@ -0,0 +1,156 @@ | |||
fragment cart on Cart { | |||
id | |||
# TODO: Check if virtual orders are working |
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.
This is checked and can be removed?
|
||
<div v-if="cart.shipping_addresses[0]" class="flex w-full flex-col gap-x-1 border p-3 rounded"> | ||
<p class="font-lg mb-2 font-bold text-neutral"> | ||
{{-- TODO: Check this compare as uid might not what we want but there is not anything else in the cart response --}} |
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.
Do we need to do something with this?
@if (!$checkoutAgreements->count()) | ||
@return | ||
@endif |
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.
We can change this with rapidez/blade-directives#17 and bump the version to 0.7.0
:callback="handlePlaceOrder" | ||
mutate-event="placeOrder" | ||
redirect="{{ route('checkout.success') }}" | ||
{{-- :error-callback="alert" --}} |
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.
Errors are already handled?
Don't forget the older unresolved conversations |
customer?.id
will no longer be available.This can be replaced with Rapidez' loggedIn property.
If backwards compatibility is not a factor,
user.is_logged_in
can be usedany
config.queries.cart
or@include('rapidez::cart.queries.cart')
need to be moved as the graphql file has been changed to a fragment.The newly added auth guard for the cart can be used to ensure someone has an active cart:
middleware('auth:magento-cart')
Both token and mask have been moved into cookies, it is now possible to use
middleware('auth:magento-cart')
andmiddleware('auth:magento-customer')
on web routes.Removed hasOnlyVirtualItems from cart, use cart.is_virtual instead.
Removed VirtualItems from cart, as this was only used to determine hasOnlyVirtualItems.
InteractWithUser has been removed, use the
stores/useUser
insteadSupport dropped for Laravel 10
Support dropped for Magento <2.4.7