Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php opencart在标题菜单中添加自定义菜单_Php_Opencart - Fatal编程技术网

Php opencart在标题菜单中添加自定义菜单

Php opencart在标题菜单中添加自定义菜单,php,opencart,Php,Opencart,这是我遇到的一个棘手的问题 我有一个客户/朋友希望在他们的“打开购物车”菜单上有一个主页按钮,我能够解决这个问题。然而,他想要一个包含5项建议的下拉菜单。这5项是常见问题解答、联系我们、交付详细信息、隐私政策和退货政策 足够直截了当,但是页面是信息页面 我想做的是链接到这些页面 通知的ID为80 foreach($childrenas$child){ 如果($child['category_id']==80){ $children_data[]=数组( 'name'=>$this->data['

这是我遇到的一个棘手的问题

我有一个客户/朋友希望在他们的“打开购物车”菜单上有一个主页按钮,我能够解决这个问题。然而,他想要一个包含5项建议的下拉菜单。这5项是常见问题解答、联系我们、交付详细信息、隐私政策和退货政策

足够直截了当,但是页面是信息页面

我想做的是链接到这些页面

通知的ID为
80

foreach($childrenas$child){
如果($child['category_id']==80){
$children_data[]=数组(
'name'=>$this->data['text\u advicefaq']=$this->language->get('text\u advicefaq'),
'href'=>$this->url->link('information/information','information\u id=13'))
);
}
$data=数组(
'filter_category_id'=>$child['category_id'],
“筛选子类别”=>true
);
$product\U total=$this->model\u catalog\u product->getTotalProducts($data);
$children_data[]=数组(
'name'=>$child['name']。($this->config->get('config_product_count')?'('$product_total'):''),
'href'=>$this->url->link('product/category','path='。$category['category\u id'..'.$child['category\u id']))
);      
}
试试下面的方法

第一步 打开文件
catalog/view/theme//template/common/header.tpl

查找菜单代码

在标签前添加:


  • 步骤2 打开文件
    catalog/controller/common/header.php

    查找:

    $this->data['text\u checkout']=$this->language->get('text\u checkout');
    
    在以下内容之后添加:

    $this->data['text\u information']=$this->language->get('text\u information');
    $this->data['text\u contact']=$this->language->get('text\u contact');
    

    步骤3 在同一个文件
    catalog/controller/common/header.php

    查找:

    $this->data['checkout']=$this->url->link('checkout/checkout','SSL');
    
    在以下内容之后添加:

    $this->load->model('catalog/information');
    $this->data['informations']=array();
    foreach($this->model\u catalog\u information->getInformations()作为$result){
    如果($result['bottom'])){
    $this->data['informations'][]=数组(
    'title'=>$result['title'],
    'href'=>$this->url->link('information/information','information\u id='。$result['information\u id']))
    );
    }
    }
    $this->data['contact']=$this->url->link('information/contact');
    
    &然后检查它。

    试试类似的方法

    第一步 打开文件
    catalog/view/theme//template/common/header.tpl

    查找菜单代码

    在标签前添加:


  • 步骤2 打开文件
    catalog/controller/common/header.php

    查找:

    $this->data['text\u checkout']=$this->language->get('text\u checkout');
    
    在以下内容之后添加:

    $this->data['text\u information']=$this->language->get('text\u information');
    $this->data['text\u contact']=$this->language->get('text\u contact');
    

    步骤3 在同一个文件
    catalog/controller/common/header.php

    查找:

    $this->data['checkout']=$this->url->link('checkout/checkout','SSL');
    
    在以下内容之后添加:

    $this->load->model('catalog/information');
    $this->data['informations']=array();
    foreach($this->model\u catalog\u information->getInformations()作为$result){
    如果($result['bottom'])){
    $this->data['informations'][]=数组(
    'title'=>$result['title'],
    'href'=>$this->url->link('information/information','information\u id='。$result['information\u id']))
    );
    }
    }
    $this->data['contact']=$this->url->link('information/contact');
    
    &然后检查一下