dongqiao9015 2018-12-14 19:14
浏览 18

twif to tpl opencart 2.3.0.2

Hi I have a module that is for 2.3.0.2 but it has some code written for twig and it is not working for 2.3.0.2, can any one help to get this code back to tpl.

product['model']<a style="cursor:pointer" onclick="refudt(this)"  data- 
type="model" data-pid="product['product_id']"> (?)</a>

{{ product.price }} <a style="cursor:pointer" onclick="refudt(this)"  data- 
type="price" data-pid="{{ product.product_id }}"> (?)</a>

 {{ product.name }}<a style="cursor:pointer" onclick="refudt(this)"  data- 
 type="name" data-pid="{{ product.product_id }}"> (?)</a></a>

{{ product.quantity }}<a style="cursor:pointer" onclick="refudt(this)"  
data-type="quantity" data-pid="{{ product.product_id }}"> (?)</a>

{{ total.text }}<a style="cursor:pointer" onclick="refudt(this)"  data- 
type="total" data-pid="{{total.order_total_id}}"> (?)</a>
  • 写回答

1条回答 默认 最新

  • dongxing2692 2018-12-14 21:43
    关注

    this part not a TWIG and not php (tpl)

    product['model']<a style="cursor:pointer" onclick="refudt(this)"  data- 
        type="model" data-pid="product['product_id']"> (?)</a>
    

    the last part should look like this:

    <?php echo $product['price']; ?> <a style="cursor:pointer" onclick="refudt(this)"  data- 
    type="price" data-pid="<?php echo $product['product_id']; ?>"> (?)</a>
    
     <?php echo $product['name']; ?><a style="cursor:pointer" onclick="refudt(this)"  data- 
     type="name" data-pid="<?php echo $product['product_id']; ?>"> (?)</a></a>
    
    <?php echo $product['quantity']; ?><a style="cursor:pointer" onclick="refudt(this)"  
    data-type="quantity" data-pid="<?php echo $product['product_id']; ?>"> (?)</a>
    
    <?php echo $total['text']; ?><a style="cursor:pointer" onclick="refudt(this)"  data- 
    type="total" data-pid="<?php echo $total['order_total_id']; ?>"> (?)</a>
    

    You should understand I hope...

    评论

报告相同问题?

悬赏问题

  • ¥60 pb数据库修改或者求完整pb库存系统,需为pb自带数据库
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路