cart

訪客購物車 programmatically


需求:每個訪客都會預設幫他們將一件貨物加到購物車
他們便可以直接完成交易

Commerce kickstart已經是一個現成的示範
訪客就算不注冊仍然可以使用購物車
而且一定情況之下關閉瀏覽器之後再回到網站仍然可以找回上次的紀錄繼續購物

但在 init 的時候使用

Drupal commerce - Add to cart anonymously, programmatically


Feature: add an item to the shopping cart of every visitor so they can checkout immediately.

Actually a shopping cart can belongs to anonymous, linked by session ID
Commerce kickstart had already demonstrate such behaviour.

But the problem is,

Google