web analytics

Opencart 3.x – display Product Dimensions (L x W x H) on Product Page

Opencart 3.x – display Product Dimensions (L x W x H) on Product Page

is the most used application for online store. It offers several features for uploading and configuring the products. The level of customization you can do is quite extensive and there are many options you can use. One of the option is Product Dimensions.

The ‘Product Dimensions’ option is used to define length, width, and height of the product. This will be shown in product page. There is an issue with OpenCart 3.x, where it is not showing product dimension data on the product details page. Unfortunately, there was no clear answer or fix for this; in the OpenCart community or any other dev communities.

Here is how you can solve the issue; in just few minutes:

OpenCart has two file locations that generate 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

We need to edit those pages and you can use SSH command session or FileManager or FTP:
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; save the file:
<li>Dimension: {{ text_width }} {{ width }} x {{ text_height }} {{ height }}</li>

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

Now, when you check your product page, it will show the dimension details. Happy Selling!

: 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.

If you have a OpenCart website & looking for a best web hosting provider, Join Samnetworks.IN. They have incredible support team & super-fast Cloud servers. For more details, visit: https://www.samnetworks.in

Credits: https://www..in/clients/knowledgebase/33/How-to-show-product-dimension-details-on-opencart-3x-product-detail-page.html

Summary
Opencart 3.x - display Product Dimensions (L x W x H) on Product Page
Article Name
Opencart 3.x - display Product Dimensions (L x W x H) on Product Page
Description
OpenCart is the most used application for online store. It offers several features for uploading and configuring the products. The level of customization you can do is quite extensive and there are many options you can use. One of the option is Product Dimensions.
Author
Publisher Name
SoftcareCS
Publisher Logo
blank
SNR

Linux & Windows Geek, Blogger & System Administrator

Leave your message

Scroll Up