Skip to content

Commit

Permalink
changed the indexed quantity to 10 if the real stock quantity is abov…
Browse files Browse the repository at this point in the history
…e 10
  • Loading branch information
Mohammad Tomaraei committed Feb 18, 2020
1 parent f73664c commit 0ca8630
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/catalog/controller/vsbridge/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ public function populateProducts($input){
'updated_at' => $product['date_modified']
);

if(!empty($product['quantity'])){
if(intval($product['quantity']) > 0){
$product_array['qty'] = 1;
}else{
$product_array['qty'] = 0;
if (!empty($product['quantity'])) {
if (intval($product['quantity']) > 10) {
$product_array['qty'] = 10;
} else {
$product_array['qty'] = (int) $product['quantity'];
}
}else{
} else {
$product_array['qty'] = 0;
}

Expand Down

2 comments on commit 0ca8630

@schiggi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason, why we do not want to push the real number to VS?

@themreza
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schiggi I was trying to avoid reporting the exact quantity so that it's not hinting the customer how much we really have, but I reversed this change in the latest release.

Please sign in to comment.