Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6768581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:05:30+00:00 2026-05-26T15:05:30+00:00

Please some one tell me how can I position modules like slider or banner

  • 0

Please some one tell me how can I position modules like slider or banner in header or how can we define additional regions for the modules.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:05:31+00:00Added an answer on May 26, 2026 at 3:05 pm

    Well, I am working on it.

    Firstly, you should add a new position in the admin page.
    Which means you should change three files and add some lines into each.

    For example, if you want to add slideshow into header, you should add a new position in

    $this->data['text_header'] = $this->language->get('text_header'); // in admin/controller/slideshow.php
    

    ////////////////////////////////////////////////

    $_['text_header']         = 'Header'; // in admin/language/slideshow.php
    

    ////////////////////////////////////////////////

    <?php if ($module['position'] == 'header') { ?> // in admin/view/slideshow.tpl
                <option value="header" selected="selected"><?php echo $text_header; ?></option>
                <?php } else { ?>
                <option value="header"><?php echo $text_header; ?></option>
                <?php } ?>
    

    Then a new position for slideshow has been defined. and you can choose it in the admin page.

    After that, you should add those codes in catalog/view/header.tpl

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

    Then, in the catalog/controller/header.php, add some codes like content_top.php does:
    $layout_id = 1;

    $module_data = array();
    
    $this->load->model('setting/extension');
    
    $extensions = $this->model_setting_extension->getExtensions('module');      
    
    foreach ($extensions as $extension) {
        $modules = $this->config->get($extension['code'] . '_module');
    
        if ($modules) {
            foreach ($modules as $module) {
                if ($module['layout_id'] == $layout_id && $module['position'] == 'header' && $module['status']) {
                    $module_data[] = array(
                        'code'       => $extension['code'],
                        'setting'    => $module,
                        'sort_order' => $module['sort_order']
                    );              
                }
            }
        }
    }
    
    $sort_order = array(); 
    
    foreach ($module_data as $key => $value) {
        $sort_order[$key] = $value['sort_order'];
    }
    
    array_multisort($sort_order, SORT_ASC, $module_data);
    
    $this->data['modules'] = array();
    
    foreach ($module_data as $module) {
        $module = $this->getChild('module/' . $module['code'], $module['setting']);
    
        if ($module) {
            $this->data['modules'][] = $module;
        }
    }
    
    
    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
        $this->template = $this->config->get('config_template') . '/template/common/header.tpl';
    } else {
        $this->template = 'default/template/common/header.tpl';
    }
    
    $this->render();
    

    Then all done.

    The only problem for this code is the slideshow cannot display as a slideshow but a static picture or pictures.

    Wish you could solve it out and reply to me.
    My question post:
    Opencart developement: change slideshow's position

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please can some one briefly tell me with example what does the means of
Can some one please tell me the problem with this code. I am reading
can some one please tell me where is the mistake from my side, to
Can some one please tell me why I get odd results rurning the following
can some one please tell me, how can I checks each minute and reports
can some one please tell me, how can I write a awk program to
Can some one please tell me how to check if a unix process with
Can some one please tell me if I should use user controls in my
Can some one please tell me how can I find the following. List from
Can some one please tell me what is the difference between vector vs deque.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.