Opencart Tutorial

All Articles >>
How to Specify Image Dimensions Opencart 2.0
Specifying image dimensions (width and height) will help to speed up your website. Now I will write about how to add the width and height attributes in image <img> tag  for opencart, and I'm using opencart version 2.0 for this tutorial. Add Image Dimension Function in System First step it will add image dimension function in system file, and it will add the function code to 'startup.php' in system folder. so open the startup.php file and add following code in the bottom of file: function imgSize($output) {    preg_match('/-[0-9]*x[0-9]*\.(gif|jpg|png|jpeg)/i', $out..
0 comments on this article - view comments
How to Create Extra Position in Opencart 2.0
A while back ago I have customer who bought my template for opencart version and want to have a module position above the column left or column right and the content. I know that it is not possible if using default opencart layout, so it will need to have extra layout position below the header. and the trick is I made a duplicate of content top position I give it name "content header" and put the position under the header. And now I will write some steps about how  to create the extra position with opencart version, so let’s begin! Catalog – Duplicate Controller file Now..
3 comments on this article - view comments
How to Add Thumb Image to Subcategory in Category Page
By default opencart the subcategories list in category page will be displayed as a text list without images. Now I'm gonna show you a few steps how to add thumbnail images above the category title.This tutorial applied to the default opencart theme and opencart version used is version is the steps:1. open file "catalog/controller/product/category.php" and find this code:$data['categories'][] = array(add this before the code above:if($result['image']) {$image = $this->model_tool_image->resize($result['image'], 200, 200); } else {$image = $this->model_tool_image->resize('..
7 comments on this article - view comments