EditShipping.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Multishipping\Controller\Checkout\Address;
  8. class EditShipping extends \Magento\Multishipping\Controller\Checkout\Address
  9. {
  10. /**
  11. * @return void
  12. */
  13. public function execute()
  14. {
  15. $this->_getState()->setActiveStep(
  16. \Magento\Multishipping\Model\Checkout\Type\Multishipping\State::STEP_SHIPPING
  17. );
  18. $this->_view->loadLayout();
  19. if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) {
  20. $addressForm->setTitle(
  21. __('Edit Shipping Address')
  22. )->setSuccessUrl(
  23. $this->_url->getUrl('*/*/editShippingPost', ['id' => $this->getRequest()->getParam('id')])
  24. )->setErrorUrl(
  25. $this->_url->getUrl('*/*/*')
  26. );
  27. $this->_view->getPage()->getConfig()->getTitle()->set(
  28. $addressForm->getTitle() . ' - ' . $this->_view->getPage()->getConfig()->getTitle()->getDefault()
  29. );
  30. if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
  31. $addressForm->setBackUrl($this->_url->getUrl('*/checkout/shipping'));
  32. }
  33. }
  34. $this->_view->renderLayout();
  35. }
  36. }