Payment method sort order. Won't work

Payment method sort order. Won't work

September 9, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Payment method sort order. Won't work

Changing Payment Method Sort Order in Magento: A Step-by-Step Guide

Sorting payment methods is an essential part of managing your e-commerce site’s checkout process. However, many developers face challenges when trying to change the order of their payment modules. In this guide, we’ll walk you through the steps needed to sort your payment methods correctly.

Understanding Magento Payment Method Sort Order

In Magento, the sorting of payment methods is determined by two factors:

  1. The sort_order field in the database table core_config_data.
  2. The order of calls to getChildHtml() function in your template files.

The sort_order field allows you to set a numerical value for each payment method. Magento uses this value to determine the initial sort order when displaying payment methods.

Step 1: Update the sort_order Field

To change the sort order, first log into your Magento admin panel. Navigate to the System > Configuration section and select your desired store view from the upper right menu.

Go to Sales > Payment Methods in the left navigation menu. Locate the payment method you want to reorder (e.g., Cash on Delivery).

Click on the Edit button corresponding to that payment method. In the resulting configuration page, look for the Sort Order field under the General section.

Change the value of this field to the desired numerical order. For example, if you want Cash on Delivery to appear first:

  • Set Sort Order: 1
  • Click Save Config

Repeat these steps for all payment methods until you achieve your desired sort order in the configuration database.

Step 2: Update Your Payment Method Templates

Even after updating the sort_order values in the database, some themes may not reflect the changes immediately. This is often due to how the theme’s checkout template files are structured and called.

To ensure all payment methods appear in the correct order:

  1. Locate your payment method templates within your theme folder (usually at app/design/frontend/[theme]/template/payment/).
  2. Open the template file(s) responsible for rendering the payment dropdown or list.
  3. Find the line where getChildHtml() function is called to display the payment methods.

The call should look something like this:

<?php echo $this->getChildHtml('payment_methods') ?>

Replace it with the following, ensuring you include proper boolean parameters for the right context and order:

<?php echo $this->getChildHtml('payment_methods', true, true) ?>

This line tells Magento to render all child blocks (true) in the specified area (‘payment_methods’) and sort them by their sort_order values (also true).

Conclusion: Sorting Payment Methods in Magento

Changing the order of your payment methods requires updating both the database configuration and theme template files. Remember to flush your cache after making these changes for the modifications to take effect.

For more detailed information on customizing payment methods, check out our comprehensive guide on building payment extensions at Laravel Company. If you’re still facing issues, consider reaching out to our expert Magento developers for personalized assistance.

Don’t let sorting challenges slow down your e-commerce operations—follow these steps and maintain a smooth checkout experience for your customers.

Checkout Database Extensions Themes

Our network