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

Improve header user, cart and checkout #602

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented Oct 14, 2023

This PR makes several improvements to the WC header-actions.

Where Header actions
Default pages default-pages
Cart page cart-page
Checkout page checkout-page
Account pages account-page

Cart and checkout

  • Mini-cart and offcanvas cart have been removed on both pages.
  • If you are on cart-page, you are already in the cart and do not need cart twice.
  • Checkout is not AJAX updated, so it was possible to empty cart in checkout so far without updating the checkout. Now, the mini-cart is replaced by a simple back-to-cart button. No issues there anymore and buyers are forced to checkout instead clearing the cart ;-)

Account

  • User-toggler and offcanvas have been removed in all account pages. If you are on a account-page, you are already in the account and do not need account twice.
  • This allows us to simply include my-account.php and remove own my-offcanvas-account.php in a separate PR. my-offcanvas-account.php is used for unique id's but this is not needed anymore. Less to maintain.

<?php include get_template_directory() . '/woocommerce/myaccount/my-account-offcanvas.php'; ?>

Testing

Tested it on several live-shops and works fine. It's already live on bootscore.me. Go to the shop https://bootscore.me/shop/, add a product an go to cart and checkout and account https://bootscore.me/account/.

What else? Added deny direct access to those files as described here #367.

@justinkruit I made sure to make no changes in files changed here #575. So, there is no conflict with this PR. If you like it, merge it!

… mini-cart in checkout with back-to-cart button
@crftwrk crftwrk marked this pull request as draft October 14, 2023 11:00
@crftwrk crftwrk mentioned this pull request Oct 14, 2023
27 tasks
@crftwrk crftwrk marked this pull request as ready for review October 14, 2023 12:54
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

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

Looks good to me! We could even expand this behavior in #575 and add filters to the ifs to always show them without the need to change the template part.

@justinkruit justinkruit merged commit 042759b into main Oct 27, 2023
@justinkruit justinkruit deleted the Improve-header-user,-cart-and-checkout branch October 27, 2023 14:09
@justinkruit justinkruit mentioned this pull request Oct 27, 2023
@crftwrk
Copy link
Member Author

crftwrk commented Oct 27, 2023

We could even expand this behavior in #575 and add filters to the ifs to always show them without the need to change the template part.

Yes, I'm in 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants