hy8613702 发表于 2010-5-3 20:21:36

求 CodeIgniter 购物车例子

我这样构造数据 然后插入
$data = array(
               'id'      => 1,
               'qty'   => 1,
               'price'   => 100,
               'name'    => productname,
               'options' => array('Name' => 'aaa', 'Color' => 'Red')
            );

$this->cart->insert($data);
这样读取出来却没用
foreach($this->cart->contents() as $items){
                                echo "aaa";
                                echo $items->name;
                        }

有没有谁能发段代码来看看啊   谢谢啊

baiyuxiong 发表于 2010-5-4 15:28:55

“没用”是什么意思?
说明白点儿。

hy8613702 发表于 2010-5-4 20:39:17

读不出数据出来   好像没插进去啊

wesong 发表于 2010-5-9 01:24:06

you can read user_guide first!
this is the page:how to use the cart
页: [1]
查看完整版本: 求 CodeIgniter 购物车例子