訂單插件 怎樣在 checkout.html 頁(yè)面 顯示產(chǎn)品的自定義字段的值?
下圖是 checkout.html

cart.html 頁(yè)面是這樣調(diào)用的

<td class="cart_product">
{content module=product id=$t.cid return=r}
<span>{$r.cpxh}</span>
{/content}
</td>
<td>
<span>{$r.miaoshu}</span>
</td>
<td class="cart_product">
<span>{$r.chicun}</span>
</td>
<td>
<span>{$r.baoz}</span>
</td>
<td>
<span>{$r.cbm}</span>
</td>
這個(gè)代碼可以的
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
現(xiàn)在 cart.html 頁(yè)面可以
var_dump() 都能打印出來(lái)
<td class="cart_product"> {content module=product id=$t.cid return=r} <span>{$r.cpxh}</span> <?php echo "<pre>"; var_dump($r);?> {/content} </td>checkout.html 頁(yè)面 var_dump() 數(shù)據(jù)打印不出來(lái)
<td class="cart_product"> {content module=product id=$t.cid return=r} <span>{$r.cpxh}</span> <?php echo "<pre>"; var_dump($r);?> {/content} </td>checkout.html 要寫在循環(huán)體里面,不能單獨(dú)使用
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
這樣么?
四樓代碼應(yīng)該可行,思路是對(duì)的
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
不知道為什么不行,會(huì)員中心的用這個(gè)調(diào)用也可以 ,就是 購(gòu)物車后的訂單確認(rèn)頁(yè)面不顯示,
vardump一下t變量試一試,我懷疑cid不存在
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
我在 這個(gè)位置 vardump 的 不顯示 ,
上邊的打印是這里的
沒有cid,是不是沒有全?
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
cid改成id,
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實(shí)習(xí)技術(shù)
多謝 可以顯示了 ??