File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
app/code/Meta/Catalog/Model/Product/Feed/Builder Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ public function getAvailability(): string
117
117
/**
118
118
* Get available product qty
119
119
*
120
- * @return int
120
+ * @return int|float
121
121
*/
122
- public function getInventory (): int
122
+ public function getInventory ()
123
123
{
124
124
if (!($ this ->product && $ this ->productStock )) {
125
125
return 0 ;
@@ -130,6 +130,6 @@ public function getInventory(): int
130
130
}
131
131
132
132
$ outOfStockThreshold = $ this ->systemConfig ->getOutOfStockThreshold ($ this ->product ->getStoreId ());
133
- return ( int ) max ($ this ->productStock ->getQty () - $ outOfStockThreshold , 0 );
133
+ return max ($ this ->productStock ->getQty () - $ outOfStockThreshold , 0 );
134
134
}
135
135
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function getAvailability(): string;
49
49
/**
50
50
* Get inventory
51
51
*
52
- * @return int
52
+ * @return int|float
53
53
*/
54
- public function getInventory (): int ;
54
+ public function getInventory ();
55
55
}
Original file line number Diff line number Diff line change @@ -256,9 +256,9 @@ public function getAvailability(): string
256
256
/**
257
257
* Get available product qty
258
258
*
259
- * @return int
259
+ * @return int|float
260
260
*/
261
- public function getInventory (): int
261
+ public function getInventory ()
262
262
{
263
263
if (!$ this ->product ) {
264
264
return 0 ;
@@ -269,7 +269,7 @@ public function getInventory(): int
269
269
}
270
270
271
271
$ outOfStockThreshold = $ this ->systemConfig ->getOutOfStockThreshold ($ this ->product ->getStoreId ());
272
- $ quantityAvailableForCatalog = ( int ) $ this ->stockQty - $ outOfStockThreshold ;
272
+ $ quantityAvailableForCatalog = $ this ->stockQty - $ outOfStockThreshold ;
273
273
return $ quantityAvailableForCatalog > 0 ? $ quantityAvailableForCatalog : 0 ;
274
274
}
275
275
}
You can’t perform that action at this time.
0 commit comments