How to fix mobile viewport on OpenCart

Confirm your store has a correct responsive viewport meta tag so it displays properly on phones and tablets.

Steps for OpenCart

  1. Locate your theme's header template, typically at catalog/view/theme/<your-theme>/template/common/header.twig (OpenCart 3+) or header.tpl (older versions).
  2. Search for 'viewport'. Add the correct tag in the <head> section if missing: <meta name="viewport" content="width=device-width, initial-scale=1">.
  3. Save the file and clear OpenCart's cache via Admin → Dashboard → the blue refresh button, or by deleting contents of system/storage/cache/.
  4. Verify with Google's Mobile-Friendly Test.
Official OpenCart documentation ↗
<meta name="viewport" content="width=device-width, initial-scale=1">

What is mobile viewport?

The viewport meta tag is a single line of HTML code that lives in the `<head>` of every page on your site. It tells mobile browsers how wide to render your page and how to scale it — essentially instructing phones and tablets to show your site at the right size instead of zooming way out and displaying a tiny desktop version. A correct responsive viewport tag looks like `<meta name="viewport" content="width=device-width, initial-scale=1">`. Without it, or with the wrong settings, your site can look broken, tiny, or unresponsive on mobile devices.

Google uses mobile-first indexing, meaning it primarily crawls and ranks your site based on how it looks and works on a mobile device. A missing or broken viewport tag signals to Google that your site is not mobile-friendly, which can directly suppress your rankings in search results. Beyond SEO, over half of all ecommerce traffic now comes from phones — a store that is hard to read or navigate on mobile loses customers at checkout, destroying conversion rates and revenue. Google's own Page Experience signals and Core Web Vitals scores also depend on correct mobile rendering, compounding the ranking impact.

See the complete Mobile viewport guide for every platform and the full background.

Not sure if your OpenCart store has this?

Run a free SEOLZ audit — we’ll find mobile viewport and every other issue across your whole site.

Scan my site free

Fix mobile viewport on another platform