49 $this->
_init(
'quote',
'entity_id');
63 $storeIds = $object->getSharedStoreIds();
65 if ($storeIds != [
'*']) {
66 $select->where(
'store_id IN (?)', $storeIds);
72 $select->where(
'store_id < ?', 0);
166 return $this->sequenceManager->getSequence(
167 \
Magento\Sales\Model\Order::ENTITY,
180 $tableQuote = $this->
getTable(
'quote');
182 [
't2' => $this->
getTable(
'quote_item')],
183 [
'entity_id' =>
'quote_id']
185 [
't3' => $this->
getTable(
'catalogrule_product_price')],
188 't2.product_id = t3.product_id' 194 [
't2' => $subSelect],
195 't1.entity_id = t2.entity_id',
199 $updateQuery =
$select->crossUpdateFromSelect([
't1' => $tableQuote]);
220 $conditionCheck =
$connection->quoteIdentifier(
'q.items_count') .
" > 0";
221 $conditionTrue =
$connection->quoteIdentifier(
'q.items_count') .
' - 1';
222 $ifSql =
"IF (" . $conditionCheck .
"," . $conditionTrue .
", 0)";
233 [
'qi' => $this->
getTable(
'quote_item')],
237 'q.entity_id = qi.quote_id',
238 'qi.parent_item_id IS NULL',
245 $updateQuery =
$connection->updateFromSelect($subSelect, [
'q' => $this->
getTable(
'quote')]);
275 $tableQuote = $this->
getTable(
'quote');
276 $tableItem = $this->
getTable(
'quote_item');
279 [
'entity_id' =>
'quote_id']
281 'product_id IN ( ? )',
288 [
't2' => $subSelect],
289 't1.entity_id = t2.entity_id',
292 $updateQuery =
$select->crossUpdateFromSelect([
't1' => $tableQuote]);
301 public function save(\
Magento\Framework\Model\AbstractModel $object)
303 if (!$object->isPreventSaving()) {
304 return parent::save($object);
substractProductFromQuotes($product)
subtractProductFromQuotes($product)
loadByIdWithoutStore($quote, $quoteId)
_init($mainTable, $idFieldName)
save(\Magento\Framework\Model\AbstractModel $object)
loadByCustomerId($quote, $customerId)
_afterLoad(\Magento\Framework\Model\AbstractModel $object)
loadActive($quote, $quoteId)
_getLoadSelect($field, $value, $object)
markQuotesRecollect($productIds)
markQuotesRecollectOnCatalogRules()
__construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, Snapshot $entitySnapshot, RelationComposite $entityRelationComposite, Manager $sequenceManager, $connectionName=null)
getReservedOrderId($quote)