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

Restore Quote when clicking browser back button #14

Merged
merged 10 commits into from
Jun 5, 2024

Conversation

Dinwy
Copy link
Collaborator

@Dinwy Dinwy commented May 29, 2024

Description

This pull request addresses critical issues and improvements for the Komoju Payments module in Magento, focusing on webhook error fixes, code cleanup, and enhanced payment flow.

Key Changes

  • Restore Quote

    • Added RestoreQuoteFromSession observer to restore the quote when user click browser back button
  • Webhook Error Fixes:

    • Resolved issues causing webhook failures on ping.
  • Code Cleanup:

    • Removed redundant code and improved readability.

Videos

  • Clicking the browser back button will restore quote(It was making the cart empty before)
komoju-magento_bacButton_behaviour.mp4

@Dinwy Dinwy force-pushed the feature/restoreQuote branch from a2f2831 to 41ae462 Compare May 29, 2024 06:56
@Dinwy Dinwy changed the title WIP: Restore Quote when clicking browser back button Restore Quote when clicking browser back button May 29, 2024
use Magento\Quote\Api\CartRepositoryInterface;
use Psr\Log\LoggerInterface;

class RestoreQuoteFromSession implements ObserverInterface
Copy link
Member

Choose a reason for hiding this comment

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

@Dinwy We should add some module documentation here explaining why this class exists.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for the feedback! I will add a document for this module. WIP

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rramsden I've added doc block and documentation for events and observers
Please check and let me know how you think!

Copy link
Member

@rramsden rramsden 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 but the observer module needs more documentation since you had to describe what it does to me on call.

@Dinwy Dinwy changed the title Restore Quote when clicking browser back button WIP: Restore Quote when clicking browser back button May 31, 2024
@Dinwy Dinwy changed the title WIP: Restore Quote when clicking browser back button Restore Quote when clicking browser back button May 31, 2024
@Dinwy Dinwy merged commit b30ad93 into degica:master Jun 5, 2024
2 checks passed
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.

2 participants