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

Admin works

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

Just below it add following code:

Now on the same page find:

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

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:

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

Now show this at the account/login layout

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

Then below it add following code:

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

Below it add following line of code:

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

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

Thanks

Rupak Nepali

Search terms:

new module positions, opencart position, module positions, opencart layout, opencart layout tutorials

9 COMMENTS

    • Hi Avni,

      Hope you have clicked the blue plus button and select module.
      I was also one time confused by changing the Account to another module.

      Hope that can be one case.

      If not then can you please provide me the Extensions Modifications error logs.

      Thanks
      Rupak

  1. Hi! Thank you for this helpfull article. But I have another issue, maybe you know a way to make position in the footer that will be shown on all pages?
    Thank you.

  2. Hi… thanks for the great tutorial… but i have one question… i did exactly as you describe here a even downloaded your ocmod at tried with it but i am constantly getting an error or message on the top of the page…
    1Array ( [0] => Array ( [layout_module_id] => 111 [layout_id] => 1 [code] => layerslider.32 [position] => column_full [sort_order] => 0 ) )

    the position is working in admin and in front page to… but how can i get reed of this… something is not completly wright i guess sand i cant figure out what is it?

    I am using OC 2.3.0.2 default template.

    Thank you in advance

    • Go to catalog\controller\common\content_full.php and at around 51 you will see
      echo $layout_id;
      And at line 54 you will see
      print_r($modules);

      Remove these codes and you will be able to enjoy the module.

      Or I have updated the download files. You can download it.

      Thanks
      Rupak

  3. Hi,

    Did all the steps but:
    1. Full Width module appears twice in the admin pannel
    2. The content selcted for Full Width position is not shown on front end

    Can you help?

LEAVE A REPLY

Please enter your comment!
Please enter your name here