2

购物车上的更新功能有参考吗?例如可以更改产品数量等的功能。谢谢提前

4

2 回答 2

0

没有功能可以做到这一点。整个购物车页面是一个表单,您基本上只需在更新购物车时提交表单。

于 2012-07-19T17:53:57.237 回答
0

The cart is stored in $_SESSION['cart'], which is a shoppingCart object.

You can find the code at includes/classes/shopping_cart.php.

Functions include:

reset($reset_database=false) // empty cart
add_cart($products_id, $qty = '1', $attributes = '', $notify = true) // add an item to the cart
update_quantity($products_id, $quantity = '', $attributes = '') // update quantity of a product
remove($products_id) // remove an item from cart

There are well documented in the comments. See the class definition for more functions.

Example on how to use:

$_SESSION['cart']->add_cart($products_is, $quantity);

There is folder /includes/extra_cart_actions, where you can place your own php files, which are executed during cart actions (add, remove, update).

于 2014-12-18T07:46:07.280 回答