Closed kevinjavitz closed 1 year ago
Hello @salesigniter ,
Interesting, there should not be any difference in the display of the AP button dependent on product type unless the product is in a category that has been designated as restricted in the Amazon Pay configuration. And I don't believe the Amasty One Step Checkout module should be solely responsible for a conflict such as this; would you be able to provide a staging site where we could examine the behavior more closely?
Thanks, Spencer
Hi @sgabhart22 ,
I don't have an online staging site, but really it just requires to compare adding a regular product to cart which shows that express checkout button as shown in the screenshot, and then remove that product and add a virtual product (downloadable) to cart and checkout which does not show the shipping address section and therefor the express checkout button is not shown.
Thanks for the info, @salesigniter . After your explanation, I think the behavior might make sense regarding one-step checkout extensions, but it raises another interesting question about the nature of Express Checkout. One of the benefits of the Express Checkout flow is the automatic population of the shipping address and payment instrument. But with a virtual cart, the shipping step is omitted, and you'll be choosing the payment instrument (even if using Amazon Pay) in the payment section of a one-step checkout anyway. Even in a vanilla checkout (Luma theme), the Express Checkout button is not available at the billing/payment step of checkout when a customer has a virtual cart.
If a merchant sells virtual products and would like Amazon Pay to be available to customers to use as a payment method for these items, then enabling the Pay Now flow should take care of that even when using OSC extensions. This setting is found in the AP configuration under Advanced > Frontend > Amazon Pay in final checkout step. The customer will still need to enter their billing address manually, but will be able to use stored payment methods associated with their Amazon accounts.
If this solution is impossible or unfavorable for some reason, you should be able to either add some custom layouts/templates on top of the Amazon Pay module in order to add an Express Checkout button, or do the same to the Amasty OSC extension.
Please let us know if this helps, Spencer
@sgabhart22 thanks for this. yes that is exactly what I tried to do add some custom layout.xml so the button would show up but I still couldn't get it to show up. Can you tell me what custom layout to use in the checkout_index_index.xml file?
Hello again @salesigniter ,
In order to add an Express Checkout button to this area of the checkout, we need to add the amazon-button-region to the billing step in a checkout_index_index.xml file. If we put this in the 'before-login-form' region of 'customer-email', we can be sure it will only render in a virtual cart scenario since the email area is not rendered in the billing step of a physical cart.
Unfortunately this has a side effect of doubling the 'amazon-checkout-revert' component in the billing step, but we can use a layout processor to remove the duplicate. I created a small module called Amazon_AmastyAdapter including these customizations, and included the relevant files in a gist here: https://gist.github.com/sgabhart22/b344dfd092468eb9ea3bf0b481ebb1e2
Let me know if you have any further issues! Thanks, Spencer
Hi @salesigniter ,
Just wanted to check in and see if you had any success getting the AP button where you wanted it. Let us know if there's anything else we can do to help! Otherwise, we'll go ahead and close this issue in a couple weeks if we don't hear any more from you.
Thanks, Spencer
Hello @salesigniter
Closing this issue. Feel free to reopen if you are still facing this.
Your v2 module supports virtual products according to this thread. I have installed the latest version 5.14.1
With a regular product the amazon pay button shows: https://www.screencast.com/t/HIzWNLLEe
With virtual it does not: https://www.screencast.com/t/9VSni91JiUh
We use the latest version of Amasty One Step Checkout, but it seems it uses regular XML of checkout_index_index.xml so I don't think that's the problem.
Can you help so that the button shows up?
I have also emailed payments-cp-devel@amazon.com but have not heard back.
Your setup