Skip to content

Commit

Permalink
Merge pull request #10 from butopea/develop
Browse files Browse the repository at this point in the history
fixed is_in_stock for negative stock values
  • Loading branch information
Mohammad Tomaraei authored Jan 10, 2022
2 parents 29e7b63 + 5c1d99a commit ed9292c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/catalog/controller/vsbridge/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function populateProducts($input){

$stock = array();

if(!empty($product['quantity'])){
if(isset($product['quantity']) && intval($product['quantity']) > 0) {
$stock['is_in_stock'] = true;
}else{
$stock['is_in_stock'] = false;
Expand Down

0 comments on commit ed9292c

Please sign in to comment.