Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-sales
Observer
Backend
CatalogProductSaveAfterObserver.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Sales\Observer\Backend
;
7
8
use
Magento\Framework\Event\ObserverInterface
;
9
10
class
CatalogProductSaveAfterObserver
implements
ObserverInterface
11
{
15
protected
$_quote
;
16
20
public
function
__construct
(\
Magento
\
Quote
\Model\
ResourceModel
\
Quote
$quote
)
21
{
22
$this->_quote =
$quote
;
23
}
24
32
protected
function
_recollectQuotes
(
$productId
,
$status
)
33
{
34
if
(
$status
!= \
Magento
\Catalog\Model\
Product
\Attribute\Source\Status::STATUS_ENABLED) {
35
$this->_quote->markQuotesRecollect(
$productId
);
36
}
37
}
38
45
public
function
execute
(\
Magento
\Framework\Event\
Observer
$observer
)
46
{
47
$product
=
$observer
->getEvent()->getProduct();
48
$this->
_recollectQuotes
(
$product
->getId(),
$product
->getStatus());
49
}
50
}
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
$productId
$productId
Definition:
website_attribute_sync.php:26
Magento\Sales\Observer\Backend\CatalogProductSaveAfterObserver\_recollectQuotes
_recollectQuotes($productId, $status)
Definition:
CatalogProductSaveAfterObserver.php:32
Magento\Sales\Observer\Backend\CatalogProductSaveAfterObserver\__construct
__construct(\Magento\Quote\Model\ResourceModel\Quote $quote)
Definition:
CatalogProductSaveAfterObserver.php:20
Magento\Framework\Event\ObserverInterface
Definition:
ObserverInterface.php:16
$quote
$quote
Definition:
paypal_quote.php:17
Magento\Sales\Observer\Backend\CatalogProductSaveAfterObserver\$_quote
$_quote
Definition:
CatalogProductSaveAfterObserver.php:15
$observer
$observer
Definition:
second_website_with_second_currency.php:38
Magento\Sales\Observer\Backend
Definition:
CustomerQuoteTest.php:6
Magento\Catalog\Model\Product
Definition:
Product.php:42
$status
$status
Definition:
order_status.php:8
Magento
Magento\Framework\DB\Platform\Quote
Definition:
Quote.php:13
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Sales\Observer\Backend\CatalogProductSaveAfterObserver\execute
execute(\Magento\Framework\Event\Observer $observer)
Definition:
CatalogProductSaveAfterObserver.php:45
Magento\Sales\Observer\Backend\CatalogProductSaveAfterObserver
Definition:
CatalogProductSaveAfterObserver.php:10
Magento\Framework\Event\Observer
Definition:
Observer.php:14