{"id":382735,"date":"2023-05-29T11:43:22","date_gmt":"2023-05-29T11:43:22","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=382735"},"modified":"2023-06-05T10:49:57","modified_gmt":"2023-06-05T10:49:57","slug":"upgrade-opencart3-to-opencart4","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/","title":{"rendered":"Upgrade Opencart 3 Extension to Opencart 4"},"content":{"rendered":"\n<p>Upgrading from OpenCart version 3 extension to OpenCart version 4 is an important step to take advantage of the latest features, improvements, and security enhancements offered by the newer version of the e-commerce platform. <\/p>\n\n\n\n<p>This upgrade process requires careful planning and execution to ensure a smooth transition while preserving your store&#8217;s data and functionality.<\/p>\n\n\n\n<p>These are the major upgrade in opencart version4<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>User Interface and Design<\/li>\n\n\n\n<li>Performance Enhancements<\/li>\n\n\n\n<li>Extension Compatibility<\/li>\n\n\n\n<li>Security Enhancements<\/li>\n\n\n\n<li>Improved SEO Features<\/li>\n\n\n\n<li>Upgraded Technology Stack<\/li>\n\n\n\n<li>Directory structure<\/li>\n\n\n\n<li>Event-Based<\/li>\n<\/ul>\n\n\n\n<p>The major upgrade in the Opencart 4 is the directory structure. Version 4 now follows a different structure compared to previous versions.<\/p>\n\n\n\n<p><strong>What is the difference between version 3 &amp; version 4?<\/strong><\/p>\n\n\n\n<p>Before starting, it is important to understand the basic functionality of Version 4. In this version, Opencart has removed &#8220;ocmod,&#8221; so any modifications or changes should be made using the &#8220;event&#8221; system.<\/p>\n\n\n\n<p>Opencart Version 4 utilizes namespacing for controller definition and relies on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Guide\/AJAX\">Ajax<\/a> for handling all requests.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\" alt=\"upgrade version4 namespace\" class=\"wp-image-382884\" width=\"819\" height=\"80\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png 471w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace-300x29.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace-250x24.png 250w\" sizes=\"(max-width: 819px) 100vw, 819px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In this version 4 methods have &#8220;void&#8221; non-return-value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/method-void.png\" alt=\"method void\" class=\"wp-image-382887\" width=\"820\" height=\"145\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/method-void.png 646w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/method-void-300x53.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/method-void-250x44.png 250w\" sizes=\"(max-width: 820px) 100vw, 820px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>What upgrades are required to convert the version 3 extension to version 4?<\/strong><\/p>\n\n\n\n<p>To begin, it is important to take a backup of your files and database. Afterward, download the latest Opencart Version 4 files and configure them in a similar manner to how you had previously configured Version 3.<\/p>\n\n\n\n<p>Opencart version 4 introduces new changes, including a modification in calling class methods. To invoke a class method, you must define it in the following format: &#8220;extension\/module\/example.save&#8221;. Note that there is a dot (.) separating the class and the method.<\/p>\n\n\n\n<p><strong>Let&#8217;s start the changes in the extension to make it compatible with the latest version 4.<\/strong><\/p>\n\n\n\n<p>Ensure that you define the &#8220;namespace&#8221; in all of your extension files with the .php extension. Next, you should include an &#8220;install.json&#8221; file in the root folder of your extension.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{\n  &quot;name&quot;: &quot;Example Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;author&quot;: &quot;Webkul Software Pvt. Ltd.&quot;,\n  &quot;link&quot;: &quot;https:\/\/www.webkul.com&quot;,\n  &quot;instruction&quot;: &quot;&quot;\n}<\/pre>\n\n\n\n<p>Now let&#8217;s check the version 4 module directory structure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/directory-1.png\" alt=\"directory structure\" class=\"wp-image-382894\" width=\"820\" height=\"231\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/directory-1.png 759w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/directory-1-300x85.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/directory-1-250x70.png 250w\" sizes=\"(max-width: 820px) 100vw, 820px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now we are taking an <a href=\"https:\/\/webkul.com\/blog\/how-to-create-a-module-in-opencart\/\">opencart version 3<\/a> extension example to convert into version 4.<\/p>\n\n\n\n<p><strong>Let&#8217;s upgrade the controller to version 4<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category Webkul\n * @package Opencart Module Tutorial\n * @author Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license https:\/\/store.webkul.com\/license.html\n *\/\nnamespace Opencart\\Admin\\Controller\\Extension\\Webkul\\Module;\n\/**\n * The controller class must extend the parent class i.e. Controller\n * The controller name must be like Controller + directory path (with first character of each folder in capital) + file name (with first character in capital)\n *\/\nclass FirstModule extends \\Opencart\\System\\Engine\\Controller  {\n    \/**\n     * property named $error is defined to put errors\n     * @var array\n     *\/\n    private $error = array();\n    \/**\n     * Basic function of the controller. This can be called using route=module\/first_module\n     *\/\n    public function index():void {\n        \/**\n         * Loads the language file. Path of the file along with file name must be given\n         *\/\n        $this-&gt;load-&gt;language(&#039;extension\/module\/first_module&#039;);\n        \/**\n         * Sets the title to the html page\n         *\/\n        $this-&gt;document-&gt;setTitle($this-&gt;language-&gt;get(&#039;heading_title&#039;));\n        \n        \/**\n         * Putting the language into the &#039;$data&#039; array\n         * This is the way how you get the language from the language file\n         *\/\n        $data&#091;&#039;heading_title&#039;] = $this-&gt;language-&gt;get(&#039;heading_title&#039;);\n\n        $data&#091;&#039;text_edit&#039;] = $this-&gt;language-&gt;get(&#039;text_edit&#039;);\n        $data&#091;&#039;text_enabled&#039;] = $this-&gt;language-&gt;get(&#039;text_enabled&#039;);\n        $data&#091;&#039;text_disabled&#039;] = $this-&gt;language-&gt;get(&#039;text_disabled&#039;);\n\n        $data&#091;&#039;entry_status&#039;] = $this-&gt;language-&gt;get(&#039;entry_status&#039;);\n\n        $data&#091;&#039;button_save&#039;] = $this-&gt;language-&gt;get(&#039;button_save&#039;);\n        $data&#091;&#039;button_cancel&#039;] = $this-&gt;language-&gt;get(&#039;button_cancel&#039;);\n        \/**\n         * If there is any warning in the private property &#039;$error&#039;, then it will be put into &#039;$data&#039; array\n         *\/\n        if (isset($this-&gt;error&#091;&#039;warning&#039;])) {\n            $data&#091;&#039;error_warning&#039;] = $this-&gt;error&#091;&#039;warning&#039;];\n        } else {\n            $data&#091;&#039;error_warning&#039;] = &#039;&#039;;\n        }\n        \/**\n         * Breadcrumbs are declared as array\n         *\/\n        $data&#091;&#039;breadcrumbs&#039;] = array();\n        \/**\n         * Breadcrumbs are defined\n         *\/\n        $data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n            &#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;text_home&#039;),\n            &#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;common\/dashboard&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true)\n        );\n\n        $data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n            &#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;text_module&#039;),\n            &#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;extension\/module&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true)\n        );\n\n        $data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n            &#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;heading_title&#039;),\n            &#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;extenison\/module\/first_module&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true)\n        );\n        \/**\n         * Form action url is created and defined to $data&#091;&#039;action&#039;]\n         *\/\n        $data&#091;&#039;action&#039;] = $this-&gt;url-&gt;link(&#039;extension\/module\/first_module.save&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true);\n        \/**\n         * Cancel\/back button url which will lead you to module list\n         *\/\n        $data&#091;&#039;cancel&#039;] = $this-&gt;url-&gt;link(&#039;extension\/module&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true);\n        \/**\n         * checks whether the value exists in the post request\n         *\/\n        if (isset($this-&gt;request-&gt;post&#091;&#039;module_first_module_status&#039;])) {\n            $data&#091;&#039;module_first_module_status&#039;] = $this-&gt;request-&gt;post&#091;&#039;module_first_module_status&#039;];\n        } else {\n        \/**\n         * if the value do not exists in the post request then value is taken from the config i.e. setting table\n         *\/\n            $data&#091;&#039;module_first_module_status&#039;] = $this-&gt;config-&gt;get(&#039;module_first_module_status&#039;);\n        }\n        \/**\n         * Header data is loaded\n         *\/\n        $data&#091;&#039;header&#039;] = $this-&gt;load-&gt;controller(&#039;common\/header&#039;);\n        \/**\n         * Column left part is loaded\n         *\/\n        $data&#091;&#039;column_left&#039;] = $this-&gt;load-&gt;controller(&#039;common\/column_left&#039;);\n        \/**\n         * Footer data is loaded\n         *\/\n        $data&#091;&#039;footer&#039;] = $this-&gt;load-&gt;controller(&#039;common\/footer&#039;);\n        \/**\n         * Using this function tpl file is called and all the data of controller is passed through &#039;$data&#039; array\n         * This is for Opencart 2.2.0.0 version. There will be minor changes as per the version.\n         *\/\n        $this-&gt;response-&gt;setOutput($this-&gt;load-&gt;view(&#039;extension\/module\/first_module&#039;, $data));\n    }\n\n    \/**\n\t * save method\n\t *\n\t * @return void\n\t *\/\n\tpublic function save(): void {\n        \/**\n         * Load language file\n         *\/\n\t\t$this-&gt;load-&gt;language(&#039;extension\/module\/first_module&#039;);\n\n\t\t$json = &#091;];\n\n\t\tif (!$this-&gt;user-&gt;hasPermission(&#039;modify&#039;, &#039;extension\/webkul\/module\/first_module&#039;)) {\n\t\t\t$json&#091;&#039;error&#039;]&#091;&#039;warning&#039;] = $this-&gt;language-&gt;get(&#039;error_permission&#039;);\n\t\t}\n\n\t\tif (!$json) {\n\t\t\t\/**\n             * Loads the model file. Path of the file to be given\n             *\/\n            $this-&gt;load-&gt;model(&#039;setting\/setting&#039;);\n\n\t\t\t$this-&gt;model_setting_setting-&gt;editSetting(&#039;module_first_module&#039;, $this-&gt;request-&gt;post);\n\n\t\t\t$json&#091;&#039;success&#039;] = $this-&gt;language-&gt;get(&#039;text_success&#039;);\n\t\t}\n\n\t\t$this-&gt;response-&gt;addHeader(&#039;Content-Type: application\/json&#039;);\n\t\t$this-&gt;response-&gt;setOutput(json_encode($json));\n\t}\n}<\/pre>\n\n\n\n<p><strong>Note:<\/strong> There are no changes in the view &amp; language files.<\/p>\n\n\n\n<p>After completing all steps you can zip it and name it that ends with .ocmod.zip, then upload it from the Opencart extension installer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"582\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install-1200x582.png\" alt=\"ocv4-addon-install\" class=\"wp-image-385613\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install-1200x582.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install-300x146.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install-250x121.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install-768x373.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/ocv4-addon-install.png 1300w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1071\" height=\"1024\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions-1071x1024.png\" alt=\"Extensions\" class=\"wp-image-385615\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions-1071x1024.png 1071w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions-300x287.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions-250x239.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions-768x734.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Extensions.png 1295w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"521\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/extension-configuration-1.png\" alt=\"extension-configuration-1\" class=\"wp-image-385616\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/extension-configuration-1.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/extension-configuration-1-300x130.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/extension-configuration-1-250x109.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/extension-configuration-1-768x333.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>The previous Opencart versions had the ocmod feature to make changes in core files but now in version 4 Opencart removed the ocmod and made the extension event-based.<\/p>\n\n\n\n<p>Once you have completed that, if you wish to include a menu and other additional features, please refer to the documentation of the <a href=\"https:\/\/webkul.com\/blog\/create-opencart-version4-module\/\">event<\/a> for registration information.<\/p>\n\n\n\n<p>If you need custom&nbsp;<a href=\"https:\/\/webkul.com\/opencart-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">Opencart Development services<\/a>&nbsp;then feel free to&nbsp;<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>&nbsp;and also explore our exclusive range of&nbsp;<a href=\"https:\/\/store.webkul.com\/OpenCart-Modules.html\">Opencart Addons<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Upgrading from OpenCart version 3 extension to OpenCart version 4 is an important step to take advantage of the latest features, improvements, and security enhancements offered by the newer version of the e-commerce platform. This upgrade process requires careful planning and execution to ensure a smooth transition while preserving your store&#8217;s data and functionality. These <a href=\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":530,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305],"tags":[2071,5358,14201],"class_list":["post-382735","post","type-post","status-publish","format-standard","hentry","category-opencart","tag-opencart","tag-opencart-version-3","tag-opencart-version4-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-29T11:43:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-05T10:49:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\" \/>\n<meta name=\"author\" content=\"Yash Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yash Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\"},\"author\":{\"name\":\"Yash Gupta\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae\"},\"headline\":\"Upgrade Opencart 3 Extension to Opencart 4\",\"datePublished\":\"2023-05-29T11:43:22+00:00\",\"dateModified\":\"2023-06-05T10:49:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\"},\"wordCount\":441,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\",\"keywords\":[\"opencart\",\"opencart version 3\",\"opencart version4\"],\"articleSection\":[\"opencart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\",\"url\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\",\"name\":\"Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\",\"datePublished\":\"2023-05-29T11:43:22+00:00\",\"dateModified\":\"2023-06-05T10:49:57+00:00\",\"description\":\"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png\",\"width\":471,\"height\":46,\"caption\":\"opencart-version4-namespace\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upgrade Opencart 3 Extension to Opencart 4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae\",\"name\":\"Yash Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Yash Gupta\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/yashgupta-wp766\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog","description":"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/","og_locale":"en_US","og_type":"article","og_title":"Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog","og_description":"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.","og_url":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-29T11:43:22+00:00","article_modified_time":"2023-06-05T10:49:57+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png","type":"","width":"","height":""}],"author":"Yash Gupta","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Yash Gupta","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/"},"author":{"name":"Yash Gupta","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae"},"headline":"Upgrade Opencart 3 Extension to Opencart 4","datePublished":"2023-05-29T11:43:22+00:00","dateModified":"2023-06-05T10:49:57+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/"},"wordCount":441,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png","keywords":["opencart","opencart version 3","opencart version4"],"articleSection":["opencart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/","url":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/","name":"Upgrade Opencart 3 Extension to Opencart 4 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png","datePublished":"2023-05-29T11:43:22+00:00","dateModified":"2023-06-05T10:49:57+00:00","description":"Discover the step-by-step guide to upgrade Opencart 3 to Opencart 4 and smoothly transition your online store to the latest version.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/opencart-version4-namespace.png","width":471,"height":46,"caption":"opencart-version4-namespace"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/upgrade-opencart3-to-opencart4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Upgrade Opencart 3 Extension to Opencart 4"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae","name":"Yash Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Yash Gupta"},"url":"https:\/\/webkul.com\/blog\/author\/yashgupta-wp766\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/530"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=382735"}],"version-history":[{"count":36,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382735\/revisions"}],"predecessor-version":[{"id":385638,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382735\/revisions\/385638"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=382735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=382735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=382735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}