我需要將轉(zhuǎn)換代碼添加到order-confirmation.tpl模板中。但是,如果變量名稱中包含下劃線(也許我只嘗試幾個)字符,則輸出為空array()。例如:{$order.details.payment} <- this works{$order.details.id_customer} <- this do NOT works{$order.details.total_paid_tax_incl} <- this do NOT works also我的目標(biāo)是將產(chǎn)品的總價格輸出到template($order.details.total_paid_tax_incl} 任何建議?有這個問題的經(jīng)驗嗎?我嘗試打印輸出,{$order.details}所以所有數(shù)據(jù)都應(yīng)該在這里。輸出: PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderDetailLazyArray Object( [order:PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderDetailLazyArray:private] => Order Object ( [id_address_delivery] => 21013 [id_address_invoice] => 21013 [id_shop_group] => 1 [id_shop] => 1 [id_cart] => 1189 [id_currency] => 1 [id_lang] => 1 [id_customer] => 8673 [id_carrier] => 43 [current_state] => 10 [secure_key] => a69d00482b1df2d13bd9a424c3a71f08 [payment] => Platba bankovním p?evodem [module] => ps_wirepayment [conversion_rate] => 1.000000 [recyclable] => 0 [gift] => 0 [gift_message] => [mobile_theme] => 0 [shipping_number] => [total_discounts] => 0.000000 [total_discounts_tax_incl] => 0.000000 [total_discounts_tax_excl] => 0.000000 [total_paid] => 312.000000 [total_paid_tax_incl] => 312.000000 [total_paid_tax_excl] => 274.000000 [total_paid_real] => 0.000000 [total_products] => 179.000000 [total_products_wt] => 217.000000 [total_shipping] => 95.000000 [total_shipping_tax_incl] => 95.000000
2 回答

揚帆大魚
TA貢獻(xiàn)1799條經(jīng)驗 獲得超9個贊
似乎您嘗試從對象獲取數(shù)據(jù),但對數(shù)組使用語法。嘗試$order->id_customer
,$order->id_carrier
等等。
- 2 回答
- 0 關(guān)注
- 206 瀏覽
添加回答
舉報
0/150
提交
取消