Skip to content

Commit 9d2151d

Browse files
committed
MAGETWO-93702: [2.3] User can place order when product changes status to Out of stock during checkout
1 parent 259ff56 commit 9d2151d

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

app/code/Magento/CatalogInventory/Model/Stock/Status.php

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ protected function _construct()
7272
//@codeCoverageIgnoreStart
7373

7474
/**
75+
* Retrieve product ID
76+
*
7577
* @return int
7678
*/
7779
public function getProductId()
@@ -80,6 +82,8 @@ public function getProductId()
8082
}
8183

8284
/**
85+
* Retrieve website ID
86+
*
8387
* @return int
8488
*/
8589
public function getWebsiteId()
@@ -88,6 +92,8 @@ public function getWebsiteId()
8892
}
8993

9094
/**
95+
* Retrieve stock ID
96+
*
9197
* @return int
9298
*/
9399
public function getStockId()
@@ -96,6 +102,8 @@ public function getStockId()
96102
}
97103

98104
/**
105+
* Retrieve qty
106+
*
99107
* @return int
100108
*/
101109
public function getQty()
@@ -104,6 +112,8 @@ public function getQty()
104112
}
105113

106114
/**
115+
* Retrieve stock status
116+
*
107117
* @return int
108118
*/
109119
public function getStockStatus(): int
@@ -114,6 +124,8 @@ public function getStockStatus(): int
114124
//@codeCoverageIgnoreEnd
115125

116126
/**
127+
* Retrieve stock item
128+
*
117129
* @return StockItemInterface
118130
*/
119131
public function getStockItem()
@@ -124,6 +136,8 @@ public function getStockItem()
124136
//@codeCoverageIgnoreStart
125137

126138
/**
139+
* Set product ID
140+
*
127141
* @param int $productId
128142
* @return $this
129143
*/
@@ -133,6 +147,8 @@ public function setProductId($productId)
133147
}
134148

135149
/**
150+
* Set web website ID
151+
*
136152
* @param int $websiteId
137153
* @return $this
138154
*/
@@ -142,6 +158,8 @@ public function setWebsiteId($websiteId)
142158
}
143159

144160
/**
161+
* Set stock ID
162+
*
145163
* @param int $stockId
146164
* @return $this
147165
*/
@@ -151,6 +169,8 @@ public function setStockId($stockId)
151169
}
152170

153171
/**
172+
* Set qty
173+
*
154174
* @param int $qty
155175
* @return $this
156176
*/
@@ -160,6 +180,8 @@ public function setQty($qty)
160180
}
161181

162182
/**
183+
* Set stock status
184+
*
163185
* @param int $stockStatus
164186
* @return $this
165187
*/
@@ -169,7 +191,7 @@ public function setStockStatus($stockStatus)
169191
}
170192

171193
/**
172-
* {@inheritdoc}
194+
* Retrieve existing extension attributes object or create a new one.
173195
*
174196
* @return \Magento\CatalogInventory\Api\Data\StockStatusExtensionInterface|null
175197
*/
@@ -179,7 +201,7 @@ public function getExtensionAttributes()
179201
}
180202

181203
/**
182-
* {@inheritdoc}
204+
* Set an extension attributes object.
183205
*
184206
* @param \Magento\CatalogInventory\Api\Data\StockStatusExtensionInterface $extensionAttributes
185207
* @return $this

app/code/Magento/Quote/Model/QuoteValidator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface;
1616

1717
/**
18+
* Class to validate the quote
19+
*
1820
* @api
1921
* @since 100.0.2
2022
*/

0 commit comments

Comments
 (0)