Recently, I ran into one of those projects that makes you question your own sanity. Where the documentation is limited, and everything you try should just work but it doesn’t. It required integrating Craft Commerce orders with a client’s instance of Microsoft AX — and we’re here today to document how it all goes down. May fewer folks suffer as we did.

Blue city street sign stating “E COMMERCE”
Blue city street sign stating “E COMMERCE”
Photo by Mark König on Unsplash

Let’s start with the good bits — what you need to get up and running with Craft CMS and Microsoft AX. Then we’ll take a dip into memory lane to talk about what didn’t work and why.

The Players

The…


If you’re abstracting your code and creating modular components — GOOD! You’re in the right place, and we’re less likely to make fun of you.

If not… well, why aren’t you?

A macbook, with the VSCode editor running, sits on a white table with some vibrant pots of live plants.
A macbook, with the VSCode editor running, sits on a white table with some vibrant pots of live plants.

Abstracting Your Templates

Abstraction is a key part of Object Oriented Programming (OOP), where complexity is broken down into segments (often called abstraction layers) in order to hide unnecessary information. The goal of abstraction is to keep only the relevant and necessary data within the purview of the logic at hand, while also providing enough human readibility to properly navigate the structure.

Think of abstraction like you would the back kitchen of…

Shawna O’Neal

Longtime Craft CMS developer and Clean Code practitioner. Analogy afficianado. Contents may include salt.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store