【问题标题】:Where is Prestashop $product['name'] assigned with its value during checkout?Prestashop $product['name'] 在结账时的价值分配在哪里?
【发布时间】:2019-07-01 17:41:22
【问题描述】:

在 Prestashop 中有组合,产品名称正确显示在订单构造中。但是,在结帐时,仅显示基本产品名称,而不显示组合产品名称。见:https://github.com/PrestaShop/PrestaShop/issues/14361

对于订单确认,我认为 $product['name'] 在/classes/order/OrderDetail.php 中定义为:

 $product['name'] .
            ((isset($product['attributes']) && $product['attributes'] != null) ?
                ' - ' . $product['attributes'] : '');

但是$product['name']在结账阶段(在订单存在之前)定义在哪里,这意味着在themes/classic/templates/checkout/_partials/cart-summary-product-line.tpl中?

【问题讨论】:

    标签: prestashop combinations prestashop-1.7


    【解决方案1】:

    $product['name'] 在类cart 中定义。在函数getProducts()

    问候

    【讨论】:

    • 类购物车中的function getProducts() 位于当前开发分支中的/classes/Cart.php around line 617,但找不到'name' 的值。
    • 如果没问题就关闭问题:)
    • 我仍然没有找到$product['name'] 的字符串值在哪里填充/用于实际产品。
    • 商品名在类Cart的getProducts()查询中获取。
    • 我的PHP阅读技巧是新手。你是说$this->_products = array(); 周围的line 747 吗?
    猜你喜欢
    • 1970-01-01
    • 2010-09-19
    • 2013-01-16
    • 2018-07-02
    • 1970-01-01
    • 1970-01-01
    • 2019-09-05
    • 1970-01-01
    • 2018-12-14
    相关资源
    最近更新 更多