How to show product dimension details on opencart 3.x product detail page?

We had a customer recently asking us about OpenCart 3.x not showing product dimension data on the product details page & they couldn't find any answer for this in the OpenCart community or in the search engines. We took a glance at OpenCart 3.x codes and resolved the issue using following steps:

OpenCart has two file locations that generates product data:
1. Core file: public_html/Your-OpenCart-Installation-Path/catalog/controller/product/product.php
2. Theme path: public_html/Your-OpenCart-Installation-Path/catalog/view/theme/YourTheme/template/product/product.twig

Let's begin & hope you have a command session opened with you. Or you can do it using cPanel FileManager / FTP too:
1. Look for following codes in the core file: public_html/Your-OpenCart-Installation-Path/catalog/controller/product/product.php
$data['points'] = $product_info['points'];

2. Add following codes after the above codes:
$data['width'] = $product_info['width'];
$data['height'] = $product_info['height'];
Double check everything & save the file.

3. Open public_html/Your-OpenCart-Installation-Path/catalog/view/theme/YourTheme/template/product/product.twig and look for:
<li>{{ text_stock }} {{ stock }}</li>

4. Add following codes after the above lines:
<li>Dimension: {{ text_width }} {{ width }} x {{ text_height }} {{ height }}</li>
Save the file.

5. Log into OpenCart 3.x Admin area > Extensions/Modifications > Refresh

Check your product page, it must be showing the dimension details.
Note: You can add weight / length too using above steps. Make sure you have a backup of both the files we use above just to be safe.

Do you have a OpenCart website & looking for a best web hosting provider? Join us, we are here to help you & all our servers are Cloud servers. For more details, visit:


  • opencart 3x, opencart, dimension
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

What is WordPress and how to install WordPress?

To install WordPress on your hosting account automatically, please follow the steps given...

How to manually Install WordPress or other applications?

You can manually install WordPress, Joomla, Drupal and many PHP or CGI based applications on your...

How to upload my website files?

You can upload your website files quickly and easily using our tools:FileManager: cPanel >...

How to configure and access FTP to upload/manage my files?

You need to use following settings in your FTP:Hostname: your-domain-name.comUsername: cPanel...