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-multishipping
Controller
Checkout
AddressesPost.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Multishipping\Controller\Checkout
;
8
9
use
Magento\Multishipping\Model\Checkout\Type\Multishipping\State
;
10
11
class
AddressesPost
extends
\Magento\Multishipping\Controller\Checkout
12
{
18
public
function
execute
()
19
{
20
if
(!$this->
_getCheckout
()->getCustomerDefaultShippingAddress()) {
21
$this->
_redirect
(
'*/checkout_address/newShipping'
);
22
return
;
23
}
24
try
{
25
if
($this->
getRequest
()->getParam(
'continue'
,
false
)) {
26
$this->
_getCheckout
()->setCollectRatesFlag(
true
);
27
$this->
_getState
()->setActiveStep(
State::STEP_SHIPPING
);
28
$this->
_getState
()->setCompleteStep(
State::STEP_SELECT_ADDRESSES
);
29
$this->
_redirect
(
'*/*/shipping'
);
30
}
elseif
($this->
getRequest
()->getParam(
'new_address'
)) {
31
$this->
_redirect
(
'*/checkout_address/newShipping'
);
32
}
else
{
33
$this->
_redirect
(
'*/*/addresses'
);
34
}
35
if
($shipToInfo = $this->
getRequest
()->getPost(
'ship'
)) {
36
$this->
_getCheckout
()->setShippingItemsInformation($shipToInfo);
37
}
38
}
catch
(\
Magento
\Framework\
Exception
\
LocalizedException
$e) {
39
$this->messageManager->addError($e->getMessage());
40
$this->
_redirect
(
'*/*/addresses'
);
41
}
catch
(\
Exception
$e) {
42
$this->messageManager->addException($e,
__
(
'Data saving problem'
));
43
$this->
_redirect
(
'*/*/addresses'
);
44
}
45
}
46
}
Magento\Multishipping\Controller\Checkout\_getState
_getState()
Definition:
Checkout.php:58
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\App\Action\Action\_redirect
_redirect($path, $arguments=[])
Definition:
Action.php:167
Magento\Multishipping\Controller\Checkout
Definition:
CheckItemsTest.php:8
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\Multishipping\Controller\Checkout\AddressesPost
Definition:
AddressesPost.php:11
Magento\Multishipping\Controller\Checkout
Definition:
Checkout.php:18
__
__()
Definition:
__.php:13
Magento\Multishipping\Controller\Checkout\_getCheckout
_getCheckout()
Definition:
Checkout.php:48
Magento\Multishipping\Model\Checkout\Type\Multishipping\State
Definition:
State.php:16
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Catalog\Model\Product\Exception
Definition:
Exception.php:14
Magento\Multishipping\Controller\Checkout\AddressesPost\execute
execute()
Definition:
AddressesPost.php:18
Magento
Magento\Multishipping\Model\Checkout\Type\Multishipping\State\STEP_SELECT_ADDRESSES
const STEP_SELECT_ADDRESSES
Definition:
State.php:18
Magento\Multishipping\Model\Checkout\Type\Multishipping\State\STEP_SHIPPING
const STEP_SHIPPING
Definition:
State.php:20