Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public function updateFromArray(array $attributes)
  2. {
  3. $this->id = array_get($attributes, 'id', $this->id);
  4. $this->qty = array_get($attributes, 'qty', $this->qty);
  5. $this->name = array_get($attributes, 'name', $this->name);
  6. $this->price = array_get($attributes, 'price', $this->price);
  7. $this->priceTax = $this->price + $this->tax;
  8. $this->options = new CartItemOptions(array_get($attributes, 'options', $this->options));
  9.  
  10. //$this->rowId = $this->generateRowId($this->id, $this->options->all());
  11. $this->rowId = array_get($attributes, 'rowId', $this->rowId);
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement