Skip to content

Commit 8678a06

Browse files
committed
Associated model added to item collection
1 parent 92ab715 commit 8678a06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Darryldecode/Cart/Cart.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,9 @@ public function associate($model)
863863

864864
$item['associatedModel'] = $model;
865865

866-
$cart->put($this->currentItemId, $item);
866+
$cart->put($this->currentItemId, new ItemCollection($item, $this->config));
867+
868+
$this->save($cart);
867869

868870
return $this;
869871
}

0 commit comments

Comments
 (0)