Home Blog Page 5

How to set free shipping, flat rate shipping, shipping as per item, or pick from a store in Opencart?

In this Opencart tips and tricks, we are showing you to set different shipping methods like free shipping on Opencart, similarly flat rate shipping, shipping rate as per item, free shipping after some amount is reached on total orders, pick from store setup, flat rate up to 100 and then free shipping and so on. We are using Opencart 4.0.1.1 version for demo purposes but it is similar to other Opencart versions. Let’s start with a free shipping setup.

How to set up free shipping in the Opencart store?

To set up the free shipping, log into the admin section >> Extensions >> Extensions >> select Shipping, where you will see lists of available shipping extensions, install the “Free Shipping” extension if it is not installed, after that click the edit and you will see a form like below where you can enter total as 0, select the geo zone as “All Zones”, toggle to enable the status and sort order to 0 and click the blue button to save the setting. With this your free shipping extension is active.

free shipping opencart

Now, when someone checkout, they will see the free checkout option on the Shipping methods.

Free shipping method Opencart

Read more: Set up taxes with geocodes US tax for California residents 8.75%

How to set up a flat shipping rate in the Opencart store?

You can set the flat shipping rate similar to the free shipping, log into admin >> Extensions >> Extensions >> select Shipping >> install “Flat rate” extension and edit it. You will see a form like below, where you enter the amount in the Cost field for flat shipping.

Flat shipping rate Opencart

Now, let’s set up a combination of free shipping and flat-rate shipping.

Read more: Show multiple flat rates shipping as per total

How to set up free shipping for over $100 and for below it will be $5 flat-rate shipping?

First, we need to install both free shipping and flat rate extensions, which you can do like above. Once extensions are installed, then edit the free shipping extension and enter the setting in the form as shown below, the only change is the Total field is set to 100. That 100 is the sub-total amount needed before the free shipping module becomes active.

free shipping after 100

You can set the flat rate cost of 5 and you are good to go. Now free shipping is shown only when the sub-total reached 100.

How to set the shipping rate per item?

in some cases, you need to set the shipping rate per item, in that case, also Opencart provides default extensions, log into admin >> Extensions >> Extensions >> select Shipping >> install “Per Item” extension and enter the cost for each item.

Per item shipping Opencart

With this now if you order two items then shipping will be 20. Here is one example, we order 2 Macbooks and the shipping is 20.

Shipping rate calculation per item

How do you can set up pick up from the store shipping in the Opencart store?

Similar to other extensions, you can install the “Pickup From Store” extension and edit it, enable the status and you will see the Pick up from store option in shipping methods.

Pick from store Opencart setting

How to set up a weight-based shipping rate?

First, you need to set up weight classes and then add the weight for each product. Once the weight is added for products you can use the weight-based shipping rate. You can install the “Weight Based Shipping” extension, edit it and you will set up the general options like below:

weight based shipping

Learn about: What is ‘Zone Shipping’ and how do we set it up?

You will see a general tab and other Zone shipping tabs. In the general tab, select the tax class, enable the status and enter the sort order as you like to show in the Shipping methods. In the Zone shipping let’s select the UK shipping tab, you can enter the rates in the format of weight:cost comma weight:cost and enable the status. Here is an example:

weight based shipping rate

Let’s say your weight setting is Kilogram at Settings >> Local tab >> Weight class. Then, with that rate setting, it means that 5 kilograms of product cost 10 and 10 kilograms, and more costs 15. So you can set those options as many as you want.

In this way, you can set shipping methods in Opencart. Please let us know if you have any questions or comments so that we can add extra topics. You can follow us at our Twitter account @rupaknpl, subscribe to our YouTube channel for opencart tutorials, and click to see all Opencart user manuals.

OpenCart Google reCAPTCHA, how to show in the contact us page?

With advancement of versions OpenCart is using best opensource like bootstrap, flex slider, Magnific Popup: Responsive jQuery Lightbox Plugin, OWL Carousel, font awesome and for captcha now it is using Google reCAPTCHA, in this blog post we will show you how to set it up in contact us page so captcha is easy for human and tough for the bots and in part 2 I will show how to make it work in registration page.

Go to the link below to see how to set up in OpenCart version 2.3.0.1
https://webocreation.com/set-google-recaptcha-basic-captcha-opencart-2-3-0-1

What do you mean by Google reCAPTCHA?
reCAPTCHA is a free service to protect your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease. Get more details from https://www.google.com/recaptcha/intro/index.html

How does it work?
It is demonstrated by the following videos.

Now let’s move with OpenCart.

How to set it up in OpenCart?

  1. Go to https://www.google.com/recaptcha/admin (login with Gmail account if not) and enter your Label(Any name) and domain name(website URL).
     
google recaptcha for opencart
Google Recaptcha for opencart

When you click the Register button, you will get the site key and secret key.

OpenCart site key and secret key of google reCaptcha
OpenCart site key and secret key of google reCaptcha

Now go to the admin section of OpenCart site and go to System >> Setting and edit your store and go to Google tab.

opencart google recaptcha

Go to contact us page and you will see that Google ReCaptcha is activated.

Activate google reCaptcha at OpenCart Contact us page
Activate google reCaptcha at OpenCart Contact us page

Now in Part 2, we will discuss how to show google reCAPTCHA at other pages like at registration page.
Part II: OpenCart is using Google reCAPTCHA, let set it up in registration page Part 2

Manage Admin dashboard in Opencart 4, add and remove widgets

In this Opencart user manual, we are showing about the dashboard in the administration area of Opencart, right now there are 8 default widgets provided by Opencart: Recent Activity, Sales Analytics, Total Customers, World Map, People Online, Total Orders, Latest Orders, and Total Sales.

When you login in the admin section then you can see the dashboard with some widgets like below:

Dashboard widgets on Opencart admin

How to enable and disable Dashboard widgets in the Opencart admin section?

You can enable and disable those widgets as per your needs. Please go to admin >> Extensions >> Extensions >> Choose the extension type >> Dashboard.

Dashboard widgets Opencart

When you edit the widgets then you can see the settings like the image below:

Dashboard widget settings Opencart

The width is the size of the widget, the total width is 12 and we can resize the width of widgets as per our need. Here you can select the status to enable and disable the widget. Also, we can sort order the widgets as well.

There are 8 widgets to show in Opencart Dashboard:

Recent Activity

You can activate the reporting of recent activity from the admin >> System >> Settings >> edit the store >> then in the Options tab >> find the Customers Activity and select Yes. Once you activate then you start seeing customer recent activities. You can see details of reporting in Opencart here.
https://webocreation.com/reports-whos-online-and-statistics-reports-in-opencart-3/

Sales Analytics

Sales analytics shows the sales chart for orders and customers.

Total Customers

Total customers show the total number of customer

World Map

The World map shows the numbers of orders and sales total on the map of the country.

People Online

People online shows the number of people is that are online now if yours just always says zero well it may be true there may only be zero people online at the time or your settings is not logging the people online, you can see admin >> System >> Settings >> Option tab >> Account section and select Yes for customers online. Most importantly it is better to off or disable it because it will insert data in the database for each visitor so if visitors are a lot then it is not a good idea.

Total Orders

The total orders widget shows the total number of orders placed.

Latest Orders

The latest orders widget shows the latest 10 orders placed.

Total Sales

The total sales widget shows the total sales amount.

In this way, you can add custom fields in Opencart 4 for customers, addresses, and affiliates. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our twitter account @rupaknpl. Subscribe to our YouTube channel for Opencart tutorials, and click to see all Opencart user manual.

What is ‘Zone Shipping’ and how do we set it up?

Zone Shipping is simply shipping that is based on the different destinations, or geo zones, based on the weight of the total order. For example, if your shipping from California USA. You can set a rate to other customers in other states, or other countries by setting up a zone for each destination and then setting the shipping price for each weight range from you to other places.

Setup:

  1. Set up a new zone in Admin->Configuration->Localisation->Geo Zones
  2. Click on the “Insert” icon to add a new ‘Geo Zone’
  3. Call it “USA Shipping Zone” and click Save. You should now have a USA Shipping Zone in the list.
  4. Click on the yellow folder icon to the left of the title
  5. Click on the “Insert” icon to add a new ‘Zone to Geo Zone’
  6. From the ‘Country’ dropdown, choose ‘United States’
  7. From the ‘Region / State’ dropdown, choose an individual state, or choose ‘All Zones’ for the same rate to all 50 states & provinces
  8. Click ‘Save’.
  9. Repeat this process for UK, Australia, China, Japan, etc. anywhere you want to exclusively allow this type of shipping to.
  10. Go to Extensions->Shipping, find ‘Zone’ and click the “wrench/spanner” icon to configure it
  11. You should see textboxes for all your new zones. Enter the cost per weight range in each of the cost fields, based on the rates you want to use. The format is:
  12. Weight: Cost with multiple values separated by a comma: 5:2.00, 10:4.00

Using the above example (with lbs and $ for the example) would mean that
– Orders from 0-5.0lbs, the shipping cost is: $2.00
– Orders from 5.1-10.0lbs, the shipping cost is: $4.00
– Orders from 10.1lbs+ would not be eligible for zone shipping

Set Shipping to Selected Countries Only in OpenCart

By default, OpenCart has every country enabled in your Localisation settings. What if your online store only caters to a few countries. Disabling them all in the admin panel one by one would be a pain. You would have to:

  1. Open System > Localisation > Countries menu in admin panel.
  2. Click Edit on the country you want to disable.
  3. Choose Disabled in the Status field.

You would have to iterate this process several times if you are to do this manually.

A solution to this is to disable all of them at once through an SQL statement and enable the countries individually in the admin panel which is about a hundred times easier than the latter. Here’s how:

  1. Open your OpenCart database in phpMyAdmin or any other database management tool you use.
  2. Execute the following SQL: UPDATE country SET status=0. This SQL statement sets the Status of all countries to Disabled.
  3. Go back to your admin panel and enable your selected countries manually.

When a visitor registers as a customer in OpenCart, only the enabled countries will appear.

We hope this helps someone. Let us know if you have any questions or suggestions, please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook. Enjoy!

Set up Google reCaptcha or Basic Captcha in OpenCart 3.0+ and 2.3.0.1+

Now in OpenCart 3.0 and 2.3.0.1 version, it is very easy to setup google reCaptcha in multiple pages. Forms of Opencart that google reCaptcha supported are  Register, Guest Checkout, Reviews, Returns, and Contact.

Basic Captcha:

  • Go to Extensions >> Extensions >> In Choose the extension type >> Captchas (2)
  • Now click the green button to install the Basic Captcha
  • Click the blue edit button of Basic Captcha
  • Choose Enabled from the status
  • Click save and you are set

Google reCaptcha:

  • Go to Extensions >> Extensions >> In Choose the extension type >> Captchas (2)
  • Now click the green button to install the Google reCaptcha
  • Click the blue edit button of Google reCaptcha
  • How to set it up in Google reCaptcha admin?
    1. Go to https://www.google.com/recaptcha/admin (login with Gmail account if not) and enter your Label(Any name) and domain name(website URL). New style with reCAPTCHA v3:
      google recaptcha for opencart
      After entering the label select the reCAPTCHA type “reCAPTCHA v2” and then select

      Old style:

      google recaptcha for opencart
    2. When you click the register button, you will get the site key and secret key in the Keys tab. New style:
      google recaptcha for opencart
      Old style

       

      OpenCart site key and secret key of google reCaptcha
  • Enter the Site key and Secret key from the google reCaptcha page
    basic-captcha
  • Choose Enabled for the Status
  • Click save and you are set.

