如何删除单个购物车项目使用codeigniter购物车类? [英] How to remove the single cart item using codeigniter cart class?

查看:165
本文介绍了如何删除单个购物车项目使用codeigniter购物车类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用codeigniter购物车类为我的购物车项目。我有很多的物品在购物车上。现在我有车行ID。现在我真正需要做的是,需要从购物车中删除特定的项目,而不是所有的内容(Destroying cart)。

I am using codeigniter cart class for my shopping cart project. I have number of items on the cart. Now I do have cart row id. Now what exactly i need to do is, need to remove the particular item from the cart not all the contents(Destroying cart).

$cartcontents = $this->cart->product_options($rowid); 

并取消所有内容。但不工作。请帮助你任何人有一个想法。谢谢。

and unseting all contents. but doesn't works out. Please do help you anybody have an idea. Thank You.

推荐答案

$data = array(
'rowid'   => '30ef30b64204a3088a26bc2e6ecf7602',
'qty'     => 0
);

$this->cart->update($data); 

使用此

这篇关于如何删除单个购物车项目使用codeigniter购物车类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