amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

fix: Fix visibility of billing address form #1117

Closed ptylek closed 2 years ago

ptylek commented 2 years ago

Fixes visibility of billing address form.

Current

  1. Assuming that the address is valid, when payment step is loaded, we can see:
    • Address details
    • Button to edit address
    • Opened address form
    • Buttons to update address or cancel editing

Expected

  1. Assuming that the address is valid, when payment step is loaded, we can see:
    • Address details
    • Button to edit address
    • You can click the edit button to toggle address form and update/cancel buttons

This MR applies changes that are more in line with original Magento template and it fixes the issue above.

Additional details about this PR

sgabhart22 commented 2 years ago

Hello @ptylek ,

We're having trouble reproducing the issue on a vanilla 2.4.2 installation. Would you be able to provide us some more detailed information about the environment where you're seeing the address form always being displayed on the payment step? Or, ideally, a staging URL or live site where we could see the behavior? Thanks!

Spencer

jamieolney commented 2 years ago

@ptylek We had the same issue on our site too. Thanks for the fix.

ptylek commented 2 years ago

@sgabhart22 Hi, sure. The environment is Magento ver. 2.4.3-p1. Unfortunately, I don't have staging URL to share.

sgabhart22 commented 2 years ago

@ptylek I'm still unable to reproduce the issue you've seen, but I have tested the fix on various 2.3 and 2.4 environments, both locally and on a couple of our test environments. Everything seems to be working just fine, and it's probably a good idea for us to keep our templates closer to the current templates in Magento core anyway. We won't merge this PR directly, but I've cherry picked your commit into a branch of our repo and created a PR here: https://github.com/BearGroup/amazon-payments-magento-2-plugin/pull/39

This will be included in an upcoming release once approved and merged. We'll close this PR for now, thanks a lot for the contribution! And thank you @jamieolney as well for the feedback!