0

我想在额外的页脚中添加指向社交媒体(Facebook、Twitter ...)的链接;我试图修改 footer.tpl 和 footer.php 但什么也没发生;我是 opencart 和 Php 的新手:p

我试图修改 catalog\controller\common\footer.php

$data['text_information'] = $this->language->get('text_information');
        $data['text_service'] = $this->language->get('text_service');
        $data['text_extra'] = $this->language->get('text_extra');
        $data['text_contact'] = $this->language->get('text_contact');
        $data['text_return'] = $this->language->get('text_return');
        $data['text_sitemap'] = $this->language->get('text_sitemap');
        $data['text_manufacturer'] = $this->language->get('text_manufacturer');
        $data['text_voucher'] = $this->language->get('text_voucher');
        $data['text_affiliate'] = $this->language->get('text_affiliate');
        $data['text_special'] = $this->language->get('text_special');
                $data['text_facebook'] = $this->language->get('text_facebook);
        $data['text_account'] = $this->language->get('text_account');
        $data['text_order'] = $this->language->get('text_order');
        $data['text_wishlist'] = $this->language->get('text_wishlist');
        $data['text_newsletter'] = $this->language->get('text_newsletter');

    $this->load->model('catalog/information');

    $data['informations'] = array();

    foreach ($this->model_catalog_information->getInformations() as $result) {
        if ($result['bottom']) {
            $data['informations'][] = array(
                'title' => $result['title'],
                'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
            );
        }
    }

    $data['contact'] = $this->url->link('information/contact');
    $data['return'] = $this->url->link('account/return/add', '', 'SSL');
    $data['sitemap'] = $this->url->link('information/sitemap');
    $data['manufacturer'] = $this->url->link('product/manufacturer');
    $data['voucher'] = $this->url->link('account/voucher', '', 'SSL');
    $data['affiliate'] = $this->url->link('affiliate/account', '', 'SSL');
    $data['special'] = $this->url->link('product/special');
            $data['facebook'] = $this->url->link('Here i think the link to my facebook page');
    $data['account'] = $this->url->link('account/account', '', 'SSL');
    $data['order'] = $this->url->link('account/order', '', 'SSL');
    $data['wishlist'] = $this->url->link('account/wishlist', '', 'SSL');
    $data['newsletter'] = $this->url->link('account/newsletter', '', 'SSL');

    $data['powered'] = sprintf($this->language->get('text_powered'), $this->config->get('config_name'), date('Y', time()));

我尝试修改:catalog\view\theme\default\template\common\footer.tpl

<div class="col-sm-3">
    <h5><?php echo $text_extra; ?></h5>
    <ul class="list-unstyled">
      <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>
      <li><a href="<?php echo $voucher; ?>"><?php echo $text_voucher; ?></a></li>
      <li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li>
      <li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>
<li><a href="<?php echo $facebook; ?>"><?php echo $text_facebook; ?></a></li>
        </ul>
      </div>

catalog\language\english\common\footer.php $_['text_facebook'] = 'facebook'; 我确定我错了:p 有什么问题?

谢谢

4

0 回答 0