Add custom positions to OpenCart header: step-by-step
July 18, 2026 · 5 min read

Out of the box OpenCart gives every layout four module positions — two columns, content top and content bottom. The header is not one of them. If you want a promo bar, a phone number block or a trust badge row in the header, you add a position yourself. It takes one controller edit and one template edit.
Step 1: load modules in the header controller
The header is rendered by its own controller: catalog/controller/common/header.php. Inside, load the modules assigned to your new position name and pass them to the template — the code mirrors how content_top does it in catalog/controller/common/content_top.php, with the position name swapped for your own, for example header_extra.
Keep the name lowercase with underscores — it must match what you'll query from the layout tables.
Step 2: print the position in the header template
Open your theme header template — catalog/view/theme/YOUR_THEME/template/common/header.twig — and output the modules where you want them, the same way content_top.twig loops over its modules variable. Place it above or below the menu depending on the design.
Step 3: make the position assignable in admin
For the admin layout editor to offer your position in its dropdown, the position list in the layout edit view needs your new entry. Add it next to the four standard ones in the admin layout template, then assign any module to "Header Extra" on the layouts you need.
Package all three edits as an OCMOD/ ocmod.xml modification instead of editing core files directly — updates will not wipe your work, and you can turn the change off from the Modifications screen.
The header humans see vs the store agents see
A polished header helps the visitors who browse. A growing share of buyers never see it — AI agents shop your store through data, not pixels. Run the free 30-second scan at dreamvention.com/scan to see how your OpenCart store looks to them.
Ready to automate your OpenCart store?
You know OpenCart inside out. The next step is turning your store into an AI salesperson that never sleeps — answering buyers, building carts and taking orders while you run the business.
Learn about agentic commerceGet AI Commerce Tips
5 expert tips to grow your store with AI agents.
No spam — unsubscribe with one reply.
Read next

Forgot OpenCart admin password? 3-step recovery guide
Locked out of OpenCart admin? Here are 3 ways to r…
Read →
Disable OpenCart language autodetect: quick fix
Stop OpenCart forcing languages on visitors. How t…
Read →
OpenCart layouts explained: complete guide (2026)
OpenCart layouts control your store's page structu…
Read →Put a sales agent on your store
It knows your catalog, recommends, takes orders — on your site and in ChatGPT. Built for you — live in days, not months.
