Case study · Industrial distribution

Three years of upgrades on a store wired to P21 and UPS

Who this is for For a distributor on Adobe Commerce or Magento whose store talks to its ERP and its carriers, and who keeps putting off upgrades because each one might break them.

The store reached us on Magento 2.3.6, close to the end of its support, with a P21 connection, a custom UPS module and a stack of extensions that any upgrade could break. We moved it to 2.4.5 on a new server and patched it through 2.4.6-p6. When an upgrade broke something, we fixed or replaced it. We also carried the store through UPS's move from its old API to REST, and turned on a content security policy.

  • Industrial distribution
  • Survey and construction equipment
  • Magento Open Source
  • Epicor P21

Home / Case studies / Three years of upgrades on a store wired to P21 and UPS

The situation

  • A survey and construction equipment distributor on Magento Open Source, connected to Epicor P21 for products and orders, with UPS rates at checkout.
  • The store ran Magento 2.3.6, and support for the 2.3 line ended in September 2022.
  • When UPS could not quote a rate, buyers saw 'no quotes available' and nothing else. In 2024 UPS began retiring the API the store used for rates.

What we connected

  1. 1Buyers to Magento Open Source: a rate, or UPS's reason for none
  2. 2Between Magento Open Source and Epicor P21: products and orders, through each upgrade
  3. 3Magento Open Source to Our UPS module: the shipping address and weight
  4. 4Our UPS module to UPS REST API: rate requests
  5. 5Our UPS module to UPS XML API: rate requests, before the move (before, now gone)

What changed

  • Off an unsupported release lineFrom 2.3.6 to 2.4.5 on a new server in December 2022, then 2.4.6-p3, -p5 and -p6 by July 2024
  • Hosting costAbout half the monthly hosting cost within a month of the move, after the cloud services were scaled down
  • The P21 import after an upgradeWhen the paid import extension started rejecting P21 rows, it was replaced with our own import jobs within two weeks
  • Breaks after an upgradeAdd to cart and product pages fixed within days of the 2.4.6-p3 release, by pinning the theme module to a version that worked
  • UPS's move to RESTRates kept coming when UPS retired its old API: Adobe's REST patch applied and our UPS module made compatible
  • No quotes availableBuyers see UPS's own reason, such as a ZIP code that does not match the state, in place of 'no quotes available'
  • SecurityA content security policy turned on across the store, and the 2024 security patches applied
  • ExtensionsThird-party extensions kept working through each upgrade: patched, pinned to a working version or replaced
How we built it

A dry run first

We stepped the code from 2.3.6 through every release to 2.4.3 on a branch to see which modules broke, then targeted 2.4.5. We stood up a new server for it, deployed the upgrade branch there, tested it against a written list of checks, and cut over in December 2022. Then we scaled the on-demand cloud services down to what the store used, and reserved them for a year.

Patch releases as they came

From there each security release went to the dev server first and then to production. The store reached 2.4.6-p6 in July 2024.

When an extension broke

Upgrades broke some extensions. We patched what could be patched, pinned a theme module and a stock module to versions that worked, and replaced the paid import extension for P21 data with two scheduled jobs of our own.

UPS's move to REST

UPS retired the XML API the store used for rates. We applied Adobe's patch for the move to REST, then fixed the places where our UPS module leaned on code the patch had changed, so rates kept coming at checkout.

Telling buyers why

When UPS could not quote, it sent back a reason: a ZIP code that did not match the state, for example. The store showed 'no quotes available' instead. We passed UPS's message through to checkout, so the buyer can fix the address.

A content security policy

We turned on a content security policy and moved the store's inline scripts behind Magento's secure renderer, so the browser runs only the scripts the store allows.

The whole story

Where it started

The store came to us on Magento 2.3.6. Support for the 2.3 line was due to end in September 2022, and the store carried a lot that an upgrade could break: a deep connection to Epicor P21, a custom UPS module, a subscription module and more than a dozen third-party extensions.

The big jump

We did a dry run first, stepping the code through each release on a branch to find what broke. Then we built a new server for 2.4.5, deployed the upgrade there, tested it against a written list, and moved the store over in December 2022, a few months after 2.3 support had ended.

Every patch after

After that, each security release went to the dev server first and then to production: 2.4.6-p3 in January 2024, -p5 in April and -p6 in July. Not every one went cleanly. After 2.4.6-p3, add to cart stopped working until we pinned the theme module to an earlier version, and the import of P21 data started rejecting rows. When an extension broke, we patched it, pinned it or replaced it. The paid extension that imported P21 data was replaced with our own jobs.

UPS changes its API

In 2024 UPS retired the XML API the store used for shipping rates. We applied Adobe's patch for the move to REST, fixed our UPS module where it depended on what the patch changed, and rates kept coming at checkout.

Earlier we had changed what buyers see when UPS cannot quote. UPS sends a reason, and the store now shows it, so a buyer with the wrong ZIP code knows what to fix.