【问题标题】:How to add a new variable in order invoice product table snippet in cs cart?如何在cs购物车的订单发票产品表片段中添加新变量?
【发布时间】:2018-10-19 19:45:55
【问题描述】:

在产品表 sn-p 中已经有很多变量,例如价格、总计、小计、税收等。

我想使用插件或钩子添加一个新变量。如果有人知道,我们将不胜感激。

【问题讨论】:

  • 你知道吗?

标签: cs-cart


【解决方案1】:

这是控制器的路径(mode="details"):

/var/www/html/cs/app/controllers/frontend/orders.php

这是模板部分:

/var/www/html/cs/design/themes/your_theme_name/templates/views/orders/details.tpl

您可以创建新函数添加新变量。

/var/www/html/cs/app/functions/fn.cart.php中创建新函数

【讨论】:

    【解决方案2】:

    一般文档在这里 https://docs.cs-cart.com/latest/developer_guide/core/documents/snippets.html

    作为实际示例,您可以检查 2 个方案: 1. app/addons/reward_points/schemas/documents/order.post.php - 它扩展了 Order 变量 2. app/addons/suppliers/schemas/sn-ps/order_products_table.post.php - 它扩展了发票中产品表的sn-p

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多