Skip to content

Commit

Permalink
fixing qty = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepolo committed Dec 19, 2016
1 parent c58ae88 commit fb4605f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LaraCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public function add(
$itemID = $itemModel[$bindings[\LukePOLO\LaraCart\CartItem::ITEM_ID]];
$name = $itemModel[$bindings[\LukePOLO\LaraCart\CartItem::ITEM_NAME]];

if (empty($qty = $name) || !is_int($name)) {
$qty = 1;
if (is_int($name)) {
$qty = $name;
}

$price = $itemModel[$bindings[\LukePOLO\LaraCart\CartItem::ITEM_PRICE]];
Expand Down

0 comments on commit fb4605f

Please sign in to comment.