Fixed bug with row qty that wasn't correctly updated

This commit is contained in:
Rob Gloudemans
2013-05-28 22:02:11 +02:00
parent 6ba8ac50b4
commit e727682446

View File

@@ -51,6 +51,7 @@ class Cart {
/** /**
* Update the quantity of one row of the cart * Update the quantity of one row of the cart
*
* @param string $rowId The rowid of the item you want to update * @param string $rowId The rowid of the item you want to update
* @param integer $qty New quantity of the item * @param integer $qty New quantity of the item
* @return boolean * @return boolean
@@ -177,6 +178,7 @@ class Cart {
/** /**
* Update the cart * Update the cart
*
* @param Array $cart The new cart content * @param Array $cart The new cart content
* @return void * @return void
*/ */
@@ -210,8 +212,8 @@ class Cart {
$row = $cart->get($rowId); $row = $cart->get($rowId);
$row->qty = $qty; $row->put('qty', $qty);
$row->subtotal = $row->qty * $row->price; $row->put('subtotal', $row->qty * $row->price);
$cart->put($rowId, $row); $cart->put($rowId, $row);