opencart 2.0.1.1版本如何创建仓位

how can we create a position for the 2.0.1.1 opencart version

Opencart 有四个布局左,右上和 Bottom.Adding 新的自定义位置手动当然不是不可能的,但理想情况下需要在核心完成。

"header-bottom" 或 "footer-top" 之类的内容对许多模块非常有用,例如 "Menus" 和 "Slideshows"。

opencart 2.0.1.1版本如何创建如上位置

请帮助我谢谢

我正在制作

footer_top POSITION similarly you can make any position

Add code in opencart2\catalog\controller\common\home.php line 15(you can understand where to put this line or ask it)

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

And Add this code in opencart2\catalog\view\theme\default\template\common\home.tpl on line 13

 <div id="content" class="col-sm-12"><?php echo $footer_top; ?></div>

copy -> opencart2\catalog\controller\common\content_top.php

to ----> opencart2\catalog\controller\common\footer_top.php

And change line 44

来自

$modules = $this->model_design_layout->getLayoutModules($layout_id, 'content_top');

$modules = $this->model_design_layout->getLayoutModules($layout_id, 'footer_top');

Open opencart2\admin\view\template\design\layout_form.tpl and add this code In select position dropdown options

    <?php if ($layout_module['position'] == 'footer_top') { ?>
            <option value="footer_top" selected="selected">footer top</option>
            <?php } else { ?>
            <option value="footer_top">footer top</option>
            <?php } ?>

并在

之后添加以下代码
html += '    < option value="content_top"><?php echo $text_content_top; ?>< /option>'; 

addmodule() 函数中的行

html += '    < option value="footer_top">footer top< /option>';

并签入位置

opencart2/admin/index.php?route=design/layout/edit&token=7ddf86dsfdsfsdfdsfsdfdsfsdf5df&layout_id=1