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

Checkout frontend tweaks and resolved checkout header issue #630

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

jordythevulder
Copy link
Contributor

Small frontend tweaks.

Resolved checkout header issue where the "regular" checkout header is rendered when url had checkout/*

indykoning
indykoning previously approved these changes Nov 5, 2024
@royduin
Copy link
Member

royduin commented Nov 5, 2024

So what issue did you have with the header?

@jordythevulder
Copy link
Contributor Author

So what issue did you have with the header?

Issue was:

  • Cart had" regular header" (this is correct) with url /cart
  • Checkout credentials had "checkout header" (this is correct) with url /checkout
  • Checkout Payment had "regular header" (INCORRECT) with url /checkout/payment
  • When navigating back to step credentials, also then credentials had "Regular header" (INCORRECT) with url /checkout/credentials

Had to change the is() function to the already existing routeIs() function

@royduin
Copy link
Member

royduin commented Nov 5, 2024

Ah I see, but routeIs() check the route name and is() checks the url. Not sure if that's tested everywhere? Maybe payment providers do add additional checkout/* routes?

All checkout steps do get the checkout name:

Route::get('checkout/{step?}', config('rapidez.routing.controllers.checkout'))->middleware('auth:magento-cart')->name('checkout');

But the success page does have checkout.success as route name:

Route::get('checkout/success', config('rapidez.routing.controllers.checkout-success'))->name('checkout.success');

Wildcards can also be used: https://laravel.com/docs/master/requests#inspecting-the-request-path

@royduin royduin merged commit 4d24b1c into master Nov 6, 2024
7 of 11 checks passed
@royduin royduin deleted the feature/v3-core-checkout-fixes branch November 6, 2024 15:57
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.

5 participants