fix cartItem updateQuantity method
This commit is contained in:
@@ -60,7 +60,14 @@ class CartItem extends BaseCartItem
|
||||
}
|
||||
}
|
||||
|
||||
$this->setQuantity($value);
|
||||
$this->addQuantity($value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addQuantity($quantity)
|
||||
{
|
||||
$this->setQuantity($this->getQuantity() + $quantity);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,10 @@
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="view" value="product">
|
||||
<input type="hidden" name="product_id" value="{$ID}">
|
||||
{form_field form=$form field="append"}
|
||||
<input type="hidden" name="{$name}" value="1">
|
||||
{/form_field}
|
||||
|
||||
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user