Update CartItem.php

Save options value in updateFromArray function
This commit is contained in:
Nadir Absemetov
2016-10-12 17:24:49 +03:00
committed by GitHub
parent 97ed51ece4
commit 2b59ca8f0e

View File

@@ -211,7 +211,7 @@ class CartItem implements Arrayable
$this->name = array_get($attributes, 'name', $this->name);
$this->price = array_get($attributes, 'price', $this->price);
$this->priceTax = $this->price + $this->tax;
$this->options = new CartItemOptions(array_get($attributes, 'options', []));
$this->options = new CartItemOptions(array_get($attributes, 'options', $this->options));
$this->rowId = $this->generateRowId($this->id, $this->options->all());
}