Magento checkout

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Magento checkout is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Customize Magento 2 checkout — payment methods, shipping carriers, totals collectors, and checkout UI. Use when building custom payment/shipping integrations or modifying the checkout flow.

How to use this skill

Skill file

Magento 2 Checkout Customization

Before writing code

Fetch live docs:

  1. Web-search site:developer.adobe.com commerce php tutorials frontend custom-checkout for checkout customization tutorials
  2. Web-search site:developer.adobe.com commerce php tutorials frontend custom-checkout add-payment-method for payment method tutorial
  3. Web-search site:developer.adobe.com commerce php development components checkout for checkout architecture

Conceptual Architecture

Checkout Flow

Two-step checkout built with UI Components + KnockoutJS:

  1. Shipping Step — address, shipping method selection
  2. Payment & Review Step — payment method selection, order review, place order

Quote Model

The central data structure during checkout:

Payment Methods

Three Categories

| Type | Description |

|------|-------------|

| Gateway | Data passes through Magento to processor (Stripe, Braintree) |

| Offline | No external provider (Check/Money Order, Bank Transfer, COD) |

| Hosted | Redirects to external payment page (PayPal Redirect) |

Implementation Components

  1. Payment Model — uses Payment Gateway Command pattern with Magento\Payment\Model\Method\Adapter as a virtual type (recommended). Note: Magento\Payment\Model\Method\AbstractMethod is deprecated; avoid for new payment methods.
  2. Config Provider — implements ConfigProviderInterface, returns JS config for checkout
  3. JS Renderer — KnockoutJS component rendering the payment form in checkout
  4. di.xml — register config provider into composite config provider
  5. system.xml/config.xml — admin configuration fields for enabling/configuring the method

Payment Gateway Command Pattern

Modern approach (since 2.1) with configurable command chain:

Shipping Methods

Carrier Implementation

Shipping carriers extend Magento\Shipping\Model\Carrier\AbstractCarrier:

Totals Collectors

What Totals Collectors Do

Calculate order totals (subtotal, shipping, tax, discount, grand total):

Collector Order

Collectors run in sequence. Standard order: subtotal → discount → shipping → tax → grand_total. Custom collectors must declare their position relative to existing ones.

Checkout UI Customization

Layout Modification

Checkout layout is defined in checkout_index_index.xml. Modify via:

Custom Checkout Steps

Add entire new steps via JavaScript UI components registered in the checkout layout.

Best Practices

Fetch the checkout customization tutorials for exact class signatures, XML configurations, and JS component patterns before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.