douyi6755 2015-03-02 09:31
浏览 12
已采纳

Opencart网址问题

Here is my site http://goo.gl/Tsnqzr OC. 1.5.4.

There is contact url in green horizontal menu. I added it myself in header.tpl:

<li><a href="http://italimporter.com/index.php?route=information/contact">Contact</a></li>

But I can't translate it in this case. So I want change this link, as it is the footer. Second column from the left, first link from above:

<li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>

I did it but auto-translate doesn't work, unlike in the footer.

I try to change or delete same link in vq2-catalog_view_theme_bigshop_template_common_header.tpl on line 237

But in this case I get the error:

"Notice: Undefined variable: text_contact in /home/italimpo/domains/italimporter.com/public_html/vqmod/vqcache/vq2-catalog_view_theme_bigshop_template_common_header.tpl on line 237"

So, how to make this link auto-translated? What is the right way to add this url in header.tpl?

  • 写回答

3条回答 默认 最新

  • duanping3587 2015-03-02 12:54
    关注

    You have to add the following code to the following files

    catalog/controller/common/header.php open above file and paste below line in index() function.

    $this->data['text_contact'] = sprintf($this->language->get('text_contact');

    second edit the language file of header.php also.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)