In one page checkout I want to make one step instead two separate steps (default is one for shipping, one for payments methods). So I made changes in
checkout_index_index- removed payment-steps and moved
item name="payment" xsi:type="array"to shipping-step
LayoutProcessor.processchanged payment localization to shipping-step
getPaymentInformation()and sets block as visible
It worked out but I'm getting message that there are no payments. I think problem is in loading payments list. When are two steps, second step (this with payment) is loaded after clicking on button below shipping methods. This button
- sends address data to server (
setShippingInformation) by calling url
- get back payments list (and
- and then shows second step (
So before showing second step, payments are loaded from server. I could call this url
/rest/default/V1/guest-carts/xxxx/payment-information but it requires address data in parameters. So it looks like payments methods can be resolved only after address is filled? But I want to show payments methods just after loading without looking at address.
At the beginnig of
payments.js I noticed also this code
paymentService.setPaymentMethods(methodConverter(window.checkoutConfig.paymentMethods)); It looks like that this code also loads payments list, so maybe I can assign somewhere in php code payments list to
Does anybody known how do this?