【问题标题】:Add product field to cart opencart将产品字段添加到购物车 opencart
【发布时间】:2017-04-12 07:04:56
【问题描述】:

在 opencart 中,在成功页面,我需要检查产品的特定字段值以采取行动。具体字段:stock_status_id。

当我使用时

$this->cart->getSubTotal() 

$this->session->data['order_id'] 

我可以获取 sku、名称、类别、价格、数量字段,但是当我尝试使用此代码获取 stock_status_id 字段时:

$product['stock_status_id'] 

我什么都没有。我打开 system/library/cart.php 文件并添加到数据数组 stock_status_id 没有成功。

感谢任何帮助!

【问题讨论】:

    标签: opencart


    【解决方案1】:

    找到了!它在 system/library/cart.php 中寻找:

    $this->data[$key] = array
    

    并在您要带的字段中添加一行!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多