Magento: Empty Payment Html in Methods.phtml

Magento: Empty Payment Html in Methods.phtml

October 1, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: Empty Payment Html in Methods.phtml

Solving the Empty Payment Method Issue in Magento

If you’re experiencing an issue where your payment methods like “Bank Payment” or “Cash on Delivery” are missing their form HTML when selected during checkout in Magento, don’t worry—you’re not alone. This common problem can be easily resolved by understanding the flow of data and making a few strategic adjustments.

Understanding the Problem

The root cause lies in how Magento constructs its payment method forms. When you click on a payment method like “Bank Payment” or “Cash on Delivery”, the getPaymentMethodFormHtml function is called to generate the form HTML. However, for these specific methods, this function often returns an empty string due to a default configuration that needs to be updated.

Resolving the Issue

Step 1: Check Your Payment Method Configuration

Navigate to Admin > Stores > Payment Methods. Locate your problematic payment method and click on it. Under the “Payment Information” section, look for the field “New Order Status”. If it’s set to “Pending”, change it to “Processing”.

This setting determines when an order should be marked as complete after this payment method is selected. By changing it from “Pending” (which requires manual intervention) to “Processing” (which automatically completes the order), you ensure that all necessary data is populated during checkout.

Step 2: Update Your Payment Method Configuration

For some payment methods like “Bank Payment”, additional configuration may be required in the backend:

  1. Go to Admin > Stores > Settings > Configuration.
  2. Select your desired scope (global, website, or store view).
  3. In the left sidebar menu, go to Sales > Payment Methods.
  4. Find the configuration for your specific payment method under “Payment Methods”.
  5. Expand the section and fill in any required fields like bank details, fee settings, or other necessary information.

Step 3: Verify Your Configuration Files

Sometimes, the issue can stem from customizations made to the core Magento files. Make sure that you haven’t accidentally removed or modified the relevant code responsible for generating the form HTML in your theme’s overrides of app/design/frontend/<Vendor>/<Theme>/template/checkout/onepage/payment/methods.phtml.

To ensure your customization doesn’t interfere with the default behavior, consider implementing the changes via a child theme or a plugin using Magento 2’s extension mechanism as outlined on our blog: Handling Payment Settings in Magento.

Conclusion

By updating your payment method configuration and verifying your customizations, you should be able to resolve this common issue. Remember that accurate configuration is key to ensuring your payment methods function correctly during checkout.

If the issue persists after these steps, it may indicate a more complex problem requiring additional debugging or professional assistance. Our team at Laravel Company specializes in Magento development and can help you troubleshoot and resolve any technical challenges you might face.

Don’t let an empty payment form hold back your sales—take control of your checkout process today by following our guide and leveraging the full power of Magento’s flexible e-commerce platform.

Checkout Themes Admin Configuration

Our network