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条)

报告相同问题?

悬赏问题

  • ¥15 基于作物生长模型下,有限水资源的最大化粮食产量的资源优化模型建立
  • ¥15 生成的QRCode圖片加上下載按鈕
  • ¥15 板材切割优化算法,数学建模,python,lingo
  • ¥15 科来模拟ARP欺骗困惑求解
  • ¥100 iOS开发关于快捷指令截屏后如何将截屏(或从截屏中提取出的文本)回传给本应用并打开指定页面
  • ¥15 unity连接Sqlserver
  • ¥15 图中这种约束条件lingo该怎么表示出来
  • ¥15 VSCode里的Prettier如何实现等式赋值后的对齐效果?
  • ¥15 流式socket文件传输答疑
  • ¥20 keepalive配置业务服务双机单活的方法。业务服务一定是要双机单活的方式