Skip to content
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

Merged
merged 218 commits into from
Oct 23, 2024
Merged

[3.x] GraphQL checkout #503

merged 218 commits into from
Oct 23, 2024

Conversation

royduin
Copy link
Member

@royduin royduin commented May 23, 2024

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 used

any config.queries.cart or @include('rapidez::cart.queries.cart') need to be moved as the graphql file has been changed to a fragment.

  • AmastyBundles.vue

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') and middleware('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 instead

Support dropped for Laravel 10
Support dropped for Magento <2.4.7

royduin and others added 30 commits November 1, 2023 09:36
Merge master in graphql-checkout
@royduin royduin marked this pull request as ready for review October 23, 2024 12:44
@royduin royduin merged commit a96c242 into master Oct 23, 2024
10 checks passed
@royduin royduin deleted the graphl-checkout branch October 23, 2024 12:47
@royduin
Copy link
Member Author

royduin commented Oct 23, 2024

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

Comment on lines +7 to +12
/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
Copy link
Member Author

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
Copy link
Member Author

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 --}}
Copy link
Member Author

@royduin royduin Oct 23, 2024

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?

Comment on lines +2 to +4
@if (!$checkoutAgreements->count())
@return
@endif
Copy link
Member Author

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" --}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors are already handled?

@royduin
Copy link
Member Author

royduin commented Oct 23, 2024

Don't forget the older unresolved conversations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants