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-checkout
Controller
Onepage
Success.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Checkout\Controller\Onepage
;
8
9
use
Magento\Framework\App\Action\HttpGetActionInterface
as HttpGetActionInterface;
10
11
class
Success
extends
\Magento\Checkout\Controller\Onepage
implements HttpGetActionInterface
12
{
18
public
function
execute
()
19
{
20
$session
= $this->
getOnepage
()->getCheckout();
21
if
(!$this->_objectManager->get(\
Magento
\Checkout\Model\
Session
\SuccessValidator::class)->isValid()) {
22
return
$this->resultRedirectFactory->create()->setPath(
'checkout/cart'
);
23
}
24
$session
->clearQuote();
25
//@todo: Refactor it to match CQRS
26
$resultPage = $this->resultPageFactory->create();
27
$this->_eventManager->dispatch(
28
'checkout_onepage_controller_success_action'
,
29
[
'order_ids'
=> [
$session
->getLastOrderId()]]
30
);
31
return
$resultPage;
32
}
33
}
Magento\Framework\App\Action\HttpGetActionInterface
Definition:
HttpGetActionInterface.php:16
Magento\Checkout\Controller\Onepage\Success\execute
execute()
Definition:
Success.php:18
Magento\Checkout\Controller\Onepage
Definition:
Onepage.php:16
Magento\Checkout\Controller\Onepage\Success
Definition:
Success.php:11
$session
$session
Definition:
quote_with_configurable_product_last_variation.php:62
Magento
Magento\Checkout\Model\Session
Definition:
Session.php:17
Magento\Checkout\Controller\Onepage\getOnepage
getOnepage()
Definition:
Onepage.php:259
Magento\Checkout\Controller\Onepage
Definition:
Failure.php:7