Activate in forms:

Go to Admin >> System >> Settings >> Edit the Store >>  Click on Option tab >> Near the bottom you will see the Captcha section :

captcha-in-page

Choose whichever captcha you want to show in the site and then click save.

Now go to contact us page:

presentation-layer-contactus-captcha

If you get an error like:
ERROR for site owner: Invalid key type

error in google recaptcha for opencart

Then please check whether your domain is added correctly or not. Another problem is whether you are using reCAPTCHA v2 or not.

Let us know through comment or email at webocreation.com@gmail.com if you are having any issues.

Show images for the sub-categories in the opencart versions 2.3, 3, and 4

This Opencart tip is to show images for the sub-categories in the Opencart version 2.3, but you can make changes as per the following instructions.

Opencart 2.3

Find the following code at catalog\controller\product\category.php

$data['categories'][] = array(
	'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
	'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);

Replace the code with the below code:

$data['categories'][] = array(
	'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
	'image' => $this->model_tool_image->resize($result['image'], 100,100),
	'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);

Changed is ‘image’ => $this->model_tool_image->resize($result[‘image’], 100,100), if you have to increase the size then change 100 to other values.

Find the following code at catalog\view\theme\default\template\product\category.tpl

<?php if ($categories) { ?>
<h3><?php echo $text_refine; ?></h3>
<?php if (count($categories) <= 5) { ?>
<div class="row">
  <div class="col-sm-3">
    <ul>
      <?php foreach ($categories as $category) { ?>
      <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
      <?php } ?>
    </ul>
  </div>
</div>
<?php } else { ?>
<div class="row">
  <?php foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
  <div class="col-sm-3">
    <ul>
      <?php foreach ($categories as $category) { ?>
      <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
      <?php } ?>
    </ul>
  </div>
  <?php } ?>
</div>
<?php } ?>
<?php } ?>

Replace with the below code

<?php if ($categories) { ?>
      <h3><?php echo $text_refine; ?></h3>
      <?php if (count($categories) <= 5) { ?>
      <div class="row">
        <div class="col-sm-3">
          <ul>
            <?php foreach ($categories as $category) { ?>
            <li> <a href="<?php echo $category['href']; ?>">
                <?php if($category['image']){ ?>
                <img src="<?php echo $category['image']; ?>" ><br>
                <?php } ?>
                <?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
      </div>
      <?php } else { ?>
      <div class="row">
        <?php  foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
        <div class="col-sm-3">
          <ul>
            <?php  foreach ($categories as $category) { ?>
            <li><a href="<?php echo $category['href']; ?>">
                <?php if($category['image']){ ?>
                <img src="<?php echo $category['image']; ?>" ><br>
                <?php } ?>
                <?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
<?php } ?>

Extra code added is below and there are two places to add the code:

<?php if($category['image']){ ?>
      <img src="<?php echo $category['image']; ?>" ><br>
<?php } ?>

You are set for the default theme, but if you are using a custom theme then you have to manage as per your theme.

Opencart 3 and Opencart 4

Find the following code at catalog\controller\product\category.php

$data['categories'][] = array(
	'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
	'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);

Replace the code with the below code:

$data['categories'][] = array(
	'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
	'image' => $this->model_tool_image->resize($result['image'], 100,100),
	'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);

Changed is ‘image’ => $this->model_tool_image->resize($result[‘image’], 100,100), if you have to increase the size then change 100 to other values.

Find the following code at catalog\view\theme\template\product\category.twig

{% if categories|length <= 5 %}
          <div class="row">
            <div class="col-sm-3">
              <ul>
                {% for category in categories %}
                  <li>
                  <a href="{{ category.href }}">{{ category.name }}</a>
                  </li>
                {% endfor %}
              </ul>
            </div>
          </div>
        {% else %}
          <div class="row row-cols-sm-2 row-cols-lg-4">
            {% for category in categories|batch((categories|length / 4)|round(1, 'ceil')) %}
              <div class="col">
                <ul>
                  {% for child in category %}
                    <li><a href="{{ child.href }}">{{ child.name }}</a></li>
                  {% endfor %}
                </ul>
              </div>
            {% endfor %}
          </div>
          <br/>
        {% endif %}

Replace with the following:

{% if categories|length <= 5 %}
          <div class="row">
            <div class="col-sm-3">
              <ul>
                {% for category in categories %}
                  <li>
                  {% if category.image %}
                    <div>
                      <img src="{{ category.image }}" alt="{{ category.name }}" title="{{ category.name }}" class="img-thumbnail"/>
                    </div>
                  {% endif %}
                  <a href="{{ category.href }}">{{ category.name }}</a>
                  
                  </li>
                {% endfor %}
              </ul>
            </div>
          </div>
{% else %}
          <div class="row row-cols-sm-2 row-cols-lg-4">
            {% for category in categories|batch((categories|length / 4)|round(1, 'ceil')) %}
              <div class="col">
                <ul>
                  {% for child in category %}
                    <li>
                    {% if child.image %}
                      <div>
                        <img src="{{ child.image }}" alt="{{ child.name }}" title="{{ child.name }}" class="img-thumbnail"/>
                      </div>
                    {% endif %}
                    <a href="{{ child.href }}">{{ child.name }}</a>
                    
                    </li>
                  {% endfor %}
                </ul>
              </div>
            {% endfor %}
          </div>
          <br/>
{% endif %}

The following are codes added in the above

{% if category.image %}
          <div>
                      <img src="{{ category.image }}" alt="{{ category.name }}" title="{{ category.name }}" class="img-thumbnail"/>
          </div>
{% endif %}

And

{% if child.image %}
       <div>
               <img src="{{ child.image }}" alt="{{ child.name }}" title="{{ child.name }}" class="img-thumbnail"/>
        </div>
{% endif %}

With the above changes now you can see images for the sub-categories, for example:

Opencart Category

By changing like above code, you can show images for the sub-categories on the category page of Opencart

Manage menu and change navigation or menu in Opencart

The main menu in Opencart displays categories that are selected to show in the top menu, it only works for the top parent categories. Right now you can manage the top menu to show the categories, we see some hidden codes and modules that Opencart default is trying to come up within the upcoming version but for now, we can change the navigation just by handling the categories. We will show you one easy way to add the item in the top menu with the OCMOD module.

Show top level categories in the main menu

In default Opencart you can see the menu items like the image below:

Main menu in Opencart

To change the categories, please log in to the Opencart admin then go to Catalog >> Categories where you will see lists of categories. You can edit the existing top-level categories or add the new categories. Then in the data tab, you will see a Top checkbox field where you can check to show in the main menu.

Categories data tab main menu Opencart

It works only for top-level categories, do not work for sub-categories. All sub-categories are shown in the dropdown of the top-level category of the menu. Just below the Top field, there is the Columns field which is for the dropdown menu column distribution, the number of columns to use for the bottom 3 categories. For example, you can see the “MP3 Players” category of default demo data of Opencart whose Top field is checked and in Columns field it is added 4 like:

dropdown menu in Opencart

The output menu looks like below in demo data of Opencart.

4 columns top menu Opencart

In this way, you can show the top level categories in the top main menu of Opencart.

Add custom menu item in Opencart main menu

For that, we are showing you by creating OCMOD module. Let’s create install.xml file and then copy the following code and paste in the install.xml

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Custom Menu</name>
    <version>3.0</version>
    <author>Rupak Nepali</author>
    <link>https://webocreation.com</link>
    <code>webocreation_custom_top_menu</code>
    <description>Custom Menu for Opencart</description>

    <file path="catalog/view/theme/*/template/common/menu.twig">
        <operation>
            <search><![CDATA[{% for category in categories %}]]></search>
            <add position="before"><![CDATA[
                <li><a href="https://YOURURLHERE">TEXTHERE</a></li>
            ]]>            </add>
        </operation>
    </file>
</modification>

In the code above find https://YOURURLHERE and replace with your URL and find TEXTHERE and replace it with your text to show. Once you change them, compress the install.xml and rename the zip file as custom-menu.ocmod.xml. Then, go to admin >> Extensions >> Installer and upload the custom-menu.ocmod.xml. After that go to admin >> Extensions >> Modifications and click the refresh button. Once you did above steps then it will show like in the image below:

Custom menu OCMOD Opencart

In this way, you can add the custom menu item in the Opencart main menu. Please don’t forget to post your questions or comments or errors so that we can help you. You can follow us at our twitter account @rupaknpl. Subscribe to our YouTube channel for Opencart tutorials, and click to see all Opencart tips and tricks.

How do reward points work in Opencart 4?

Today we came across a question, How do reward points work in Opencart 4? How do we set up the reward points in Opencart 4? Here are the process and steps to setup it up:

How to enable and disable the reward points in Opencart?

Go to the admin section of the Opencart
Extensions >> Extensions >> Choose Order Total >> Then Install the Reward Points >> Edit and you can select Enabled or Disabled.

Opencart Reward System

How to set the reward points for each product?

Set reward points for products in Opencart

In the image above, 5000 is the reward points that the customers can buy the product and 200 is the reward points that the customer get on buying the product.

How this 200 reward point is added to the customer as in the example?

Go to the Sales>>Order>>View order that contains the reward gaining product and click “add the reward”

Assign rewards points to buyers

This means we have to process each order. If you don’t see the Add the reward then it means there is a reward point for products in the respective order.

The administrator can directly provide reward points to the customer as well from the customer’s sections. Go to Customers>> Customers >> Edit one >> Click Reward Points tab and Insert the description and the Rewards points that admin wants to assign to the customers.

Add reward points for customer

Customers can see their rewards points by going to the Reward Points and they can view their details at:

Customer reward points

In this way, you can set up the Opencart reward points. Let us know if need any support. Hope you liked this post, please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook.

How to upgrade from Opencart 3.0.3.8 to Opencart 4.0.2.2? and minor versions of 4

We started upgrading some of our clients to Opencart 4.0.2.2 from Opencart 3.0.3.8. Here are the steps that we follow and some of the issues that we face and their solution to fix the issue.

Before upgrading:

Undertake a meticulous pre-upgrade assessment to identify and address potential issues

  • Backup Backup Backup – database, files and folders, and images, if you are using downloads, don’t forget to backup both the system and the storage download.
  • Review system requirements – mainly Opencart 4 needs PHP 8.0+, so make sure your hosting or servers can be upgraded to PHP 8.0+
  • Plan and check for extensions and themes – ensure all extensions, modules, and themes are available in Opencart version 4 to fulfill your requirements. Many modules are still not upgraded to the Opencart 4 version.
  • Review the custom modifications that are added to the OpenCart 3 installation, you’ll need to upgrade those changes to OpenCart 4. All OCMOD customization will not work on Opencart 4. Either you have to convert it to an event system or install the VqMod in Opencart 4 and change the OCMOD to VqMod
  • Prepare the staging/testing: Set up a staging environment and test the upgrade process there first. This allows you to identify and resolve any issues before applying the changes to your live store.

Backup of all things before you start and make sure twice everythinG is Backed up

While upgrading:

First, do everything in the development or testing environment and then only do the same thing to live servers. Download the Opencart 4.0.2.2 version, this is the latest while we were upgrading. Then, extract the zip file and upload all of the files inside the Upload folder to your server. In some of the cases we use SFTP, this is a way we do this if we have not set up any CI/CD for clients else we follow Continuous integration and continuous deployment.

File override while Opencart Upgrade

Once you upload all the files and folders, now run YOURWEBSITEURL/install, then you will see like below:

Opencart 4 admin url to upgrade

Patch one and Patch two are easily applied.

Opencart Upgrade process

We started seeing errors in Patch Third. We see errors like the following:
Error one:

SyntaxError: Unexpected token '<', "<b>Excepti"... is not valid JSON
parsererror
<b>Exception</b>: Error: Table storage engine for '#sql-263_175e' doesn't have this option<br/>Error No: 1031<br/>ALTER TABLE `oc_product_discount` ENGINE = `InnoDB` in <b>/home/rupaknpl/merging/system/library/db/mysqli.php</b> on line <b>68</b>
Opencart upgrade steps error

Maybe this issue is only for us in one client, some of their database tables were in InnoDB and some were in MyISAM. So to fix it we ran the following query.

SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') 
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE='MyISAM'
AND table_schema = 'YOUR_DATABASE_NAME';
MyISAM to INNODB

Successful upgrade

After the above fix, we ran YOURWEBSITEURL/install again and it went smoothly. The 3, 4,5,6, and 7 are also quick but 8 takes some time, so just have some patience and wait, 9 was quick overall time taken was around 7 mins. If you guys see any console errors that we did not mention above then please let us know and we can help you to fix them.

Upgrade process completion

Once the upgrade is complete.

Admin login issue

Now we tried to go to the admin section. We were not able to log in with the old username and password, so we had to insert the username and password from SQL. Here is the SQL that we use:

INSERT INTO `oc_user` (`user_group_id`,`username`,`password`,`firstname`,`lastname`,`email`,`image`,`code`,`ip`,`status`,`date_added`) VALUES (1,'admin','$2y$10$3Tofs9U7zGWhbQ67l7uageuxOjo6zU88pRESFZaxY.D3Ms4RSSIAu','John','Doe','youremail@gmail.com','','','::1',1,'2022-06-04 11:39:23');

With the run of the above query, now you can log in with username: admin and password: admin123. After you log in you can remove the /install folder, set the new storage folder, and rename the admin folder to your desired name.

Missing extensions:

In one of our clients, we saw all the installed extensions are missing, install Extensions are empty like below:

Missing extension in Opencart 4

We upload all the files and folders inside the /extension folder of the Opencart 4 zip extract. Then we ran the following queries to add all the opencart extension paths.

INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (1,1,'opencart');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (2,1,'opencart/admin');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (3,1,'opencart/admin/controller');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (4,1,'opencart/admin/controller/analytics');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (5,1,'opencart/admin/controller/analytics/index.html');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (6,1,'opencart/admin/controller/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (7,1,'opencart/admin/controller/captcha/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (8,1,'opencart/admin/controller/currency');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (9,1,'opencart/admin/controller/currency/ecb.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (10,1,'opencart/admin/controller/currency/fixer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (11,1,'opencart/admin/controller/dashboard');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (12,1,'opencart/admin/controller/dashboard/activity.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (13,1,'opencart/admin/controller/dashboard/chart.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (14,1,'opencart/admin/controller/dashboard/customer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (15,1,'opencart/admin/controller/dashboard/map.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (16,1,'opencart/admin/controller/dashboard/online.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (17,1,'opencart/admin/controller/dashboard/order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (18,1,'opencart/admin/controller/dashboard/recent.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (19,1,'opencart/admin/controller/dashboard/sale.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (20,1,'opencart/admin/controller/feed');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (21,1,'opencart/admin/controller/feed/index.html');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (22,1,'opencart/admin/controller/fraud');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (23,1,'opencart/admin/controller/fraud/ip.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (24,1,'opencart/admin/controller/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (25,1,'opencart/admin/controller/module/account.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (26,1,'opencart/admin/controller/module/banner.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (27,1,'opencart/admin/controller/module/bestseller.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (28,1,'opencart/admin/controller/module/category.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (29,1,'opencart/admin/controller/module/featured.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (30,1,'opencart/admin/controller/module/filter.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (31,1,'opencart/admin/controller/module/html.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (32,1,'opencart/admin/controller/module/information.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (33,1,'opencart/admin/controller/module/latest.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (34,1,'opencart/admin/controller/module/special.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (35,1,'opencart/admin/controller/module/store.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (36,1,'opencart/admin/controller/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (37,1,'opencart/admin/controller/payment/bank_transfer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (38,1,'opencart/admin/controller/payment/cheque.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (39,1,'opencart/admin/controller/payment/cod.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (40,1,'opencart/admin/controller/payment/free_checkout.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (41,1,'opencart/admin/controller/report');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (42,1,'opencart/admin/controller/report/customer_activity.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (43,1,'opencart/admin/controller/report/customer_order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (44,1,'opencart/admin/controller/report/customer_reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (45,1,'opencart/admin/controller/report/customer_search.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (46,1,'opencart/admin/controller/report/customer_transaction.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (47,1,'opencart/admin/controller/report/customer_subscription.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (48,1,'opencart/admin/controller/report/marketing.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (49,1,'opencart/admin/controller/report/product_purchased.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (50,1,'opencart/admin/controller/report/product_viewed.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (51,1,'opencart/admin/controller/report/sale_coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (52,1,'opencart/admin/controller/report/sale_order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (53,1,'opencart/admin/controller/report/sale_return.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (54,1,'opencart/admin/controller/report/sale_shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (55,1,'opencart/admin/controller/report/sale_tax.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (56,1,'opencart/admin/controller/shipping');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (57,1,'opencart/admin/controller/shipping/flat.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (58,1,'opencart/admin/controller/shipping/free.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (59,1,'opencart/admin/controller/shipping/item.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (60,1,'opencart/admin/controller/shipping/pickup.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (61,1,'opencart/admin/controller/shipping/weight.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (62,1,'opencart/admin/controller/theme');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (63,1,'opencart/admin/controller/theme/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (64,1,'opencart/admin/controller/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (65,1,'opencart/admin/controller/total/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (66,1,'opencart/admin/controller/total/credit.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (67,1,'opencart/admin/controller/total/handling.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (68,1,'opencart/admin/controller/total/low_order_fee.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (69,1,'opencart/admin/controller/total/reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (70,1,'opencart/admin/controller/total/shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (71,1,'opencart/admin/controller/total/sub_total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (72,1,'opencart/admin/controller/total/tax.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (73,1,'opencart/admin/controller/total/total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (74,1,'opencart/admin/controller/total/voucher.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (75,1,'opencart/admin/language');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (76,1,'opencart/admin/language/en-gb');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (77,1,'opencart/admin/language/en-gb/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (78,1,'opencart/admin/language/en-gb/captcha/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (79,1,'opencart/admin/language/en-gb/currency');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (80,1,'opencart/admin/language/en-gb/currency/ecb.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (81,1,'opencart/admin/language/en-gb/currency/fixer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (82,1,'opencart/admin/language/en-gb/dashboard');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (83,1,'opencart/admin/language/en-gb/dashboard/activity.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (84,1,'opencart/admin/language/en-gb/dashboard/chart.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (85,1,'opencart/admin/language/en-gb/dashboard/customer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (86,1,'opencart/admin/language/en-gb/dashboard/map.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (87,1,'opencart/admin/language/en-gb/dashboard/online.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (88,1,'opencart/admin/language/en-gb/dashboard/order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (89,1,'opencart/admin/language/en-gb/dashboard/recent.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (90,1,'opencart/admin/language/en-gb/dashboard/sale.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (91,1,'opencart/admin/language/en-gb/fraud');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (92,1,'opencart/admin/language/en-gb/fraud/ip.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (93,1,'opencart/admin/language/en-gb/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (94,1,'opencart/admin/language/en-gb/module/account.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (95,1,'opencart/admin/language/en-gb/module/banner.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (96,1,'opencart/admin/language/en-gb/module/bestseller.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (97,1,'opencart/admin/language/en-gb/module/category.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (98,1,'opencart/admin/language/en-gb/module/featured.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (99,1,'opencart/admin/language/en-gb/module/filter.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (100,1,'opencart/admin/language/en-gb/module/html.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (101,1,'opencart/admin/language/en-gb/module/information.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (102,1,'opencart/admin/language/en-gb/module/latest.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (103,1,'opencart/admin/language/en-gb/module/special.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (104,1,'opencart/admin/language/en-gb/module/store.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (105,1,'opencart/admin/language/en-gb/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (106,1,'opencart/admin/language/en-gb/payment/bank_transfer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (107,1,'opencart/admin/language/en-gb/payment/cheque.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (108,1,'opencart/admin/language/en-gb/payment/cod.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (109,1,'opencart/admin/language/en-gb/payment/free_checkout.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (110,1,'opencart/admin/language/en-gb/report');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (111,1,'opencart/admin/language/en-gb/report/customer_activity.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (112,1,'opencart/admin/language/en-gb/report/customer_order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (113,1,'opencart/admin/language/en-gb/report/customer_reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (114,1,'opencart/admin/language/en-gb/report/customer_search.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (115,1,'opencart/admin/language/en-gb/report/customer_transaction.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (116,1,'opencart/admin/language/en-gb/report/customer_subscription.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (117,1,'opencart/admin/language/en-gb/report/marketing.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (118,1,'opencart/admin/language/en-gb/report/product_purchased.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (119,1,'opencart/admin/language/en-gb/report/product_viewed.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (120,1,'opencart/admin/language/en-gb/report/sale_coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (121,1,'opencart/admin/language/en-gb/report/sale_order.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (122,1,'opencart/admin/language/en-gb/report/sale_return.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (123,1,'opencart/admin/language/en-gb/report/sale_shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (124,1,'opencart/admin/language/en-gb/report/sale_tax.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (125,1,'opencart/admin/language/en-gb/shipping');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (126,1,'opencart/admin/language/en-gb/shipping/flat.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (127,1,'opencart/admin/language/en-gb/shipping/free.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (128,1,'opencart/admin/language/en-gb/shipping/item.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (129,1,'opencart/admin/language/en-gb/shipping/pickup.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (130,1,'opencart/admin/language/en-gb/shipping/weight.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (131,1,'opencart/admin/language/en-gb/theme');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (132,1,'opencart/admin/language/en-gb/theme/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (133,1,'opencart/admin/language/en-gb/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (134,1,'opencart/admin/language/en-gb/total/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (135,1,'opencart/admin/language/en-gb/total/credit.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (136,1,'opencart/admin/language/en-gb/total/handling.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (137,1,'opencart/admin/language/en-gb/total/low_order_fee.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (138,1,'opencart/admin/language/en-gb/total/reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (139,1,'opencart/admin/language/en-gb/total/shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (140,1,'opencart/admin/language/en-gb/total/sub_total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (141,1,'opencart/admin/language/en-gb/total/tax.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (142,1,'opencart/admin/language/en-gb/total/total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (143,1,'opencart/admin/language/en-gb/total/voucher.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (144,1,'opencart/admin/model');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (145,1,'opencart/admin/model/dashboard');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (146,1,'opencart/admin/model/dashboard/map.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (147,1,'opencart/admin/model/fraud');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (148,1,'opencart/admin/model/fraud/ip.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (149,1,'opencart/admin/model/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (150,1,'opencart/admin/model/report');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (151,1,'opencart/admin/model/report/activity.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (152,1,'opencart/admin/model/report/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (153,1,'opencart/admin/model/report/customer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (154,1,'opencart/admin/model/report/customer_transaction.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (155,1,'opencart/admin/model/report/marketing.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (156,1,'opencart/admin/model/report/product.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (157,1,'opencart/admin/model/report/returns.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (158,1,'opencart/admin/model/report/sale.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (159,1,'opencart/admin/view');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (160,1,'opencart/admin/view/template');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (161,1,'opencart/admin/view/template/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (162,1,'opencart/admin/view/template/captcha/basic.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (163,1,'opencart/admin/view/template/currency');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (164,1,'opencart/admin/view/template/currency/ecb.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (165,1,'opencart/admin/view/template/currency/fixer.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (166,1,'opencart/admin/view/template/dashboard');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (167,1,'opencart/admin/view/template/dashboard/activity_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (168,1,'opencart/admin/view/template/dashboard/activity_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (169,1,'opencart/admin/view/template/dashboard/chart_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (170,1,'opencart/admin/view/template/dashboard/chart_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (171,1,'opencart/admin/view/template/dashboard/customer_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (172,1,'opencart/admin/view/template/dashboard/customer_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (173,1,'opencart/admin/view/template/dashboard/map_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (174,1,'opencart/admin/view/template/dashboard/map_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (175,1,'opencart/admin/view/template/dashboard/online_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (176,1,'opencart/admin/view/template/dashboard/online_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (177,1,'opencart/admin/view/template/dashboard/order_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (178,1,'opencart/admin/view/template/dashboard/order_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (179,1,'opencart/admin/view/template/dashboard/recent_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (180,1,'opencart/admin/view/template/dashboard/recent_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (181,1,'opencart/admin/view/template/dashboard/sale_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (182,1,'opencart/admin/view/template/dashboard/sale_info.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (183,1,'opencart/admin/view/template/fraud');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (184,1,'opencart/admin/view/template/fraud/ip.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (185,1,'opencart/admin/view/template/fraud/ip_ip.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (186,1,'opencart/admin/view/template/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (187,1,'opencart/admin/view/template/module/account.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (188,1,'opencart/admin/view/template/module/banner.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (189,1,'opencart/admin/view/template/module/bestseller.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (190,1,'opencart/admin/view/template/module/category.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (191,1,'opencart/admin/view/template/module/featured.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (192,1,'opencart/admin/view/template/module/filter.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (193,1,'opencart/admin/view/template/module/html.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (194,1,'opencart/admin/view/template/module/information.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (195,1,'opencart/admin/view/template/module/latest.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (196,1,'opencart/admin/view/template/module/special.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (197,1,'opencart/admin/view/template/module/store.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (198,1,'opencart/admin/view/template/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (199,1,'opencart/admin/view/template/payment/bank_transfer.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (200,1,'opencart/admin/view/template/payment/cheque.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (201,1,'opencart/admin/view/template/payment/cod.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (202,1,'opencart/admin/view/template/payment/free_checkout.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (203,1,'opencart/admin/view/template/report');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (204,1,'opencart/admin/view/template/report/customer_activity.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (205,1,'opencart/admin/view/template/report/customer_activity_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (206,1,'opencart/admin/view/template/report/customer_order.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (207,1,'opencart/admin/view/template/report/customer_order_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (208,1,'opencart/admin/view/template/report/customer_reward.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (209,1,'opencart/admin/view/template/report/customer_reward_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (210,1,'opencart/admin/view/template/report/customer_search.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (211,1,'opencart/admin/view/template/report/customer_search_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (212,1,'opencart/admin/view/template/report/customer_transaction.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (213,1,'opencart/admin/view/template/report/customer_transaction_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (214,1,'opencart/admin/view/template/report/customer_subscription.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (215,1,'opencart/admin/view/template/report/customer_subscription_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (216,1,'opencart/admin/view/template/report/marketing.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (217,1,'opencart/admin/view/template/report/marketing_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (218,1,'opencart/admin/view/template/report/product_purchased.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (219,1,'opencart/admin/view/template/report/product_purchased_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (220,1,'opencart/admin/view/template/report/product_viewed.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (221,1,'opencart/admin/view/template/report/product_viewed_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (222,1,'opencart/admin/view/template/report/sale_coupon.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (223,1,'opencart/admin/view/template/report/sale_coupon_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (224,1,'opencart/admin/view/template/report/sale_order.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (225,1,'opencart/admin/view/template/report/sale_order_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (226,1,'opencart/admin/view/template/report/sale_return.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (227,1,'opencart/admin/view/template/report/sale_return_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (228,1,'opencart/admin/view/template/report/sale_shipping.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (229,1,'opencart/admin/view/template/report/sale_shipping_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (230,1,'opencart/admin/view/template/report/sale_tax.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (231,1,'opencart/admin/view/template/report/sale_tax_form.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (232,1,'opencart/admin/view/template/shipping');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (233,1,'opencart/admin/view/template/shipping/flat.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (234,1,'opencart/admin/view/template/shipping/free.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (235,1,'opencart/admin/view/template/shipping/item.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (236,1,'opencart/admin/view/template/shipping/pickup.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (237,1,'opencart/admin/view/template/shipping/weight.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (238,1,'opencart/admin/view/template/theme');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (239,1,'opencart/admin/view/template/theme/basic.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (240,1,'opencart/admin/view/template/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (241,1,'opencart/admin/view/template/total/coupon.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (242,1,'opencart/admin/view/template/total/credit.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (243,1,'opencart/admin/view/template/total/handling.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (244,1,'opencart/admin/view/template/total/low_order_fee.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (245,1,'opencart/admin/view/template/total/reward.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (246,1,'opencart/admin/view/template/total/shipping.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (247,1,'opencart/admin/view/template/total/sub_total.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (248,1,'opencart/admin/view/template/total/tax.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (249,1,'opencart/admin/view/template/total/total.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (250,1,'opencart/admin/view/template/total/voucher.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (251,1,'opencart/catalog');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (252,1,'opencart/catalog/controller');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (253,1,'opencart/catalog/controller/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (254,1,'opencart/catalog/controller/captcha/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (255,1,'opencart/catalog/controller/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (256,1,'opencart/catalog/controller/module/account.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (257,1,'opencart/catalog/controller/module/banner.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (258,1,'opencart/catalog/controller/module/bestseller.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (259,1,'opencart/catalog/controller/module/category.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (260,1,'opencart/catalog/controller/module/featured.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (261,1,'opencart/catalog/controller/module/filter.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (262,1,'opencart/catalog/controller/module/html.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (263,1,'opencart/catalog/controller/module/information.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (264,1,'opencart/catalog/controller/module/latest.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (265,1,'opencart/catalog/controller/module/special.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (266,1,'opencart/catalog/controller/module/store.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (267,1,'opencart/catalog/controller/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (268,1,'opencart/catalog/controller/payment/bank_transfer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (269,1,'opencart/catalog/controller/payment/cheque.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (270,1,'opencart/catalog/controller/payment/cod.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (271,1,'opencart/catalog/controller/payment/free_checkout.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (272,1,'opencart/catalog/controller/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (273,1,'opencart/catalog/controller/total/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (274,1,'opencart/catalog/controller/total/reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (275,1,'opencart/catalog/controller/total/shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (276,1,'opencart/catalog/controller/total/voucher.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (277,1,'opencart/catalog/language');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (278,1,'opencart/catalog/language/en-gb');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (279,1,'opencart/catalog/language/en-gb/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (280,1,'opencart/catalog/language/en-gb/captcha/basic.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (281,1,'opencart/catalog/language/en-gb/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (282,1,'opencart/catalog/language/en-gb/module/account.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (283,1,'opencart/catalog/language/en-gb/module/bestseller.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (284,1,'opencart/catalog/language/en-gb/module/category.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (285,1,'opencart/catalog/language/en-gb/module/featured.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (286,1,'opencart/catalog/language/en-gb/module/filter.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (287,1,'opencart/catalog/language/en-gb/module/information.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (288,1,'opencart/catalog/language/en-gb/module/latest.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (289,1,'opencart/catalog/language/en-gb/module/special.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (290,1,'opencart/catalog/language/en-gb/module/store.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (291,1,'opencart/catalog/language/en-gb/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (292,1,'opencart/catalog/language/en-gb/payment/bank_transfer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (293,1,'opencart/catalog/language/en-gb/payment/cheque.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (294,1,'opencart/catalog/language/en-gb/payment/cod.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (295,1,'opencart/catalog/language/en-gb/payment/free_checkout.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (296,1,'opencart/catalog/language/en-gb/shipping');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (297,1,'opencart/catalog/language/en-gb/shipping/flat.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (298,1,'opencart/catalog/language/en-gb/shipping/free.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (299,1,'opencart/catalog/language/en-gb/shipping/item.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (300,1,'opencart/catalog/language/en-gb/shipping/pickup.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (301,1,'opencart/catalog/language/en-gb/shipping/weight.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (302,1,'opencart/catalog/language/en-gb/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (303,1,'opencart/catalog/language/en-gb/total/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (304,1,'opencart/catalog/language/en-gb/total/credit.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (305,1,'opencart/catalog/language/en-gb/total/handling.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (306,1,'opencart/catalog/language/en-gb/total/low_order_fee.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (307,1,'opencart/catalog/language/en-gb/total/reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (308,1,'opencart/catalog/language/en-gb/total/shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (309,1,'opencart/catalog/language/en-gb/total/sub_total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (310,1,'opencart/catalog/language/en-gb/total/total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (311,1,'opencart/catalog/language/en-gb/total/voucher.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (312,1,'opencart/catalog/model');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (313,1,'opencart/catalog/model/fraud');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (314,1,'opencart/catalog/model/fraud/ip.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (315,1,'opencart/catalog/model/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (316,1,'opencart/catalog/model/payment/bank_transfer.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (317,1,'opencart/catalog/model/payment/cheque.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (318,1,'opencart/catalog/model/payment/cod.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (319,1,'opencart/catalog/model/payment/free_checkout.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (320,1,'opencart/catalog/model/shipping');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (321,1,'opencart/catalog/model/shipping/flat.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (322,1,'opencart/catalog/model/shipping/free.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (323,1,'opencart/catalog/model/shipping/item.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (324,1,'opencart/catalog/model/shipping/pickup.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (325,1,'opencart/catalog/model/shipping/weight.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (326,1,'opencart/catalog/model/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (327,1,'opencart/catalog/model/total/coupon.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (328,1,'opencart/catalog/model/total/credit.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (329,1,'opencart/catalog/model/total/handling.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (330,1,'opencart/catalog/model/total/low_order_fee.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (331,1,'opencart/catalog/model/total/reward.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (332,1,'opencart/catalog/model/total/shipping.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (333,1,'opencart/catalog/model/total/sub_total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (334,1,'opencart/catalog/model/total/tax.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (335,1,'opencart/catalog/model/total/total.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (336,1,'opencart/catalog/model/total/voucher.php');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (337,1,'opencart/catalog/view');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (338,1,'opencart/catalog/view/template');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (339,1,'opencart/catalog/view/template/captcha');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (340,1,'opencart/catalog/view/template/captcha/basic.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (341,1,'opencart/catalog/view/template/module');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (342,1,'opencart/catalog/view/template/module/account.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (343,1,'opencart/catalog/view/template/module/banner.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (344,1,'opencart/catalog/view/template/module/bestseller.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (345,1,'opencart/catalog/view/template/module/category.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (346,1,'opencart/catalog/view/template/module/featured.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (347,1,'opencart/catalog/view/template/module/filter.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (348,1,'opencart/catalog/view/template/module/html.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (349,1,'opencart/catalog/view/template/module/information.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (350,1,'opencart/catalog/view/template/module/latest.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (351,1,'opencart/catalog/view/template/module/special.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (352,1,'opencart/catalog/view/template/module/store.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (353,1,'opencart/catalog/view/template/payment');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (354,1,'opencart/catalog/view/template/payment/bank_transfer.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (355,1,'opencart/catalog/view/template/payment/cheque.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (356,1,'opencart/catalog/view/template/payment/cod.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (357,1,'opencart/catalog/view/template/payment/free_checkout.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (358,1,'opencart/catalog/view/template/total');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (359,1,'opencart/catalog/view/template/total/coupon.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (360,1,'opencart/catalog/view/template/total/reward.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (361,1,'opencart/catalog/view/template/total/shipping.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (362,1,'opencart/catalog/view/template/total/voucher.twig');
INSERT INTO `oc_extension_path` (`extension_path_id`,`extension_install_id`,`path`) VALUES (363,1,'opencart/install.json');

Likewise, to fix the above issue we ran another query to insert the extension install.

INSERT INTO `oc_extension_install` (`extension_install_id`,`extension_id`,`extension_download_id`,`name`,`code`,`version`,`author`,`link`,`status`,`date_added`) VALUES (1,0,0,'OpenCart Default Extensions','opencart','1.0','OpenCart Ltd','http://www.opencart.com',1,'2020-08-29 15:35:39');

With those above three steps, we were able to see all the extensions again.

Admin Dashboard is empty

All of the admin dashboard reports were missing.

Empty dashboard

To add reports in the admin dashboard of Opencart 4, we follow the instructions on this blog:

SEO URL changes in Opencart 4

Database SEO table oc_seo_url was not updated or transferred fully as the Opencart version 4 change added a new table structure. The oc_seo_url table is fixed by running the following queries:

UPDATE `oc_seo_url` SET `key` = SUBSTRING_INDEX(query, '=', 1), `value` = SUBSTRING_INDEX(query, '=', -1)
SEO table changes

Install Extensions

After upgrading, make sure you install all the extensions again so that you don’t conflict with any other things.

After upgrade

Functionality Testing: Thoroughly test all website functionalities, check for add to cart, all pages like home, product, category, cart, checkout, etc, sign up, log in, forget the password, etc.

Extensions Testing: Check all extensions are installed, and make sure you check the Order Totals, payments, shipping, modules, etc.

Checkout Page: Opencart 4 has a one-page checkout by default so check if it is showing the right shipping address, payment address, shipping methods, and payment methods and see if the totals are correct.

Coupon Functionalities: Check for coupon functionalities.

SEO Review: Verify that SEO elements such as meta titles, meta descriptions, header tags, and URLs are showing correctly on the page. See the top 25 opencart SEO best practices.

Security Audit: Conduct a security audit to identify and address potential vulnerabilities.

Mail Function: Don’t forget to check the email functionalities.

Product Feeds: Enabled your feed and sitemap. And don’t forget to submit your sitemap to Google Webmaster.

Test Thoroughly: After upgrading, test your store to ensure that all functionalities, extensions, and themes are working correctly. Check for any broken links (we mostly check with https://www.brokenlinkcheck.com), missing images, or other issues.

Monitor Performance: After the upgrade, keep an eye on your store’s performance, and address any performance issues.

Analytics and Tracking: Check your analytics and tracking codes.

Please take a look at the OpenCart Site Launch Checklist, we have listed most of the functionality to test before launch.

Conclusion

In this way, you can upgrade Opencart from version 3 to 4, it is a complex process, and it’s common for some issues to surface post-upgrade. Being proactive in testing, monitoring, and addressing issues will help ensure that your website remains functional and user-friendly after the upgrade.  Upgrade your OpenCart e-commerce platform effortlessly with our professional services. Enjoy enhanced features, improved security, and a smoother user experience. Contact us for a seamless upgrade process. Please let us know if you faced any problems while upgrading Opencart and have questions or concerns so that we can help you out, similarly, let us know if there are other best solutions. Till then please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook.

Maintenance (Backup/Restore, Uploads and Error Logs) – Opencart user manual

In this Opencart user manual, we are giving you details of the Maintenance links: Backup/Restore, Uploads, and Error logs. For Backup/Restore we can backup the data in a dot SQL file and we can import the dot SQL file which is similar in structure to the exported dot SQL file. At Uploads, you can see the files uploaded by the customers while making the order if you have provided the file upload button on the product detail page as Options. In Error logs, you can see the error logs, fatal errors, or warnings or notices errors.

Maintenance Mode in Opencart

If you are looking to keep the site in Maintenance Mode then you need to go to admin >> System >> Settings. Then edit the store that you want to keep the site in maintenance. After that go to the Server tab where you can see the maintenance mode. You can choose Yes if you want to keep the site in maintenance mode.

Maintenance Mode in Opencart

Backup/Restore in Opencart

You can export the database data easily in Opencart by going to admin >> System >> Maintenance >> Backup/Restore and in the Backup tab you can see all the database tables, for a full backup of data, select all and click the Export button. You can select some tables and export them as well.

Backup and export in Opencart

The exported file will be like databasename_today_date_and_time_backup.sql which has SQL statements like the below (we just take some part of API tables to show you):

TRUNCATE TABLE `oc_api`;
INSERT INTO `oc_api` (`api_id`, `username`, `key`, `status`, `date_added`, `date_modified`) VALUES ('1', 'Default', 'kqtDbGPOkLqokpSl80w57nfPqxJzkOwgmBC2uqeZvjCyUll3Flw7QiEwdHbTxoyNme1ixsYjglCmbik84hlCTpGrGSDiMvwZUtAPLT3XIyp7ANo4UxuQmZLHeaG9tb2ukh2138YsbH12Mippb03GTNXUZmRiF8RlofU1c37Gsk0orJWwa7KN14sU3FumadWaC2WvhHG6TLKnw7m4ir3E8OHVMWMinmNUrRJc3QzlDgn16HhkFNrn5iGQ8junqyrp', '1', '2019-04-22 18:32:08', '2019-04-22 18:32:08');
TRUNCATE TABLE `oc_api_ip`;
INSERT INTO `oc_api_ip` (`api_ip_id`, `api_id`, `ip`) VALUES ('1', '1', '127.0.0.1');

To Restore the data we can import the downloaded dot SQL file. For that go to admin >> System >> Maintenance >> Backup/Restore. Then in the Restore tab click the Import button and choose the downloaded dot SQL file. As you see in the above SQL queries first it truncates or removes all data and then inserts the data. Be careful before doing it.

Import or restore in Opencart

In this way, you can backup and restore the data in Opencart.

Uploads in Opencart maintenance section

Go to admin >> System >> Maintenance >> Uploads. You will see the lists of files uploaded by the customers while ordering the products.

List of uploads in Opencart

Don’t get confused with downloads and uploads. Uploads are files uploaded from the front end by the customers if there is a file upload button in the product options section. For example, in the default installation, the product named ‘Apple Cinema 30″‘ has the option to upload a file:

File upload in product options Opencart

When you upload the file in that option field then it will be shown in the Sales >> Orders:

File upload shown in Order opencart

When customers upload the files, then the file name is changed to a different name by adding a token to the file name. It is to hide the uploaded file name so people can not link to it directly. Those are the files that you will see in the admin >> System >> Maintenance >> Uploads. You can delete those files if needed. In this way, uploads are managed in the Opencart.

Error Logs in Opencart

You can see the errors: Fatal, Notice, and Warning at admin >> System >> Maintenance >> Error Logs. You can see what is wrong in your store and solve it.

Error logs in Opencart

We have listed some errors and its solution of Opencart at:

Let us know if you find any errors in Opencart then we can help you solve them. In this way, we can see the error logs in Opencart.

In this Opencart user manual, we went through Maintenance links like the Backup/Restore, Uploads, and Error logs. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our Twitter account @rupaknpl, and subscribe to our YouTube channel for opencart tutorials. Click to see all Opencart user manuals.

Auto upgrade Opencart 4 versions by clicking in admin section

Auto-upgrading Opencart versions involves a process where the platform updates itself to the latest version without manual code. Opencart 4 does natively support a fully automated update mechanism like some other CMS platforms (e.g., WordPress). Here’s a detailed explanation of how you can set up and manage auto-updates for Opencart versions:

1. Preparation and Backup

Before any auto-upgrades, it’s crucial to ensure that your site can recover from any potential issues that might arise during the upgrade process.

  • Regular Backups: Schedule regular backups of your entire Opencart store, including the database and all files.
  • Staging Environment: Set up a staging environment to test updates before applying them to the live site.

Read more: Upgrade Opencart 3 to Opencart 4 version

2. Monitoring for New Releases

To automate updates, you need a way to monitor for new Opencart releases.

  • RSS Feeds: Subscribe to Opencart’s release announcements via RSS feeds or email notifications.
  • GitHub Repository: Monitor the official Opencart GitHub repository for new releases.

4. Automated Upgrade

Go to admin >> System >> Maintenance >> Upgrade and click Upgrade button and you are done.

Auto upgrade Opencart version

6. Handling Customizations and Extensions

  • Custom Themes and Extensions: Ensure your script preserves custom themes and extensions. You may need to modify the script to exclude these files from being overwritten.
  • Compatibility Checks: Before updating, check that your themes and extensions are compatible with the new version. This can be automated by maintaining a compatibility matrix or using version constraints.
  • Clear Modification Cache: Don’t forget to clear cache

7. Testing Updates

  • Automated Testing: Implement automated testing to verify that the update was successful and that critical functionalities are working correctly.
  • Manual Testing: Periodically perform manual tests to ensure the update process works as expected.

8. Rollback Mechanism

  • Automated Rollback: Implement a rollback mechanism in case the update fails. This can involve restoring files and databases from the backups created before the update.

9. Monitoring and Alerts

  • Monitoring: Set up monitoring to check the health of your Opencart store after the update.
  • Alerts: Configure alerts to notify you of any issues during or after the update process.

Conclusion

Opencart 4 support native auto-upgrades, you can achieve automated updates through a combination of scripts, monitoring tools, and best practices. Regular backups, thorough testing, and a robust rollback strategy are essential to minimize downtime and ensure a smooth upgrade process.

Length Classes and Weight Classes management – Opencart user manual

Opencart user manual where we are showing how we can manage length classes and weight classes. These lengths and weights are used by Shipping extensions like FedEx, UPS, etc, and will be used by Shipping API to calculate the shipping cost. For adding length classes go to admin >> System >> Localization >> Length Classes and for adding weight classes go to admin >> System >> Localization >> Weight classes.

You can see a list of length classes by going to admin >> System >> Localization >> Length Classes

Length classes in Opencart

You can add the length classes by clicking the “Add New” blue button then you will get the form below:

Length classes in Opencart

Length Title: Enter the name of the length like Centimeter, meter, etc.

Length Unit: Enter the length unit.

Value: Set to 1.00000 if this is your default length and for other conversions will be based on the default length.

Weight class management in Opencart

You can see the list of weight classes by going to admin >> System >> Localization >> Weight Classes

Weight classes Opencart

You can add the weight classes by clicking the “Add New” blue button then you will get the form below:

Edit weight classes Opencart

Weight Title: Enter the name of the weight like gram, kilogram, etc.

Weight Unit: Enter the weight unit.

Value: Set to 1.00000 if this is your default weight and for other conversions will be based on the default weight.

Add length and weight for the Product

To add length and weight for a product, go to admin >> Catalog >> Products and add new or edit the product, then click the Data tab and go to the Dimensions (L x W x H) field and enter the dimension of length, width, and height and then select the length class. Similarly, add the Weight and then select the width class.

Product weight and length in Opencart

Once you enter these details then it will be used by Shipping API to calculate the shipping cost, see the FedEx setting for height and weight:

Fedex setting Opencart

If the FedEx setting of length class is centimeter and the product length class we enter is different then it converts automatically.

In this way, we can manage length class and weight class management. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our Twitter account @rupaknpl, subscribe to our YouTube channel for opencart tutorials, and click to see all Opencart user manuals.

Adding a new position for different layout in OpenCart 2.2 like full width

A week early Opencart.com launched its new design and layout, and we were going through the website and found that it is using full-width layout but default OpenCart installation does not have full width in the content area. Thus we started to make the full-width position for different layout in OpenCart 2.2.

For OpenCart 3 full-width module visit below:
https://webocreation.com/opencart-free-extension-to-add-full-width-position-in-layout

Admin works

Find following code at admin/view/template/design/layout_form.tpl

<legend><?php echo $text_module; ?></legend>
<?php $module_row = 0; ?>
<div class="row">

Just below it, add the following code:

 <div class="col-lg-12 col-md-12 col-sm-12">
    <table id="module-column-full" class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <td class="text-center">Full Width</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($layout_modules as $layout_module) { ?>
                <?php if ($layout_module['position'] == 'column_full') { ?>
                    <tr id="module-row<?php echo $module_row; ?>">
                        <td class="text-left">
                            <div class="input-group">
                                <select name="layout_module[<?php echo $module_row; ?>][code]" class="form-control input-sm">
                                    <?php foreach ($extensions as $extension) { ?>
                                        <optgroup label="<?php echo $extension['name']; ?>">
                                            <?php if (!$extension['module']) { ?>
                                                <?php if ($extension['code'] == $layout_module['code']) { ?>
                                                    <option value="<?php echo $extension['code']; ?>" selected="selected"><?php echo $extension['name']; ?></option>
                                                <?php } else { ?>
                                                    <option value="<?php echo $extension['code']; ?>"><?php echo $extension['name']; ?></option>
                                                <?php } ?>
                                            <?php } else { ?>
                                                <?php foreach ($extension['module'] as $module) { ?>
                                                    <?php if ($module['code'] == $layout_module['code']) { ?>
                                                        <option value="<?php echo $module['code']; ?>" selected="selected"><?php echo $module['name']; ?></option>
                                                    <?php } else { ?>
                                                        <option value="<?php echo $module['code']; ?>"><?php echo $module['name']; ?></option>
                                                    <?php } ?>
                                                <?php } ?>
                                            <?php } ?>
                                        </optgroup>
                                    <?php } ?>
                                </select>
                                <input type="hidden" name="layout_module[<?php echo $module_row; ?>][position]" value="<?php echo $layout_module['position']; ?>"/>
                                <input type="hidden" name="layout_module[<?php echo $module_row; ?>][sort_order]" value="<?php echo $layout_module['sort_order']; ?>"/>
                                <div class="input-group-btn">
                                    <a href="<?php echo $layout_module['edit']; ?>" type="button" data-toggle="tooltip" title="<?php echo $button_edit; ?>" target="_blank" class="btn btn-primary btn-sm">
                                        <i class="fa fa-pencil"></i>
                                    </a>
                                    <button type="button" onclick="$('#module-row<?php echo $module_row; ?>').remove();" data-toggle="tooltip" title="<?php echo $button_remove; ?>" class="btn btn-danger btn-sm">
                                        <i class="fa fa fa-minus-circle"></i>
                                    </button>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <?php $module_row++; ?>
                <?php } ?>
            <?php } ?>
        </tbody>
        <tfoot>
            <tr>
                <td class="text-left">
                    <div class="input-group">
                        <select class="form-control input-sm">
                            <?php foreach ($extensions as $extension) { ?>
                                <optgroup label="<?php echo $extension['name']; ?>">
                                    <?php if (!$extension['module']) { ?>
                                        <option value="<?php echo $extension['code']; ?>"><?php echo $extension['name']; ?></option>
                                    <?php } else { ?>
                                        <?php foreach ($extension['module'] as $module) { ?>
                                            <option value="<?php echo $module['code']; ?>"><?php echo $module['name']; ?></option>
                                        <?php } ?>
                                    <?php } ?>
                                </optgroup>
                            <?php } ?>
                        </select>
                        <div class="input-group-btn">
                            <button type="button" onclick="addModule('column-full');" data-toggle="tooltip" title="<?php echo $button_module_add; ?>" class="btn btn-primary btn-sm">
                                <i class="fa fa-plus-circle"></i>
                            </button>
                        </div>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
</div>

Now on the same page find:

$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom

Then add #module-content-full just after that code above in two places and final JavaScript codes will look like below:

import App from './app.js';

const app = new App();

$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom, #module-content-full').delegate("select[name*='code']", 'change', function() {
  var part = this.value.split('.');
  if (!part[1]) {
    $(this)
      .parent()
      .find('a')
      .attr(
        'href',
        'index.php?route=extension/module/' +
          part[0] +
          '&token=<?php echo $token; ?>'
      );
  } else {
    $(this)
      .parent()
      .find('a')
      .attr(
        'href',
        'index.php?route=extension/module/' +
          part[0] +
          '&token=<?php echo $token; ?>&module_id=' +
          part[1]
      );
  }
});

$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom, #module-content-full').trigger('change');

Admin works completed now we have to work in front end or presentation layer.

Front end works:

First, make the content full Controller and .tpl file to show the modules:

Create a file named content_full.tpl at catalog\view\theme\default\template\common folder and place the code below:

<?php foreach ($modules as $module) { ?>
<?php echo $module; ?>
<?php } ?>

Similarly, create another file named content_full.php at catalog\controller\common folder and place the code below:

<?php
class ControllerCommonContentFull extends Controller {
 public function index() {
 $this->load->model('design/layout');

 if (isset($this->request->get['route'])) {
 $route = (string)$this->request->get['route'];
 } else {
 $route = 'common/home';
 }

 $layout_id = 0;

 if ($route == 'product/category' && isset($this->request->get['path'])) {
 $this->load->model('catalog/category');

 $path = explode('_', (string)$this->request->get['path']);

 $layout_id = $this->model_catalog_category->getCategoryLayoutId(end($path));
 }

 if ($route == 'product/product' && isset($this->request->get['product_id'])) {
 $this->load->model('catalog/product');

 $layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);
 }

 if ($route == 'information/information' && isset($this->request->get['information_id'])) {
 $this->load->model('catalog/information');

 $layout_id = $this->model_catalog_information->getInformationLayoutId($this->request->get['information_id']);
 }

 if (!$layout_id) {
 $layout_id = $this->model_design_layout->getLayout($route);
 }

 if (!$layout_id) {
 $layout_id = $this->config->get('config_layout_id');
 }

 $this->load->model('extension/module');

 $data['modules'] = array();
 $modules = $this->model_design_layout->getLayoutModules($layout_id, 'column_full');

 foreach ($modules as $module) {
 $part = explode('.', $module['code']);

 if (isset($part[0]) && $this->config->get($part[0] . '_status')) {
 $module_data = $this->load->controller('extension/module/' . $part[0]);

 if ($module_data) {
 $data['modules'][] = $module_data;
 }
 }

 if (isset($part[1])) {
 $setting_info = $this->model_extension_module->getModule($part[1]);

 if ($setting_info && $setting_info['status']) {
 $output = $this->load->controller('extension/module/' . $part[0], $setting_info);

 if ($output) {
 $data['modules'][] = $output;
 }
 }
 }
 }
 return $this->load->view('common/content_full', $data);
 }
}

Now show this at the account/login layout

Open catalog\controller\account\login.php controller file and find the following line:

$data['column_right'] = $this->load->controller('common/column_right');

Then below it add following code:

$data['content_full'] = $this->load->controller('common/content_full');

Open catalog\view\theme\default\template\account\login.tpl file and find following code:

<?php echo $header; ?>

Below it adds the following line of code:

<?php echo $content_full; ?>

Ocmod file to add the full-width position to all layout at the front end:

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Full Width Module Position</name>
    <version>1.0</version>
    <author>WebOCreation</author>
    <link>https://webocreation.com</link>
    <code>Full_Width_Position_1_1</code>
    <file path="catalog/controller/*/*.php">
        <operation>
            <search><![CDATA[
		    $data['column_left'] = $this->load->controller('common/column_left');
            ]]></search>
            <add position="before"><![CDATA[
            $data['content_full'] = $this->load->controller('common/content_full');
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/*/*.tpl">
        <operation>
            <search><![CDATA[
		    <?php echo $header; ?>
            ]]></search>
            <add position="after"><![CDATA[
            <?php echo $content_full; ?>
            ]]></add>
        </operation>
    </file>
</modification>

Enjoy and let me know if there is any confusion so that we can move ahead to solve the problem.

Search terms: new module positions, opencart position, module positions, opencart layout, opencart layout tutorials

10 ways to speed up the Opencart 3 and 4 – website speed optimization

In this Opencart tutorial on website speed optimization, we are showing you 10 ways to speed up Opencart 3 and 4 which you can do from the free Opencart module and tips provided below. This helps to optimize website speed in Opencart and increase opencart page load speed.

Choose a better hosting provider and better cache module

Just choose a better hosting provider for Opencart, better is always expensive so choose as per your budget. Choose a good cache module for Opencart. If you are using the shared hosting then ask them which cache are they providing and use the cache module as per it, our is using LSCache so we use the LSCache module.

Defer all the extra CSS and JS at the footer.

In the module, we just defer all the JavaScript with ‘defer=”defer”‘, with this, the script will not run until after the page has loaded, better to use only for the external scripts.

<script defer='defer' src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>

For jQuery, we load at first because it is a building block so we load at the header and without defer. The following is the Ocmod XML which makes those changes. This is done with above downloaded module and works only for the Opencart 3, for opencart 4 we will provide it soon.

<file path="catalog/controller/common/header.php">
    <operation>
      <search>
        <![CDATA[
		      $data['links'] = $this->document->getLinks();
        ]]>
      </search>
      <add position="replace">
        <![CDATA[
        $data['links'] ="";
          //$data['links'] = $this->document->getLinks();
        ]]>
      </add>
    </operation>
    <operation>
      <search><![CDATA[
		$data['styles'] = $this->document->getStyles();
]]>      </search>
      <add position="replace"><![CDATA[
      $data['styles'] ="";
  //$data['styles'] = $this->document->getStyles();
]]>      </add>
    </operation>
  </file>
  <file path="catalog/controller/common/footer.php">
    <operation>
      <search><![CDATA[
		$data['scripts'] = $this->document->getScripts('footer');
]]>      </search>
      <add position="after"><![CDATA[
    $data['links'] = $this->document->getLinks();
    $data['styles'] = $this->document->getStyles();
    //$data['scripts'] = $this->document->getScripts();
]]>      </add>
    </operation>
  </file>
  <file path="catalog/view/theme/*/template/common/header.twig">
    <operation>
      <search><![CDATA[
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
]]>      </search>
      <add position="replace" offset="6"><![CDATA[
<!--<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">-->
]]>      </add>
    </operation>
    <operation>
      <search><![CDATA[
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
]]>      </search>
      <add position="replace" offset="3"><![CDATA[
<!--<script src="catalog/view/javascript/common.js" type="text/javascript"></script>-->
]]>      </add>
    </operation>
  </file>
  <file path="catalog/view/theme/*/template/common/footer.twig">
    <operation>
      <search>
        <![CDATA[{% for script in scripts %}]]>
      </search>
      <add position="before"><![CDATA[
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
    
{% for style in styles %} 
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
<script defer="defer" src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
]]>      </add>
    </operation>
  </file>

Use the image sizes properly

One idea to size the image is to use the ratio in all image settings. The best image ratio is 16:9. So, create images of size 1200px width and 675 px height and in all settings use a 16:9 ratio. Go to Admin >> Extensions >> Extensions >> Choose Theme as extension type >> Then edit your active theme >> Then enter the sizes for Images in the ratio of 16:9, like we are using it as:

Opencart image sizes width and height

Use the proper extension for the image:

JPEGs are for photographs and realistic images. PNGs are for line art, text-heavy images, and images with few colors. See the difference

PNG vs JPEG load time

You can easily convert the PNG to jpeg or jpeg to PNG online as well as on Photoshop. Like, we use https://www.photopea.com/ online tool to convert them which is easy and fast.

Convert Jpeg to Png

Optimize the image properly

Use the ImageOptim for properly optimizing the image. It optimizes as per the page speed insight. You can download the ImageOptim here. Right-click the image and open with ImageOptim and it will optimize and replace the image with an optimized one.

image optimizer opencart

Lazy loading of images:

With just adding loading=”lazy” in the image tag it will lazy load the images.

 <img loading="lazy" src="catalog/language/en-gb/en-gb.png" alt="English" title="English">

Created one module for lazy loading of the image:

<file path="catalog/view/theme/*/*/*/*.twig|catalog/view/theme/*/template/*/*/*.twig">
    <operation>
      <search>
        <![CDATA[<img ]]>
      </search>
      <add position="replace">
        <![CDATA[<img loading="lazy"   ]]>
      </add>
    </operation>
  </file>

GZIP for more efficient transfer to requesting clients. The compression level must be between 0 – 9.

Gzip Compression is an effective way to reduce the size of files. To enable the text compression in Opencart, go to Admin >> System >> Settings >> Server tab >> Add the “Output Compression Level”. The value should be 0-9, what we find out is most of the time it works above 5 but hit and trial is the only option that we see. With these, it minimizes the byte size of network responses and fewer bytes means the page loads fast.

Speed up the repeat visit by serving static assets with an efficient cache policy 

You can serve static assets with an efficient cache policy by adding the following code in the .htaccess file, these are just our ideas, you can make changes as per your requirement and this is code to add on the .htaccess for Apache server, if you are using nginx then you can configure similarly

# Set up 1 week caching on javascript and CSS
<FilesMatch “\.(js|css)$”>
ExpiresDefault A604800
Header append Cache-Control “proxy-revalidate”
SetOutputFilter DEFLATE
</FilesMatch>
# LBROWSERCSTART Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif “access 1 year”
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType image/x-icon “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/javascript “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/javascript “access 1 month”
ExpiresByType application/x-javascript “access 1 month”
ExpiresByType application/xhtml-xml “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresDefault “access 1 month”
</IfModule>
# END Caching LBROWSERCEND

Compress and minify the output

<file path="system/library/response.php">
        <operation>
            <search position="replace"><![CDATA[
    public function output() {
            ]]></search>
            <add><![CDATA[
    public function output() {
        if ($this->output) {
            $this->output = preg_replace("/(\n)+/", "\n", $this->output);
            $this->output = preg_replace("/\r\n+/", "\n", $this->output);
            $this->output = preg_replace("/\n(\t)+/", "\n", $this->output);
            $this->output = preg_replace("/\n(\ )+/", "\n", $this->output);
            $this->output = preg_replace("/\>(\n)+</", '><', $this->output);
            $this->output = preg_replace("/\>\r\n</", '><', $this->output);
        }
            ]]></add>
        </operation>
    </file>

Minify your HTML, CSS, and JS

<file path="system/library/template.php">
    <operation>
      <search><![CDATA[return $this->adaptor->render($template, $cache);]]></search>
      <add position="replace"><![CDATA[
    if (strpos($template, 'template/') !== false) {
        return $this->minify($this->adaptor->render($template, $cache));
    } else {
        return $this->adaptor->render($template, $cache);
    }
            ]]>      </add>
    </operation>
    <operation>
      <search><![CDATA[private $adaptor;]]></search>
      <add position="after"><![CDATA[
    /**
	 * @param	string	$body
	 * @return	string
 	*/
	public function minify($body) {
        $search = array(
            '/\>[^\S ]+/s',     // strip whitespaces after tags, except space
            '/[^\S ]+\</s',     // strip whitespaces before tags, except space
            '/(\s)+/s',         // shorten multiple whitespace sequences
        );
        $replace = array(
            '>',
            '<',
            '\\1',
            ''
        );
        $body = preg_replace($search, $replace, $body);
        return $body;
    }
            ]]>      </add>
    </operation>
  </file>

Index the database table

First backup your database.
Download the turbo.php, upload it where Opencart is installed, run YOURSITEURL/turbo.php and click the “Add Database Indexes” button, this will index all the database tables as per column name.

https://github.com/lilalaunesau/opencart-turbo/blob/master/turbo.php

Or you can run the following SQL directly in your database:

ALTER TABLE `oc_category` ADD INDEX ( `parent_id` ) ;
ALTER TABLE `oc_category` ADD INDEX ( `top` ) ;
ALTER TABLE `oc_category` ADD INDEX ( `sort_order` ) ;
ALTER TABLE `oc_category` ADD INDEX ( `status` ) ;
ALTER TABLE `oc_category_description` ADD INDEX ( `language_id` );
ALTER TABLE `oc_category_to_store` ADD INDEX ( `store_id` );
ALTER TABLE `oc_category_path` ADD INDEX ( `path_id` );
ALTER TABLE `oc_product` ADD INDEX ( `model` ) ;
ALTER TABLE `oc_product` ADD INDEX ( `sku` ) ;
ALTER TABLE `oc_product` ADD INDEX ( `upc` ) ;
ALTER TABLE `oc_product` ADD INDEX ( `manufacturer_id` ) ;
ALTER TABLE `oc_product` ADD INDEX ( `sort_order` ) ;
ALTER TABLE `oc_product` ADD INDEX ( `status` ) ;
ALTER TABLE `oc_product_option` ADD INDEX ( `option_id` ) ;
ALTER TABLE `oc_product_option_value` ADD INDEX ( `product_option_id` ) ;
ALTER TABLE `oc_product_option_value` ADD INDEX ( `product_id` ) ;
ALTER TABLE `oc_product_option_value` ADD INDEX ( `option_id` ) ;
ALTER TABLE `oc_product_option_value` ADD INDEX ( `option_value_id` ) ;
ALTER TABLE `oc_product_to_category` ADD INDEX ( `category_id` );
ALTER TABLE `oc_product_attribute` ADD INDEX ( `attribute_id` );
ALTER TABLE `oc_product_attribute` ADD INDEX ( `language_id` );
ALTER TABLE `oc_product_description` ADD INDEX ( `language_id` );
ALTER TABLE `oc_product_to_store` ADD INDEX ( `store_id` );
ALTER TABLE `oc_option` ADD INDEX ( `sort_order` ) ;
ALTER TABLE `oc_option_description` ADD INDEX ( `name` ) ;
ALTER TABLE `oc_option_value` ADD INDEX ( `option_id` ) ;
ALTER TABLE `oc_option_value_description` ADD INDEX ( `option_id` ) ;
ALTER TABLE `oc_url_alias` ADD INDEX ( `query` ) ;
ALTER TABLE `oc_url_alias` ADD INDEX ( `keyword` ) ;
ALTER TABLE `oc_url_alias` ADD INDEX ( `url_alias_id` );

Developer or Designer tasks: Ensure text remains visible during Webfont load

Follow the idea provided at https://developers.google.com/web/updates/2016/02/font-display. Just for your information, we tried that and in our case, we used font-display: swap, and only works. Something like below:

@font-face {
font-family: ‘Arvo’;
font-display: swap;
src: local(‘Arvo’), url(https://fonts.gstatic.com/s/arvo/v9/rC7kKhY-eUDY-ucISTIf5PesZW2xOQ-xsNqO47m55DA.woff2) format(‘woff2’);
}

Look for Critical CSS: Defer unused CSS, remove all unused CSS on a page, and try to target CSS for each page.

https://developers.google.com/web/tools/lighthouse/audits/unused-css

In this way, you can perform the Opencart website speed optimization, please let us know if you have any other tips and tricks. You can visit Opencart SEO to read around 25 best practices for Opencart SEO. Let us know if you have questions or concerns so that we can help you out. Till then please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook.

The whole code XML is below:

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>10 ways to speed up the Opencart site</name>
  <code>webocreationpagespeed100</code>
  <version>1.0.0</version>
  <author>Rupak Nepali</author>
  <link>https://webocreation.com</link>
  <file path="catalog/view/theme/*/*/*/*.twig|catalog/view/theme/*/template/*/*/*.twig">
    <operation>
      <search>
        <![CDATA[<img ]]>
      </search>
      <add position="replace">
        <![CDATA[<img loading="lazy"  ]]>
      </add>
    </operation>
  </file>
  <file path="system/library/response.php">
    <operation>
      <search position="replace"><![CDATA[
    public function output() {
            ]]>      </search>
      <add><![CDATA[
    public function output() {
        /*source compressor*/
        if ($this->output) {
            //$this->output = preg_replace('/<!--(.|\n)*?-->/', " ", $this->output);
            $this->output = preg_replace("/(\n)+/", "\n", $this->output);
            $this->output = preg_replace("/\r\n+/", "\n", $this->output);
            $this->output = preg_replace("/\n(\t)+/", "\n", $this->output);
            $this->output = preg_replace("/\n(\ )+/", "\n", $this->output);
            $this->output = preg_replace("/\>(\n)+</", '><', $this->output);
            $this->output = preg_replace("/\>\r\n</", '><', $this->output);
        }
            ]]>      </add>
    </operation>
  </file>
  <file path="catalog/controller/common/header.php">
    <operation>
      <search>
        <![CDATA[
		      $data['links'] = $this->document->getLinks();
        ]]>
      </search>
      <add position="replace">
        <![CDATA[
        $data['links'] ="";
          //$data['links'] = $this->document->getLinks();
        ]]>
      </add>
    </operation>
    <operation>
      <search><![CDATA[
		$data['styles'] = $this->document->getStyles();
]]>      </search>
      <add position="replace"><![CDATA[
      $data['styles'] ="";
  //$data['styles'] = $this->document->getStyles();
]]>      </add>
    </operation>
  </file>
  <file path="catalog/controller/common/footer.php">
    <operation>
      <search><![CDATA[
		$data['scripts'] = $this->document->getScripts('footer');
]]>      </search>
      <add position="after"><![CDATA[
    $data['links'] = $this->document->getLinks();
    $data['styles'] = $this->document->getStyles();
    //$data['scripts'] = $this->document->getScripts();
]]>      </add>
    </operation>
  </file>
  <file path="catalog/view/theme/*/template/common/header.twig">
    <operation>
      <search><![CDATA[
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
]]>      </search>
      <add position="replace" offset="6"><![CDATA[
<!--<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">-->
]]>      </add>
    </operation>
    <operation>
      <search><![CDATA[
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
]]>      </search>
      <add position="replace" offset="3"><![CDATA[
<!--<script src="catalog/view/javascript/common.js" type="text/javascript"></script>-->
]]>      </add>
    </operation>
  </file>
  <file path="catalog/view/theme/*/template/common/footer.twig">
    <operation>
      <search>
        <![CDATA[{% for script in scripts %}]]>
      </search>
      <add position="before"><![CDATA[
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
{% for style in styles %} 
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
<script defer="defer" src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
]]>      </add>
    </operation>
  </file>
  <file path="system/library/template.php">
    <operation>
      <search><![CDATA[return $this->adaptor->render($template, $cache);]]></search>
      <add position="replace"><![CDATA[
    if (strpos($template, 'template/') !== false) {
        return $this->minify($this->adaptor->render($template, $cache));
    } else {
        return $this->adaptor->render($template, $cache);
    }
            ]]>      </add>
    </operation>
    <operation>
      <search><![CDATA[private $adaptor;]]></search>
      <add position="after"><![CDATA[
    /**
	 * @param	string	$body
	 * @return	string
 	*/
	public function minify($body) {
        $search = array(
            '/\>[^\S ]+/s',     // strip whitespaces after tags, except space
            '/[^\S ]+\</s',     // strip whitespaces before tags, except space
            '/(\s)+/s',         // shorten multiple whitespace sequences
        );
        $replace = array(
            '>',
            '<',
            '\\1',
            ''
        );
        $body = preg_replace($search, $replace, $body);
        return $body;
    }
            ]]>      </add>
    </operation>
  </file>
</modification>

Administrator Theme editor in Opencart 3.0.2.0 default theme

In OpenCart version 3, we can see the theme editor features where the administrator can directly change the code in the template of the default theme from the admin dashboard. While we test on Opencart version 3.0.3.2, we were able to edit only the default template, if we activate another theme, we still keep seeing the default theme’s template files, so it looks like it is working only for the default theme. So, if you guys are using the default theme then you can make the code changes directly from the admin, with no need for FTP or SFTP configuration.

Steps to make the theme editor

Login to the admin and then navigate to Design >> Theme Editor, where you see a dashboard like below image:

Theme Editor Opencart

You can choose the store that you like to make changes to, here we choose the default store. You can see the theme history which lists out all the files changed. In the template section, you can select the folder and it will show the files where you can edit the file. You can get more details about the files and folders in the Opencart video. Let’s click the account, it will show lists of twig template files in that theme folder, once we click on the account we see these twig files list when we click on the account.twig then we see code on the right.

Code changes in Opencart

We like to hide the breadcrumbs so in the code we add style=”display:none;” like above, and see in the front end the breadcrumbs are hidden on the account page. If you see an error then you can click the Reset button which will change to the default code.

Opencart theme editor

In this way, you can make the code change directly from the admin section. If the code changes are not seen don’t forget to clear the theme and SASS cache from the dashboard, likewise go to Extensions >> Modifications and then click the refresh button. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us on our Twitter account @rupaknpl. Subscribe to our YouTube channel for Opencart tutorials, and click to see all Opencart user manuals.

Opencart set up taxes with geocodes US tax for California residents 8.75%

In this Opencart tutorial, we show you how to set up taxes with geocodes in Opencart for each product by giving you an example of US taxes for California residents 8.75%. Setting up taxes in OpenCart is essential to ensure compliance with local regulations and accurate pricing for your customers. With OpenCart’s geo zones feature, you can easily configure tax rates based on the geographic locations of your customers. Here’s a step-by-step guide to setting up taxes in OpenCart using geo zones.

Why Use Geo Zones for Tax Setup?

Geo zones in OpenCart allow you to apply specific tax rates based on customer location, which is especially helpful if you operate across multiple regions or countries with varying tax rules. By customizing tax rates per region, you can:

  1. Ensure Accurate Tax Calculation: Meet tax regulations based on customer locations.
  2. Simplify Tax Management: Easily manage and update tax settings as needed.
  3. Enhance Customer Experience: Provide transparency in pricing with region-specific tax rates.

Step-by-Step Guide to Setting Up Taxes with Geo Zones in OpenCart

Let’s dive into setting up taxes in OpenCart by using geo zones.

Step 1: Define Geo Zones for Target Regions

  1. Go to the OpenCart Admin Dashboard.
  2. Navigate to System > Localization > Geo Zones.
  3. Click Add New to create a geo zone.
  4. Fill in the Geo Zone Name (e.g., “US State Tax” or “EU VAT Zone”) and add a Description.
  5. Under the Geo Zone tab, click Add Geo Zone.
    • Select Country and Region/State to specify the areas this tax rate applies to.
  6. Save the geo zone.

Repeat this step for each location where you need to apply specific tax rates.

Step 2: Create Tax Classes for Different Products

Tax classes help apply tax rates to various product types. To create tax classes:

  1. Go to System > Localization > Tax Classes.
  2. Click Add New to create a tax class.
  3. Enter the Tax Class Title (e.g., “Standard Tax,” “Reduced Tax”).
  4. In the Tax Rate section, specify:
    • Priority: Set a priority level if you have multiple tax rates.
    • Geo Zone: Select the geo zone to apply to this tax rate.
  5. Save the tax class.

Step 3: Define Tax Rates

  1. Go to System > Localization > Tax Rates.
  2. Click Add New to create a new tax rate.
  3. Fill in the following:
    • Tax Name: Give it a descriptive name, like “California Sales Tax.”
    • Rate: Enter the percentage of the tax rate (e.g., “8.5”).
    • Type: Select Percentage for most tax setups.
    • Geo Zone: Choose the geo zone you created earlier.
  4. Save the tax rate.

Repeat for each tax rate that corresponds to your geo zones.

Step 4: Apply Tax Classes to Products

  1. Go to Catalog > Products in the OpenCart Admin Dashboard.
  2. Edit the product to which you want to apply the tax class.
  3. In the Data tab, locate the Tax Class dropdown.
  4. Select the appropriate tax class (e.g., “Standard Tax” or “Reduced Tax”).
  5. Save your changes.

Step 5: Configure Store Tax Settings

For OpenCart to apply the correct tax rates based on geo zones, check your tax settings:

  1. Go to System > Settings > Edit for your store.
  2. In the Options tab, set the following:
    • Display Prices With Tax: Choose Yes if you want product prices to include taxes.
    • Calculate Taxes Based On: Select the Shipping Address or Payment Address depending on your tax regulations.
    • Use Store Tax Address: Choose whether to use the store’s location for tax calculations on non-shipping orders.

Step 6: Test the Tax Setup

Place a test order to confirm that taxes are calculated correctly based on the customer’s address. Ensure that products display tax-inclusive prices (if configured), and verify that different addresses in your geo zones reflect the accurate tax rates.

Need to set up US Taxes for California residents where CA Tax is 8.75%.

  • Login to Admin
  • Go to Left Menu >> System >> Localisation >> Geo Zones >> Click Add button, then fill as in the image below:
Geo zones set up
  • Go to Left Menu >> System >> Localisation >> Taxes >> Tax Rates >> Click Add button, then fill as in the image below:
Tax rates setup in Opencart
  • Go to Left Menu >> System >> Localisation >> Taxes >> Tax Classes >> Click Add button, then fill as in the image below:
Tax classes setup in Opencart
  • Please choose the Payment Address or Shipping Address as per your need.
  • Now go to Catalog >> Products >> Add/Edit your product >> Choose the Tax Class:
Tax class setup for product
  • In the checkout section tax is applied when your payment address’s state is California:
Tax in shopping cart Opencart

Conclusion

Configuring taxes in OpenCart using geo zones allows you to automate tax calculations accurately across various regions. By following this setup, you ensure compliance and transparency with customer pricing, enhancing both store management and customer experience. With OpenCart’s flexibility, you can adapt to regional tax changes easily and continue to scale your business globally. In this way, you can set up taxes with geocodes in Opencart. Let us know if need any support. Hope you liked this post, please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook.

Error: A theme has not been assigned to this store! Opencart

The error “A theme has not been assigned to this store!” in OpenCart usually means that a theme is not set for the current store, often due to configuration issues after a fresh installation or update.

Opencart Theme Error

Here’s how to resolve it

Assign a Theme to the Store:

  • Go to the OpenCart Admin Dashboard.
  • Navigate to System > Settings.
  • Select the store you are configuring (e.g., Default Store).
  • Go to the Theme tab.
  • Ensure that a theme (e.g., Default or your custom theme) is selected in the “Theme Directory” dropdown.
  • Click Save to apply the settings.

    Sometimes you will see the above theme error and when you log in to the admin section you will see an error notice like: “Notice: date_default_timezone_set(): Timezone Id is invalid”. In that case, you can just set the timezone in the local tab of settings.

    Opencart timezone invalid

    Clear the Cache:

    • Go to Dashboard > Extensions > Modifications.
    • Click on the Refresh button to clear and rebuild the modification cache.
    • Next, navigate to Dashboard > Developer Settings.
    • Under Theme and SASS, click Clear Cache.

    Verify the Theme Files:

    • Ensure that the theme files are correctly uploaded to the /catalog/view/theme/ directory.
    • If you’re using a custom theme, verify that its files are correctly installed and compatible with your OpenCart version.

    Database Check (if required):

    1. If the above steps don’t resolve the issue, you may want to check your OpenCart database.
    2. In the oc_setting table (prefix may vary), look for the key config_theme under your store’s settings, and ensure it matches the directory name of your theme in /catalog/view/theme/.

    After these steps, your store should be assigned a theme, and the error should be resolved. Let us know if you encounter any further issues! lease let us know if you have any kind of projects, you can email us at webocreation.com@gmail.com. Please subscribe to our YouTube Channel and get more Opencart free extensions and tutorials. You can also find us on Twitter and Facebook.

    How to add an Analytics extension in Opencart 4? Third-party JS free Opencart extension

    With the launch of Opencart 4 we did not find the Google Analytics Opencart 4 module that we used to have in Opencart 3, so to fulfill that requirement we created a free Opencart extension called Third Party JS extension where you can add the Javascript code provided by third-party like Google Analytics, Facebook pixel, etc and add it on this extension.

    How to install the Opencart 4 module?

    Log in to Admin >> Extensions >> Installer >> Click the Upload button and select the file that ends with .ocmod.zip. In the above download example, it is third_party_js.ocmod.zip. Once it is installed you will see the “Third Party JS” in the installed extensions.

    Once you uploaded the zip file, you click the install green icon to install the extension.

    Installed extensions Opencart 4

    Once you clicked the install button, your extension is installed successfully

    opencart 4 extension installation success

    Once you see the success message. Now you can go to Admin >> Extensions >> Extension. Then, choose the extension type “Analytics”  and click the install green install button.

    Read More: Add HTML, google analytics, tag manager, and third-party JS code in Opencart

    google analytics opencart 4

    Once you click the install button, you can edit the store and you will see a form where you can install the third-party JavaScript like below and enable the status and click the blue save button.

    Google Analytics Opencart 4 extension

    After clicking the save, now the JavaScript code is shown at the head tag.

    code added in the header Opencart 4

    In this way, you can install the Opencart 4 extensions and use our free Opencart 4 analytics extension for your website.  Hope you liked this post, let us know if you have any questions or suggestions, please subscribe to our YouTube Channel for Opencart video tutorials. You can also find us on Twitter and Facebook. Enjoy Google Analytics Opencart 4 module!

    How to add reports in the admin dashboard of Opencart 4?

    As we were in the process of upgrading the Opencart from 3 to 4, we complete the upgrade and saw our admin dashboard reports are all gone, and it took us some time to figure out where we can enable the dashboard reports. Here is our finding which was so simple:

    Empty Dashboard:

    Empty dashboard

    Dashboard reports

    Every report is created as the dashboard extension, so to add the reports, go to admin >> Extensions >> Extensions >> Filter out with Dashboard >> Install all the extensions needed >> Edit it >> Give the width >> Enable the status >> Add sort order where you want to show and Save. As we need all of the reports so we enable all of the Dashboard reports.

    Dashboard extensions reports

    Read More: Dashboard extensions details of Opencart 4

    With the above settings, you will be able to see reports like below:

    Reports admin dashboard

    In this way, you can enable or disable the required admin dashboard reports. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our Twitter account @rupaknpl and subscribe to our YouTube channel for opencart tutorials.

    Featured