Skip to content

OpenCart and Next.js: A Storefront Question

OpenCart runs on your server and already owns the catalogue, the cart and the checkout. Nothing here asks you to replace that. The question is whether the front end should still be its theme.

3 min read

OpenCart already gives you the things a hosted platform charges for: the catalogue, the cart, the checkout, your data on your own server, and no percentage on each order. None of that is in question here, and no part of this page suggests replacing it.

What is in question is narrower. OpenCart also renders your storefront, and that is the only part this decision is about.

What the theme is doing well

For a store that is a store, the default rendering path is fine. Product pages, category pages, search, cart. It is server-rendered HTML, it is cacheable, and a well-maintained theme on decent hosting is quick.

If that describes your site, the front end is not your problem and a rebuild would give you a similar page at considerable expense. Measure before deciding otherwise.

The measurement that comes first

Take the templates that carry revenue. Home, one category, one product page. Read field data rather than a lab score.

The causes of a slow page are specific and there are not many of them. On a PHP storefront the answer is very often a hero image the browser discovers late, a webfont blocking the paint, and a few scripts added over the years for analytics and chat. Those are theme-level fixes, they take about a week, and they cost a small fraction of replacing the front end.

Do that first. If the numbers come good, you have your answer and it did not involve a framework.

Where the front end genuinely needs to change

There is a real boundary, and it is not speed.

It is when the storefront has to do things a template is not a good container for. A configurator with real interaction. Filtering across a large catalogue that has to be fast and linkable. A logged-in area with its own behaviour. A design system shared with something that is not the store. Content that deserves its own rendering strategy rather than being a CMS page bolted to a cart.

At that point the question stops being about performance and becomes about what the front end is. The rendering model is the thing to understand first, because deciding which routes are static, which revalidate and which are dynamic is most of the design.

How it fits together

OpenCart keeps the catalogue, the cart, the checkout and the admin. Next.js renders the storefront and talks to OpenCart through its REST API, usually with a thin layer in front of it, because that API is shaped around the cart rather than around being a general content source.

Checkout stays where it is in most versions of this. The payment integrations and order handling already work, and moving them is a separate decision with its own risk.

The move goes route by route. The templates that carry traffic first, everything else still served by OpenCart, and a written note of which system answers which URL. That is how we scope this kind of work, and the URL map is the first thing agreed rather than the last.

When to leave it alone

A store that is a store. Nobody in-house who writes JavaScript. Products that turn over faster than the code does. An extension set that works and that somebody understands.

A theme somebody maintains beats a storefront nobody owns, and the second is what you have twelve months after a rebuild that came with no handover.

Related questions

Does OpenCart support a headless storefront?
It has a REST API, and it is oriented around the catalogue and the cart rather than around being a general content source. For a storefront that is often enough. Where a project needs more, the usual answer is a thin API layer in front of OpenCart rather than changing OpenCart itself.
Is our theme the reason the site is slow?
Sometimes, and it is worth proving before acting. Measure the templates that carry revenue on field data. Very often the causes are a hero image discovered late, a font blocking the paint, and a handful of scripts, and all three are fixable in the theme in a week for a fraction of a rebuild.
What happens to checkout?
It stays on OpenCart in most versions of this, which keeps the payment integrations and the order handling you already have working. Replacing the checkout is a separate decision with its own risk, and there is rarely a reason to take both at once.
Can we move one template at a time?
Yes, and it is the sensible order. Put the new front end in front of the templates that carry traffic, leave the rest served by OpenCart, and decide per route which system answers. Running on two systems for a while is cheaper than a launch date that has to carry everything.

Back to all articles