Magento 2 : How to show products and shipping method on order success page? As picture below:Is it possible to show the ordered items and shipping method on the success page?How to get the order html table and shipping address on success page?How to display Order subtotal in Order success page in Magento2?Magento 2 : on Entering city show shipping method, till then hide shipping method in checkout pageMagento 2 : How to load the order success pageHow to test or style the Order Success Page Or how to stop Success Page redirecting in Magento 2get payment method in the success page Magento 2 programmaticallyGet order id (not increment id) on success page?How can I add custom success pageHow to create custom form in Magento 2.2.3
PhD advisor lost funding, need advice
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
(A room / an office) where an artist works
Markov-chain sentence generator in Python
Submitting a new paper just after another was accepted by the same journal
Why did IBM make public the PC BIOS source code?
What is a good class if we remove subclasses?
How can God warn people of the upcoming rapture without disrupting society?
Does Nightpack Ambusher's second ability trigger if I cast spells during the end step?
Why aren’t there water shutoff valves for each room?
A continuous water "planet" ring around a star
Is there a standardised way to check fake news?
Flood on the top floor
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
How do I call a 6 digit Austrailian phone number with a US based mobile phone?
Is there a way to count the number of lines of text in a file including non-delimited ones?
Do I have to cite common CS algorithms?
What are these funnel-looking green things in my yard?
Are there really no countries that protect Freedom of Speech as the United States does?
How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?
Should I email my professor about a recommendation letter if he has offered me a job?
Can lodestones be used to magnetize crude iron weapons?
Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?
How is являться different from есть and быть
Magento 2 : How to show products and shipping method on order success page? As picture below:
Is it possible to show the ordered items and shipping method on the success page?How to get the order html table and shipping address on success page?How to display Order subtotal in Order success page in Magento2?Magento 2 : on Entering city show shipping method, till then hide shipping method in checkout pageMagento 2 : How to load the order success pageHow to test or style the Order Success Page Or how to stop Success Page redirecting in Magento 2get payment method in the success page Magento 2 programmaticallyGet order id (not increment id) on success page?How can I add custom success pageHow to create custom form in Magento 2.2.3
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;

htdocs/vendor/magento/module-checkout/view/frontend/templates/success.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php /** @var $block MagentoCheckoutBlockOnepageSuccess */ ?>
<div class="checkout-success">
<?php if ($block->getOrderId()):?>
<?php if ($block->getCanViewOrder()) :?>
<p style=" font-size: 19px; font-weight: 700;color: #4F91D0;" ><?= __('Your order number is: %1.', sprintf('<a href="%s" class="order-number" ><strong style="font-weight: 600; color: white; background-color: #4F91D0; font-size: 30px;" >%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?></p>
<?php else :?>
<p><?= __('Your order # is: <span>%1</span>.', $block->escapeHtml($block->getOrderId())) ?></p>
<?php endif;?>
<!-- <p><?= /* @escapeNotVerified */ __('We'll email you an order confirmation with details and tracking info.') ?></p>-->
<p>
Enviaremos para você um e-mail de confirmação do seu pedido com detalhes e informações de rastreamento.
Adicione o e-mail <a href="mailto:suporte@suporte.com.br"> suporte@suporte.com.br</a> a no seu livro de endereços e verifique sua pasta de spam caso não receba o e-mail de confirmação do pedido.<br>
Agora é só aguardar a confirmação do seu pagamento. Você receberá um e-mail assim que o seu pagamento for confirmado.<br>
Em caso de dúvidas, entre em contato com o e-mail informado acima ou ligue-nos no <a href="tel:40201702">0000-0000</a> (custo de ligação local).
</p>
<br>
<h2>Status do Pedido</h2>
<!-- <p class="status"> </p> -->
<div id="status_bar">
<img class="status" src="https://d2fqgw7smz4ag9.cloudfront.net/pub/media/wysiwyg/status-1.gif" />
</div>
<h2>Suas Compras</h2>
<?= $block->getProductItem() ?> //This is where I want you to display the purchase you made
<h2>Dados do Envio</h2>
<?= $block->getMethodShipping() ?> //This is where I want you to display the delivery method selected by the user.
<?php endif;?>
<?= $block->getAdditionalInfoHtml() ?>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?= /* @escapeNotVerified */ $block->getContinueUrl() ?>"><span><?= /* @escapeNotVerified */ __('Continue Shopping') ?></span></a>
</div>
</div>
</div>
htdocs/vendor/magento/module-checkout/Block/Onepage
/* Methods for displaying purchased products and selected shipping method */
public function getProductItem()
return 'View my purchase'; //What would the method of displaying a purchase look like?
public function getMethodShipping()
return 'Selected Shipping Type'; //What would be the method for displaying the selected shipping type?
magento2 shipping-methods order-success-page
add a comment |

htdocs/vendor/magento/module-checkout/view/frontend/templates/success.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php /** @var $block MagentoCheckoutBlockOnepageSuccess */ ?>
<div class="checkout-success">
<?php if ($block->getOrderId()):?>
<?php if ($block->getCanViewOrder()) :?>
<p style=" font-size: 19px; font-weight: 700;color: #4F91D0;" ><?= __('Your order number is: %1.', sprintf('<a href="%s" class="order-number" ><strong style="font-weight: 600; color: white; background-color: #4F91D0; font-size: 30px;" >%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?></p>
<?php else :?>
<p><?= __('Your order # is: <span>%1</span>.', $block->escapeHtml($block->getOrderId())) ?></p>
<?php endif;?>
<!-- <p><?= /* @escapeNotVerified */ __('We'll email you an order confirmation with details and tracking info.') ?></p>-->
<p>
Enviaremos para você um e-mail de confirmação do seu pedido com detalhes e informações de rastreamento.
Adicione o e-mail <a href="mailto:suporte@suporte.com.br"> suporte@suporte.com.br</a> a no seu livro de endereços e verifique sua pasta de spam caso não receba o e-mail de confirmação do pedido.<br>
Agora é só aguardar a confirmação do seu pagamento. Você receberá um e-mail assim que o seu pagamento for confirmado.<br>
Em caso de dúvidas, entre em contato com o e-mail informado acima ou ligue-nos no <a href="tel:40201702">0000-0000</a> (custo de ligação local).
</p>
<br>
<h2>Status do Pedido</h2>
<!-- <p class="status"> </p> -->
<div id="status_bar">
<img class="status" src="https://d2fqgw7smz4ag9.cloudfront.net/pub/media/wysiwyg/status-1.gif" />
</div>
<h2>Suas Compras</h2>
<?= $block->getProductItem() ?> //This is where I want you to display the purchase you made
<h2>Dados do Envio</h2>
<?= $block->getMethodShipping() ?> //This is where I want you to display the delivery method selected by the user.
<?php endif;?>
<?= $block->getAdditionalInfoHtml() ?>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?= /* @escapeNotVerified */ $block->getContinueUrl() ?>"><span><?= /* @escapeNotVerified */ __('Continue Shopping') ?></span></a>
</div>
</div>
</div>
htdocs/vendor/magento/module-checkout/Block/Onepage
/* Methods for displaying purchased products and selected shipping method */
public function getProductItem()
return 'View my purchase'; //What would the method of displaying a purchase look like?
public function getMethodShipping()
return 'Selected Shipping Type'; //What would be the method for displaying the selected shipping type?
magento2 shipping-methods order-success-page
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09
add a comment |

htdocs/vendor/magento/module-checkout/view/frontend/templates/success.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php /** @var $block MagentoCheckoutBlockOnepageSuccess */ ?>
<div class="checkout-success">
<?php if ($block->getOrderId()):?>
<?php if ($block->getCanViewOrder()) :?>
<p style=" font-size: 19px; font-weight: 700;color: #4F91D0;" ><?= __('Your order number is: %1.', sprintf('<a href="%s" class="order-number" ><strong style="font-weight: 600; color: white; background-color: #4F91D0; font-size: 30px;" >%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?></p>
<?php else :?>
<p><?= __('Your order # is: <span>%1</span>.', $block->escapeHtml($block->getOrderId())) ?></p>
<?php endif;?>
<!-- <p><?= /* @escapeNotVerified */ __('We'll email you an order confirmation with details and tracking info.') ?></p>-->
<p>
Enviaremos para você um e-mail de confirmação do seu pedido com detalhes e informações de rastreamento.
Adicione o e-mail <a href="mailto:suporte@suporte.com.br"> suporte@suporte.com.br</a> a no seu livro de endereços e verifique sua pasta de spam caso não receba o e-mail de confirmação do pedido.<br>
Agora é só aguardar a confirmação do seu pagamento. Você receberá um e-mail assim que o seu pagamento for confirmado.<br>
Em caso de dúvidas, entre em contato com o e-mail informado acima ou ligue-nos no <a href="tel:40201702">0000-0000</a> (custo de ligação local).
</p>
<br>
<h2>Status do Pedido</h2>
<!-- <p class="status"> </p> -->
<div id="status_bar">
<img class="status" src="https://d2fqgw7smz4ag9.cloudfront.net/pub/media/wysiwyg/status-1.gif" />
</div>
<h2>Suas Compras</h2>
<?= $block->getProductItem() ?> //This is where I want you to display the purchase you made
<h2>Dados do Envio</h2>
<?= $block->getMethodShipping() ?> //This is where I want you to display the delivery method selected by the user.
<?php endif;?>
<?= $block->getAdditionalInfoHtml() ?>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?= /* @escapeNotVerified */ $block->getContinueUrl() ?>"><span><?= /* @escapeNotVerified */ __('Continue Shopping') ?></span></a>
</div>
</div>
</div>
htdocs/vendor/magento/module-checkout/Block/Onepage
/* Methods for displaying purchased products and selected shipping method */
public function getProductItem()
return 'View my purchase'; //What would the method of displaying a purchase look like?
public function getMethodShipping()
return 'Selected Shipping Type'; //What would be the method for displaying the selected shipping type?
magento2 shipping-methods order-success-page

htdocs/vendor/magento/module-checkout/view/frontend/templates/success.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php /** @var $block MagentoCheckoutBlockOnepageSuccess */ ?>
<div class="checkout-success">
<?php if ($block->getOrderId()):?>
<?php if ($block->getCanViewOrder()) :?>
<p style=" font-size: 19px; font-weight: 700;color: #4F91D0;" ><?= __('Your order number is: %1.', sprintf('<a href="%s" class="order-number" ><strong style="font-weight: 600; color: white; background-color: #4F91D0; font-size: 30px;" >%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?></p>
<?php else :?>
<p><?= __('Your order # is: <span>%1</span>.', $block->escapeHtml($block->getOrderId())) ?></p>
<?php endif;?>
<!-- <p><?= /* @escapeNotVerified */ __('We'll email you an order confirmation with details and tracking info.') ?></p>-->
<p>
Enviaremos para você um e-mail de confirmação do seu pedido com detalhes e informações de rastreamento.
Adicione o e-mail <a href="mailto:suporte@suporte.com.br"> suporte@suporte.com.br</a> a no seu livro de endereços e verifique sua pasta de spam caso não receba o e-mail de confirmação do pedido.<br>
Agora é só aguardar a confirmação do seu pagamento. Você receberá um e-mail assim que o seu pagamento for confirmado.<br>
Em caso de dúvidas, entre em contato com o e-mail informado acima ou ligue-nos no <a href="tel:40201702">0000-0000</a> (custo de ligação local).
</p>
<br>
<h2>Status do Pedido</h2>
<!-- <p class="status"> </p> -->
<div id="status_bar">
<img class="status" src="https://d2fqgw7smz4ag9.cloudfront.net/pub/media/wysiwyg/status-1.gif" />
</div>
<h2>Suas Compras</h2>
<?= $block->getProductItem() ?> //This is where I want you to display the purchase you made
<h2>Dados do Envio</h2>
<?= $block->getMethodShipping() ?> //This is where I want you to display the delivery method selected by the user.
<?php endif;?>
<?= $block->getAdditionalInfoHtml() ?>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?= /* @escapeNotVerified */ $block->getContinueUrl() ?>"><span><?= /* @escapeNotVerified */ __('Continue Shopping') ?></span></a>
</div>
</div>
</div>
htdocs/vendor/magento/module-checkout/Block/Onepage
/* Methods for displaying purchased products and selected shipping method */
public function getProductItem()
return 'View my purchase'; //What would the method of displaying a purchase look like?
public function getMethodShipping()
return 'Selected Shipping Type'; //What would be the method for displaying the selected shipping type?
magento2 shipping-methods order-success-page
magento2 shipping-methods order-success-page
edited Aug 5 at 14:24
R.Park
asked Jul 31 at 20:59
R.ParkR.Park
32 bronze badges
32 bronze badges
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09
add a comment |
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09
add a comment |
3 Answers
3
active
oldest
votes
Create module for that don't make changes in core files.
Download Module
You can show all order details by following steps.
Remove from xml which you dont want to display.
create appcodeKetanModuleviewfrontendlayoutcheckout_onepage_success.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="sales_order_item_renderers"/>
<update handle="sales_order_item_price"/>
<body>
<referenceBlock name="checkout.success" remove="true"/>
<referenceContainer name="content">
<block class="MagentoCheckoutBlockOnepageSuccess" name="ketan.checkout.success" template="Ketan_Module::onepage/success.phtml" cacheable="false">
<block class="KetanModuleBlockOnepageSuccessDetails" name="ketan.checkout.success.details" as="details" template="Ketan_Module::onepage/details.phtml" cacheable="false">
<block class="MagentoSalesBlockOrderInfo" as="info" name="sales.order.info" />
<block class="MagentoSalesBlockOrderView" name="sales.order.view" cacheable="false" as="order_view" template="Ketan_Module::onepage/details/order/view.phtml">
<block class="MagentoSalesBlockOrderItems" name="order_items" template="order/items.phtml">
<block class="MagentoFrameworkViewElementRendererList" name="sales.order.items.renderers" as="renderer.list"/>
<block class="MagentoSalesBlockOrderTotals" name="order_totals" template="order/totals.phtml">
<arguments>
<argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
<argument name="value_properties" xsi:type="string">class="amount"</argument>
</arguments>
<block class="MagentoTaxBlockSalesOrderTax" name="tax" template="order/tax.phtml"/>
</block>
</block>
</block>
</block>
<container name="order.success.additional.info" label="Order Success Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
create Block file for template appcodeKetanModuleBlockOnepageSuccessDetails.php
<?php
namespace KetanModuleBlockOnepageSuccess;
use MagentoFrameworkViewElementTemplate;
class Details extends Template
/**
* @var MagentoFrameworkRegistry
*/
protected $registry;
/**
* @var MagentoCheckoutModelSession
*/
protected $session;
public function __construct(
TemplateContext $context,
MagentoFrameworkRegistry $registry,
MagentoCheckoutModelSession $session,
array $data = []
)
parent::__construct($context, $data);
$this->registry = $registry;
$this->session = $session;
protected function _prepareLayout()
if (!$this->registry->registry('current_order'))
$this->registry->register('current_order', $this->getOrder());
return parent::_prepareLayout();
/**
* Retrieve current order model instance
*
* @return MagentoSalesModelOrder
*/
public function getOrder()
return $this->session->getLastRealOrder();
Create view files which are override from xml files
- appcodeKetanModuleviewfrontendtemplatesonepagedetails.phtml
https://pastebin.com/b0LDaHYu
- appcodeKetanModuleviewfrontendtemplatesonepagesuccess.phtml
https://pastebin.com/dL6vCXGQ
- appcodeKetanModuleviewfrontendtemplatesonepagedetailsorderview.phtml
https://pastebin.com/9edArjFL

thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to overrideorder/items.phtmlandorderitemsrendererdefault.phtmlor extend it to current module from defaultmodule-sales
– Ketan Borada
Aug 6 at 6:38
add a comment |
Please try with below code :
like : pass $block->getOrderId() in $block->getMethodShipping($block->getOrderId())
public function getMethodShipping($orderid)
$objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct
$order = $objectManager->create('MagentoSalesModelOrder')->load($orderid);
return $order->getShippingMethod();
same process do with getProductItem()
I hope its working
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
add a comment |
Please try with below code :
1) Override order success block
app/code/CompanyName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCheckoutBlockOnepageSuccess"
type="CompanyNameModuleNameBlockOnepageSuccess"/>
</config>
2) order success block
<?php
namespace CompanyNameModuleNameBlockOnepage;
class Success extends MagentoCheckoutBlockOnepageSuccess
protected $_orderDetail;
protected $_order;
protected $_item;
protected $_renderer;
protected $_priceHelper;
protected $_customerSession;
/**
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoCheckoutModelSession $checkoutSession
* @param MagentoSalesModelOrderConfig $orderConfig
* @param MagentoFrameworkAppHttpContext $httpContext
* @param array $data
*/
public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoCheckoutModelSession $checkoutSession,
MagentoSalesModelOrderConfig $orderConfig,
MagentoFrameworkAppHttpContext $httpContext,
MagentoSalesModelOrder $orderDetails,
MagentoCatalogModelProductRepository $item,
MagentoSalesModelOrderAddressRenderer $renderer,
MagentoFrameworkPricingHelperData $priceHelper,
MagentoCatalogBlockProductListProduct $listProduct,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoCustomerModelSession $customerSession,
array $data = []
)
$this->_orderDetail = $orderDetails;
$this->_renderer = $renderer;
$this->_item = $item;
$this->_priceHelper = $priceHelper;
$this->_listProduct = $listProduct;
$this->_storeManager = $storeManager;
$this->_customerSession = $customerSession;
$this->_order = null;
parent::__construct(
$context, $checkoutSession, $orderConfig, $httpContext, $data
);
public function getOrder($id)
$this->_order = $this->_orderDetail->loadByIncrementId($id);
return $this->_order;
public function getItem($itemId)
return $this->_item->getById($itemId);
public function getFormatedAddress($address)
return $this->_renderer->format($address, 'html');
public function getPaymentMethodtitle($order)
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
return $method->getTitle();
/**
* Get Formated Price
* @param fload price
* @return boolean
*/
public function getFormatedPrice($price='')
return $this->_priceHelper->currency($price, true, false);
public function getMediaUrl()
$currentStore = $this->_storeManager->getStore();
return $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
Override order success.phtml and Add html from Override success.html file
CompanyName/ModuleName/view/frontend/templates/success.phtml
3) Get Shipping Method
<?php $order = $this->getOrder($this->getOrderId()); ?>
<?php if(!empty($order->getShippingDescription())):?>
<div class="shipping-method">
<strong class="box-title">
<span class="box-des"><?php /* @escapeNotVerified */ echo __('Shipping Method'); ?></span>
</strong>
<div class="box-content">
<?php echo $order->getShippingDescription(); ?>
</div>
</div>
<?php endif;?>
4) Get Product Details
<?php $order = $this->getOrder($this->getOrderId()); ?>
<div class="order-detail">
<table>
<thead>
<tr>
<th colspan="3"><?php /* @escapeNotVerified */ echo __('Product Name'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Price'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Qty'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Subtotal'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->getAllVisibleItems() as $item)
$product = $this->getItem($item->getProductId());
$options = $item->getProductOptions();
$imageBlock = $block->getLayout()->createBlock('MagentoCatalogBlockProductListProduct');
$productImage = $imageBlock->getImage($product, 'category_page_list');
?>
<tr class="data-item">
<td colspan="3">
<div class="product-image">
<a href="<?php echo $product->getProductUrl(); ?>"><?php echo $productImage->toHtml(); ?></a>
</div>
<div class="product-name-sku">
<div class="product-name">
<span><?php echo $item->getName(); ?></span>
</div>
<div class="product-name">
<h5><?php /* @escapeNotVerified */ echo __('SKU'); ?></h5>
<span><?php echo $item->getSku(); ?></span>
</div>
</div>
</td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getPrice()); ?></td>
<td class="table-number"><?php echo $item->getQtyOrdered(); ?></td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getBaseRowTotal()); ?></td>
</tr>
<?php
?>
</tbody>
<tfoot>
<tr class="subtotal">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getSubtotal()); ?></span>
</td>
</tr>
<tr class="shipping">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getShippingAmount()); ?></span>
</td>
</tr>
<tr class="grand_total">
<th colspan="5" class="table-method" scope="row">
<strong><?php /* @escapeNotVerified */ echo __('Grand Total'); ?></strong>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Grand Total'); ?>">
<strong><span class="price"><?php echo $this->getFormatedPrice($order->getGrandTotal()); ?></span></strong>
</td>
</tr>
</tfoot>
</table>
</div>
It's working
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284014%2fmagento-2-how-to-show-products-and-shipping-method-on-order-success-page-as-p%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Create module for that don't make changes in core files.
Download Module
You can show all order details by following steps.
Remove from xml which you dont want to display.
create appcodeKetanModuleviewfrontendlayoutcheckout_onepage_success.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="sales_order_item_renderers"/>
<update handle="sales_order_item_price"/>
<body>
<referenceBlock name="checkout.success" remove="true"/>
<referenceContainer name="content">
<block class="MagentoCheckoutBlockOnepageSuccess" name="ketan.checkout.success" template="Ketan_Module::onepage/success.phtml" cacheable="false">
<block class="KetanModuleBlockOnepageSuccessDetails" name="ketan.checkout.success.details" as="details" template="Ketan_Module::onepage/details.phtml" cacheable="false">
<block class="MagentoSalesBlockOrderInfo" as="info" name="sales.order.info" />
<block class="MagentoSalesBlockOrderView" name="sales.order.view" cacheable="false" as="order_view" template="Ketan_Module::onepage/details/order/view.phtml">
<block class="MagentoSalesBlockOrderItems" name="order_items" template="order/items.phtml">
<block class="MagentoFrameworkViewElementRendererList" name="sales.order.items.renderers" as="renderer.list"/>
<block class="MagentoSalesBlockOrderTotals" name="order_totals" template="order/totals.phtml">
<arguments>
<argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
<argument name="value_properties" xsi:type="string">class="amount"</argument>
</arguments>
<block class="MagentoTaxBlockSalesOrderTax" name="tax" template="order/tax.phtml"/>
</block>
</block>
</block>
</block>
<container name="order.success.additional.info" label="Order Success Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
create Block file for template appcodeKetanModuleBlockOnepageSuccessDetails.php
<?php
namespace KetanModuleBlockOnepageSuccess;
use MagentoFrameworkViewElementTemplate;
class Details extends Template
/**
* @var MagentoFrameworkRegistry
*/
protected $registry;
/**
* @var MagentoCheckoutModelSession
*/
protected $session;
public function __construct(
TemplateContext $context,
MagentoFrameworkRegistry $registry,
MagentoCheckoutModelSession $session,
array $data = []
)
parent::__construct($context, $data);
$this->registry = $registry;
$this->session = $session;
protected function _prepareLayout()
if (!$this->registry->registry('current_order'))
$this->registry->register('current_order', $this->getOrder());
return parent::_prepareLayout();
/**
* Retrieve current order model instance
*
* @return MagentoSalesModelOrder
*/
public function getOrder()
return $this->session->getLastRealOrder();
Create view files which are override from xml files
- appcodeKetanModuleviewfrontendtemplatesonepagedetails.phtml
https://pastebin.com/b0LDaHYu
- appcodeKetanModuleviewfrontendtemplatesonepagesuccess.phtml
https://pastebin.com/dL6vCXGQ
- appcodeKetanModuleviewfrontendtemplatesonepagedetailsorderview.phtml
https://pastebin.com/9edArjFL

thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to overrideorder/items.phtmlandorderitemsrendererdefault.phtmlor extend it to current module from defaultmodule-sales
– Ketan Borada
Aug 6 at 6:38
add a comment |
Create module for that don't make changes in core files.
Download Module
You can show all order details by following steps.
Remove from xml which you dont want to display.
create appcodeKetanModuleviewfrontendlayoutcheckout_onepage_success.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="sales_order_item_renderers"/>
<update handle="sales_order_item_price"/>
<body>
<referenceBlock name="checkout.success" remove="true"/>
<referenceContainer name="content">
<block class="MagentoCheckoutBlockOnepageSuccess" name="ketan.checkout.success" template="Ketan_Module::onepage/success.phtml" cacheable="false">
<block class="KetanModuleBlockOnepageSuccessDetails" name="ketan.checkout.success.details" as="details" template="Ketan_Module::onepage/details.phtml" cacheable="false">
<block class="MagentoSalesBlockOrderInfo" as="info" name="sales.order.info" />
<block class="MagentoSalesBlockOrderView" name="sales.order.view" cacheable="false" as="order_view" template="Ketan_Module::onepage/details/order/view.phtml">
<block class="MagentoSalesBlockOrderItems" name="order_items" template="order/items.phtml">
<block class="MagentoFrameworkViewElementRendererList" name="sales.order.items.renderers" as="renderer.list"/>
<block class="MagentoSalesBlockOrderTotals" name="order_totals" template="order/totals.phtml">
<arguments>
<argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
<argument name="value_properties" xsi:type="string">class="amount"</argument>
</arguments>
<block class="MagentoTaxBlockSalesOrderTax" name="tax" template="order/tax.phtml"/>
</block>
</block>
</block>
</block>
<container name="order.success.additional.info" label="Order Success Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
create Block file for template appcodeKetanModuleBlockOnepageSuccessDetails.php
<?php
namespace KetanModuleBlockOnepageSuccess;
use MagentoFrameworkViewElementTemplate;
class Details extends Template
/**
* @var MagentoFrameworkRegistry
*/
protected $registry;
/**
* @var MagentoCheckoutModelSession
*/
protected $session;
public function __construct(
TemplateContext $context,
MagentoFrameworkRegistry $registry,
MagentoCheckoutModelSession $session,
array $data = []
)
parent::__construct($context, $data);
$this->registry = $registry;
$this->session = $session;
protected function _prepareLayout()
if (!$this->registry->registry('current_order'))
$this->registry->register('current_order', $this->getOrder());
return parent::_prepareLayout();
/**
* Retrieve current order model instance
*
* @return MagentoSalesModelOrder
*/
public function getOrder()
return $this->session->getLastRealOrder();
Create view files which are override from xml files
- appcodeKetanModuleviewfrontendtemplatesonepagedetails.phtml
https://pastebin.com/b0LDaHYu
- appcodeKetanModuleviewfrontendtemplatesonepagesuccess.phtml
https://pastebin.com/dL6vCXGQ
- appcodeKetanModuleviewfrontendtemplatesonepagedetailsorderview.phtml
https://pastebin.com/9edArjFL

thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to overrideorder/items.phtmlandorderitemsrendererdefault.phtmlor extend it to current module from defaultmodule-sales
– Ketan Borada
Aug 6 at 6:38
add a comment |
Create module for that don't make changes in core files.
Download Module
You can show all order details by following steps.
Remove from xml which you dont want to display.
create appcodeKetanModuleviewfrontendlayoutcheckout_onepage_success.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="sales_order_item_renderers"/>
<update handle="sales_order_item_price"/>
<body>
<referenceBlock name="checkout.success" remove="true"/>
<referenceContainer name="content">
<block class="MagentoCheckoutBlockOnepageSuccess" name="ketan.checkout.success" template="Ketan_Module::onepage/success.phtml" cacheable="false">
<block class="KetanModuleBlockOnepageSuccessDetails" name="ketan.checkout.success.details" as="details" template="Ketan_Module::onepage/details.phtml" cacheable="false">
<block class="MagentoSalesBlockOrderInfo" as="info" name="sales.order.info" />
<block class="MagentoSalesBlockOrderView" name="sales.order.view" cacheable="false" as="order_view" template="Ketan_Module::onepage/details/order/view.phtml">
<block class="MagentoSalesBlockOrderItems" name="order_items" template="order/items.phtml">
<block class="MagentoFrameworkViewElementRendererList" name="sales.order.items.renderers" as="renderer.list"/>
<block class="MagentoSalesBlockOrderTotals" name="order_totals" template="order/totals.phtml">
<arguments>
<argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
<argument name="value_properties" xsi:type="string">class="amount"</argument>
</arguments>
<block class="MagentoTaxBlockSalesOrderTax" name="tax" template="order/tax.phtml"/>
</block>
</block>
</block>
</block>
<container name="order.success.additional.info" label="Order Success Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
create Block file for template appcodeKetanModuleBlockOnepageSuccessDetails.php
<?php
namespace KetanModuleBlockOnepageSuccess;
use MagentoFrameworkViewElementTemplate;
class Details extends Template
/**
* @var MagentoFrameworkRegistry
*/
protected $registry;
/**
* @var MagentoCheckoutModelSession
*/
protected $session;
public function __construct(
TemplateContext $context,
MagentoFrameworkRegistry $registry,
MagentoCheckoutModelSession $session,
array $data = []
)
parent::__construct($context, $data);
$this->registry = $registry;
$this->session = $session;
protected function _prepareLayout()
if (!$this->registry->registry('current_order'))
$this->registry->register('current_order', $this->getOrder());
return parent::_prepareLayout();
/**
* Retrieve current order model instance
*
* @return MagentoSalesModelOrder
*/
public function getOrder()
return $this->session->getLastRealOrder();
Create view files which are override from xml files
- appcodeKetanModuleviewfrontendtemplatesonepagedetails.phtml
https://pastebin.com/b0LDaHYu
- appcodeKetanModuleviewfrontendtemplatesonepagesuccess.phtml
https://pastebin.com/dL6vCXGQ
- appcodeKetanModuleviewfrontendtemplatesonepagedetailsorderview.phtml
https://pastebin.com/9edArjFL

Create module for that don't make changes in core files.
Download Module
You can show all order details by following steps.
Remove from xml which you dont want to display.
create appcodeKetanModuleviewfrontendlayoutcheckout_onepage_success.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="sales_order_item_renderers"/>
<update handle="sales_order_item_price"/>
<body>
<referenceBlock name="checkout.success" remove="true"/>
<referenceContainer name="content">
<block class="MagentoCheckoutBlockOnepageSuccess" name="ketan.checkout.success" template="Ketan_Module::onepage/success.phtml" cacheable="false">
<block class="KetanModuleBlockOnepageSuccessDetails" name="ketan.checkout.success.details" as="details" template="Ketan_Module::onepage/details.phtml" cacheable="false">
<block class="MagentoSalesBlockOrderInfo" as="info" name="sales.order.info" />
<block class="MagentoSalesBlockOrderView" name="sales.order.view" cacheable="false" as="order_view" template="Ketan_Module::onepage/details/order/view.phtml">
<block class="MagentoSalesBlockOrderItems" name="order_items" template="order/items.phtml">
<block class="MagentoFrameworkViewElementRendererList" name="sales.order.items.renderers" as="renderer.list"/>
<block class="MagentoSalesBlockOrderTotals" name="order_totals" template="order/totals.phtml">
<arguments>
<argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
<argument name="value_properties" xsi:type="string">class="amount"</argument>
</arguments>
<block class="MagentoTaxBlockSalesOrderTax" name="tax" template="order/tax.phtml"/>
</block>
</block>
</block>
</block>
<container name="order.success.additional.info" label="Order Success Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
create Block file for template appcodeKetanModuleBlockOnepageSuccessDetails.php
<?php
namespace KetanModuleBlockOnepageSuccess;
use MagentoFrameworkViewElementTemplate;
class Details extends Template
/**
* @var MagentoFrameworkRegistry
*/
protected $registry;
/**
* @var MagentoCheckoutModelSession
*/
protected $session;
public function __construct(
TemplateContext $context,
MagentoFrameworkRegistry $registry,
MagentoCheckoutModelSession $session,
array $data = []
)
parent::__construct($context, $data);
$this->registry = $registry;
$this->session = $session;
protected function _prepareLayout()
if (!$this->registry->registry('current_order'))
$this->registry->register('current_order', $this->getOrder());
return parent::_prepareLayout();
/**
* Retrieve current order model instance
*
* @return MagentoSalesModelOrder
*/
public function getOrder()
return $this->session->getLastRealOrder();
Create view files which are override from xml files
- appcodeKetanModuleviewfrontendtemplatesonepagedetails.phtml
https://pastebin.com/b0LDaHYu
- appcodeKetanModuleviewfrontendtemplatesonepagesuccess.phtml
https://pastebin.com/dL6vCXGQ
- appcodeKetanModuleviewfrontendtemplatesonepagedetailsorderview.phtml
https://pastebin.com/9edArjFL

edited Aug 2 at 6:53
answered Aug 2 at 5:34
Ketan BoradaKetan Borada
1,00913 silver badges41 bronze badges
1,00913 silver badges41 bronze badges
thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to overrideorder/items.phtmlandorderitemsrendererdefault.phtmlor extend it to current module from defaultmodule-sales
– Ketan Borada
Aug 6 at 6:38
add a comment |
thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to overrideorder/items.phtmlandorderitemsrendererdefault.phtmlor extend it to current module from defaultmodule-sales
– Ketan Borada
Aug 6 at 6:38
thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
thank you for your answer! In this solution would also be able to display the image of the products?
– R.Park
Aug 5 at 14:26
NO! it's default as order view page for that you have to override
order/items.phtml and orderitemsrendererdefault.phtml or extend it to current module from default module-sales– Ketan Borada
Aug 6 at 6:38
NO! it's default as order view page for that you have to override
order/items.phtml and orderitemsrendererdefault.phtml or extend it to current module from default module-sales– Ketan Borada
Aug 6 at 6:38
add a comment |
Please try with below code :
like : pass $block->getOrderId() in $block->getMethodShipping($block->getOrderId())
public function getMethodShipping($orderid)
$objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct
$order = $objectManager->create('MagentoSalesModelOrder')->load($orderid);
return $order->getShippingMethod();
same process do with getProductItem()
I hope its working
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
add a comment |
Please try with below code :
like : pass $block->getOrderId() in $block->getMethodShipping($block->getOrderId())
public function getMethodShipping($orderid)
$objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct
$order = $objectManager->create('MagentoSalesModelOrder')->load($orderid);
return $order->getShippingMethod();
same process do with getProductItem()
I hope its working
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
add a comment |
Please try with below code :
like : pass $block->getOrderId() in $block->getMethodShipping($block->getOrderId())
public function getMethodShipping($orderid)
$objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct
$order = $objectManager->create('MagentoSalesModelOrder')->load($orderid);
return $order->getShippingMethod();
same process do with getProductItem()
I hope its working
Please try with below code :
like : pass $block->getOrderId() in $block->getMethodShipping($block->getOrderId())
public function getMethodShipping($orderid)
$objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct
$order = $objectManager->create('MagentoSalesModelOrder')->load($orderid);
return $order->getShippingMethod();
same process do with getProductItem()
I hope its working
answered Aug 1 at 6:09
Anas MansuriAnas Mansuri
1,3742 silver badges16 bronze badges
1,3742 silver badges16 bronze badges
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
add a comment |
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
I change the start of the succes.phtml container? <?php if ($block->getOrderId()):?> to $block->getMethodShipping($block->getOrderId()) is this ?
– R.Park
Aug 1 at 14:29
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
If you want to add this code in phtml than directly use $objectManager = MagentoFrameworkAppObjectManager::getInstance(); //if it's working than please use via construct $order = $objectManager->create('MagentoSalesModelOrder')->load($block->getOrderId()); print_r( $order->getShippingMethod());
– Anas Mansuri
Aug 1 at 18:47
add a comment |
Please try with below code :
1) Override order success block
app/code/CompanyName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCheckoutBlockOnepageSuccess"
type="CompanyNameModuleNameBlockOnepageSuccess"/>
</config>
2) order success block
<?php
namespace CompanyNameModuleNameBlockOnepage;
class Success extends MagentoCheckoutBlockOnepageSuccess
protected $_orderDetail;
protected $_order;
protected $_item;
protected $_renderer;
protected $_priceHelper;
protected $_customerSession;
/**
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoCheckoutModelSession $checkoutSession
* @param MagentoSalesModelOrderConfig $orderConfig
* @param MagentoFrameworkAppHttpContext $httpContext
* @param array $data
*/
public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoCheckoutModelSession $checkoutSession,
MagentoSalesModelOrderConfig $orderConfig,
MagentoFrameworkAppHttpContext $httpContext,
MagentoSalesModelOrder $orderDetails,
MagentoCatalogModelProductRepository $item,
MagentoSalesModelOrderAddressRenderer $renderer,
MagentoFrameworkPricingHelperData $priceHelper,
MagentoCatalogBlockProductListProduct $listProduct,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoCustomerModelSession $customerSession,
array $data = []
)
$this->_orderDetail = $orderDetails;
$this->_renderer = $renderer;
$this->_item = $item;
$this->_priceHelper = $priceHelper;
$this->_listProduct = $listProduct;
$this->_storeManager = $storeManager;
$this->_customerSession = $customerSession;
$this->_order = null;
parent::__construct(
$context, $checkoutSession, $orderConfig, $httpContext, $data
);
public function getOrder($id)
$this->_order = $this->_orderDetail->loadByIncrementId($id);
return $this->_order;
public function getItem($itemId)
return $this->_item->getById($itemId);
public function getFormatedAddress($address)
return $this->_renderer->format($address, 'html');
public function getPaymentMethodtitle($order)
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
return $method->getTitle();
/**
* Get Formated Price
* @param fload price
* @return boolean
*/
public function getFormatedPrice($price='')
return $this->_priceHelper->currency($price, true, false);
public function getMediaUrl()
$currentStore = $this->_storeManager->getStore();
return $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
Override order success.phtml and Add html from Override success.html file
CompanyName/ModuleName/view/frontend/templates/success.phtml
3) Get Shipping Method
<?php $order = $this->getOrder($this->getOrderId()); ?>
<?php if(!empty($order->getShippingDescription())):?>
<div class="shipping-method">
<strong class="box-title">
<span class="box-des"><?php /* @escapeNotVerified */ echo __('Shipping Method'); ?></span>
</strong>
<div class="box-content">
<?php echo $order->getShippingDescription(); ?>
</div>
</div>
<?php endif;?>
4) Get Product Details
<?php $order = $this->getOrder($this->getOrderId()); ?>
<div class="order-detail">
<table>
<thead>
<tr>
<th colspan="3"><?php /* @escapeNotVerified */ echo __('Product Name'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Price'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Qty'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Subtotal'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->getAllVisibleItems() as $item)
$product = $this->getItem($item->getProductId());
$options = $item->getProductOptions();
$imageBlock = $block->getLayout()->createBlock('MagentoCatalogBlockProductListProduct');
$productImage = $imageBlock->getImage($product, 'category_page_list');
?>
<tr class="data-item">
<td colspan="3">
<div class="product-image">
<a href="<?php echo $product->getProductUrl(); ?>"><?php echo $productImage->toHtml(); ?></a>
</div>
<div class="product-name-sku">
<div class="product-name">
<span><?php echo $item->getName(); ?></span>
</div>
<div class="product-name">
<h5><?php /* @escapeNotVerified */ echo __('SKU'); ?></h5>
<span><?php echo $item->getSku(); ?></span>
</div>
</div>
</td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getPrice()); ?></td>
<td class="table-number"><?php echo $item->getQtyOrdered(); ?></td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getBaseRowTotal()); ?></td>
</tr>
<?php
?>
</tbody>
<tfoot>
<tr class="subtotal">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getSubtotal()); ?></span>
</td>
</tr>
<tr class="shipping">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getShippingAmount()); ?></span>
</td>
</tr>
<tr class="grand_total">
<th colspan="5" class="table-method" scope="row">
<strong><?php /* @escapeNotVerified */ echo __('Grand Total'); ?></strong>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Grand Total'); ?>">
<strong><span class="price"><?php echo $this->getFormatedPrice($order->getGrandTotal()); ?></span></strong>
</td>
</tr>
</tfoot>
</table>
</div>
It's working
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
add a comment |
Please try with below code :
1) Override order success block
app/code/CompanyName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCheckoutBlockOnepageSuccess"
type="CompanyNameModuleNameBlockOnepageSuccess"/>
</config>
2) order success block
<?php
namespace CompanyNameModuleNameBlockOnepage;
class Success extends MagentoCheckoutBlockOnepageSuccess
protected $_orderDetail;
protected $_order;
protected $_item;
protected $_renderer;
protected $_priceHelper;
protected $_customerSession;
/**
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoCheckoutModelSession $checkoutSession
* @param MagentoSalesModelOrderConfig $orderConfig
* @param MagentoFrameworkAppHttpContext $httpContext
* @param array $data
*/
public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoCheckoutModelSession $checkoutSession,
MagentoSalesModelOrderConfig $orderConfig,
MagentoFrameworkAppHttpContext $httpContext,
MagentoSalesModelOrder $orderDetails,
MagentoCatalogModelProductRepository $item,
MagentoSalesModelOrderAddressRenderer $renderer,
MagentoFrameworkPricingHelperData $priceHelper,
MagentoCatalogBlockProductListProduct $listProduct,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoCustomerModelSession $customerSession,
array $data = []
)
$this->_orderDetail = $orderDetails;
$this->_renderer = $renderer;
$this->_item = $item;
$this->_priceHelper = $priceHelper;
$this->_listProduct = $listProduct;
$this->_storeManager = $storeManager;
$this->_customerSession = $customerSession;
$this->_order = null;
parent::__construct(
$context, $checkoutSession, $orderConfig, $httpContext, $data
);
public function getOrder($id)
$this->_order = $this->_orderDetail->loadByIncrementId($id);
return $this->_order;
public function getItem($itemId)
return $this->_item->getById($itemId);
public function getFormatedAddress($address)
return $this->_renderer->format($address, 'html');
public function getPaymentMethodtitle($order)
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
return $method->getTitle();
/**
* Get Formated Price
* @param fload price
* @return boolean
*/
public function getFormatedPrice($price='')
return $this->_priceHelper->currency($price, true, false);
public function getMediaUrl()
$currentStore = $this->_storeManager->getStore();
return $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
Override order success.phtml and Add html from Override success.html file
CompanyName/ModuleName/view/frontend/templates/success.phtml
3) Get Shipping Method
<?php $order = $this->getOrder($this->getOrderId()); ?>
<?php if(!empty($order->getShippingDescription())):?>
<div class="shipping-method">
<strong class="box-title">
<span class="box-des"><?php /* @escapeNotVerified */ echo __('Shipping Method'); ?></span>
</strong>
<div class="box-content">
<?php echo $order->getShippingDescription(); ?>
</div>
</div>
<?php endif;?>
4) Get Product Details
<?php $order = $this->getOrder($this->getOrderId()); ?>
<div class="order-detail">
<table>
<thead>
<tr>
<th colspan="3"><?php /* @escapeNotVerified */ echo __('Product Name'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Price'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Qty'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Subtotal'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->getAllVisibleItems() as $item)
$product = $this->getItem($item->getProductId());
$options = $item->getProductOptions();
$imageBlock = $block->getLayout()->createBlock('MagentoCatalogBlockProductListProduct');
$productImage = $imageBlock->getImage($product, 'category_page_list');
?>
<tr class="data-item">
<td colspan="3">
<div class="product-image">
<a href="<?php echo $product->getProductUrl(); ?>"><?php echo $productImage->toHtml(); ?></a>
</div>
<div class="product-name-sku">
<div class="product-name">
<span><?php echo $item->getName(); ?></span>
</div>
<div class="product-name">
<h5><?php /* @escapeNotVerified */ echo __('SKU'); ?></h5>
<span><?php echo $item->getSku(); ?></span>
</div>
</div>
</td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getPrice()); ?></td>
<td class="table-number"><?php echo $item->getQtyOrdered(); ?></td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getBaseRowTotal()); ?></td>
</tr>
<?php
?>
</tbody>
<tfoot>
<tr class="subtotal">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getSubtotal()); ?></span>
</td>
</tr>
<tr class="shipping">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getShippingAmount()); ?></span>
</td>
</tr>
<tr class="grand_total">
<th colspan="5" class="table-method" scope="row">
<strong><?php /* @escapeNotVerified */ echo __('Grand Total'); ?></strong>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Grand Total'); ?>">
<strong><span class="price"><?php echo $this->getFormatedPrice($order->getGrandTotal()); ?></span></strong>
</td>
</tr>
</tfoot>
</table>
</div>
It's working
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
add a comment |
Please try with below code :
1) Override order success block
app/code/CompanyName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCheckoutBlockOnepageSuccess"
type="CompanyNameModuleNameBlockOnepageSuccess"/>
</config>
2) order success block
<?php
namespace CompanyNameModuleNameBlockOnepage;
class Success extends MagentoCheckoutBlockOnepageSuccess
protected $_orderDetail;
protected $_order;
protected $_item;
protected $_renderer;
protected $_priceHelper;
protected $_customerSession;
/**
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoCheckoutModelSession $checkoutSession
* @param MagentoSalesModelOrderConfig $orderConfig
* @param MagentoFrameworkAppHttpContext $httpContext
* @param array $data
*/
public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoCheckoutModelSession $checkoutSession,
MagentoSalesModelOrderConfig $orderConfig,
MagentoFrameworkAppHttpContext $httpContext,
MagentoSalesModelOrder $orderDetails,
MagentoCatalogModelProductRepository $item,
MagentoSalesModelOrderAddressRenderer $renderer,
MagentoFrameworkPricingHelperData $priceHelper,
MagentoCatalogBlockProductListProduct $listProduct,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoCustomerModelSession $customerSession,
array $data = []
)
$this->_orderDetail = $orderDetails;
$this->_renderer = $renderer;
$this->_item = $item;
$this->_priceHelper = $priceHelper;
$this->_listProduct = $listProduct;
$this->_storeManager = $storeManager;
$this->_customerSession = $customerSession;
$this->_order = null;
parent::__construct(
$context, $checkoutSession, $orderConfig, $httpContext, $data
);
public function getOrder($id)
$this->_order = $this->_orderDetail->loadByIncrementId($id);
return $this->_order;
public function getItem($itemId)
return $this->_item->getById($itemId);
public function getFormatedAddress($address)
return $this->_renderer->format($address, 'html');
public function getPaymentMethodtitle($order)
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
return $method->getTitle();
/**
* Get Formated Price
* @param fload price
* @return boolean
*/
public function getFormatedPrice($price='')
return $this->_priceHelper->currency($price, true, false);
public function getMediaUrl()
$currentStore = $this->_storeManager->getStore();
return $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
Override order success.phtml and Add html from Override success.html file
CompanyName/ModuleName/view/frontend/templates/success.phtml
3) Get Shipping Method
<?php $order = $this->getOrder($this->getOrderId()); ?>
<?php if(!empty($order->getShippingDescription())):?>
<div class="shipping-method">
<strong class="box-title">
<span class="box-des"><?php /* @escapeNotVerified */ echo __('Shipping Method'); ?></span>
</strong>
<div class="box-content">
<?php echo $order->getShippingDescription(); ?>
</div>
</div>
<?php endif;?>
4) Get Product Details
<?php $order = $this->getOrder($this->getOrderId()); ?>
<div class="order-detail">
<table>
<thead>
<tr>
<th colspan="3"><?php /* @escapeNotVerified */ echo __('Product Name'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Price'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Qty'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Subtotal'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->getAllVisibleItems() as $item)
$product = $this->getItem($item->getProductId());
$options = $item->getProductOptions();
$imageBlock = $block->getLayout()->createBlock('MagentoCatalogBlockProductListProduct');
$productImage = $imageBlock->getImage($product, 'category_page_list');
?>
<tr class="data-item">
<td colspan="3">
<div class="product-image">
<a href="<?php echo $product->getProductUrl(); ?>"><?php echo $productImage->toHtml(); ?></a>
</div>
<div class="product-name-sku">
<div class="product-name">
<span><?php echo $item->getName(); ?></span>
</div>
<div class="product-name">
<h5><?php /* @escapeNotVerified */ echo __('SKU'); ?></h5>
<span><?php echo $item->getSku(); ?></span>
</div>
</div>
</td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getPrice()); ?></td>
<td class="table-number"><?php echo $item->getQtyOrdered(); ?></td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getBaseRowTotal()); ?></td>
</tr>
<?php
?>
</tbody>
<tfoot>
<tr class="subtotal">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getSubtotal()); ?></span>
</td>
</tr>
<tr class="shipping">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getShippingAmount()); ?></span>
</td>
</tr>
<tr class="grand_total">
<th colspan="5" class="table-method" scope="row">
<strong><?php /* @escapeNotVerified */ echo __('Grand Total'); ?></strong>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Grand Total'); ?>">
<strong><span class="price"><?php echo $this->getFormatedPrice($order->getGrandTotal()); ?></span></strong>
</td>
</tr>
</tfoot>
</table>
</div>
It's working
Please try with below code :
1) Override order success block
app/code/CompanyName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCheckoutBlockOnepageSuccess"
type="CompanyNameModuleNameBlockOnepageSuccess"/>
</config>
2) order success block
<?php
namespace CompanyNameModuleNameBlockOnepage;
class Success extends MagentoCheckoutBlockOnepageSuccess
protected $_orderDetail;
protected $_order;
protected $_item;
protected $_renderer;
protected $_priceHelper;
protected $_customerSession;
/**
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoCheckoutModelSession $checkoutSession
* @param MagentoSalesModelOrderConfig $orderConfig
* @param MagentoFrameworkAppHttpContext $httpContext
* @param array $data
*/
public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoCheckoutModelSession $checkoutSession,
MagentoSalesModelOrderConfig $orderConfig,
MagentoFrameworkAppHttpContext $httpContext,
MagentoSalesModelOrder $orderDetails,
MagentoCatalogModelProductRepository $item,
MagentoSalesModelOrderAddressRenderer $renderer,
MagentoFrameworkPricingHelperData $priceHelper,
MagentoCatalogBlockProductListProduct $listProduct,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoCustomerModelSession $customerSession,
array $data = []
)
$this->_orderDetail = $orderDetails;
$this->_renderer = $renderer;
$this->_item = $item;
$this->_priceHelper = $priceHelper;
$this->_listProduct = $listProduct;
$this->_storeManager = $storeManager;
$this->_customerSession = $customerSession;
$this->_order = null;
parent::__construct(
$context, $checkoutSession, $orderConfig, $httpContext, $data
);
public function getOrder($id)
$this->_order = $this->_orderDetail->loadByIncrementId($id);
return $this->_order;
public function getItem($itemId)
return $this->_item->getById($itemId);
public function getFormatedAddress($address)
return $this->_renderer->format($address, 'html');
public function getPaymentMethodtitle($order)
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
return $method->getTitle();
/**
* Get Formated Price
* @param fload price
* @return boolean
*/
public function getFormatedPrice($price='')
return $this->_priceHelper->currency($price, true, false);
public function getMediaUrl()
$currentStore = $this->_storeManager->getStore();
return $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
Override order success.phtml and Add html from Override success.html file
CompanyName/ModuleName/view/frontend/templates/success.phtml
3) Get Shipping Method
<?php $order = $this->getOrder($this->getOrderId()); ?>
<?php if(!empty($order->getShippingDescription())):?>
<div class="shipping-method">
<strong class="box-title">
<span class="box-des"><?php /* @escapeNotVerified */ echo __('Shipping Method'); ?></span>
</strong>
<div class="box-content">
<?php echo $order->getShippingDescription(); ?>
</div>
</div>
<?php endif;?>
4) Get Product Details
<?php $order = $this->getOrder($this->getOrderId()); ?>
<div class="order-detail">
<table>
<thead>
<tr>
<th colspan="3"><?php /* @escapeNotVerified */ echo __('Product Name'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Price'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Qty'); ?></th>
<th class="table-number"><?php /* @escapeNotVerified */ echo __('Subtotal'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->getAllVisibleItems() as $item)
$product = $this->getItem($item->getProductId());
$options = $item->getProductOptions();
$imageBlock = $block->getLayout()->createBlock('MagentoCatalogBlockProductListProduct');
$productImage = $imageBlock->getImage($product, 'category_page_list');
?>
<tr class="data-item">
<td colspan="3">
<div class="product-image">
<a href="<?php echo $product->getProductUrl(); ?>"><?php echo $productImage->toHtml(); ?></a>
</div>
<div class="product-name-sku">
<div class="product-name">
<span><?php echo $item->getName(); ?></span>
</div>
<div class="product-name">
<h5><?php /* @escapeNotVerified */ echo __('SKU'); ?></h5>
<span><?php echo $item->getSku(); ?></span>
</div>
</div>
</td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getPrice()); ?></td>
<td class="table-number"><?php echo $item->getQtyOrdered(); ?></td>
<td class="table-number"><?php echo $this->getFormatedPrice($item->getBaseRowTotal()); ?></td>
</tr>
<?php
?>
</tbody>
<tfoot>
<tr class="subtotal">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Subtotal'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getSubtotal()); ?></span>
</td>
</tr>
<tr class="shipping">
<th colspan="5" class="table-method" scope="row">
<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Shipping & Handling'); ?>">
<span class="price"><?php echo $this->getFormatedPrice($order->getShippingAmount()); ?></span>
</td>
</tr>
<tr class="grand_total">
<th colspan="5" class="table-method" scope="row">
<strong><?php /* @escapeNotVerified */ echo __('Grand Total'); ?></strong>
</th>
<td class="number" data-th="<?php /* @escapeNotVerified */ echo __('Grand Total'); ?>">
<strong><span class="price"><?php echo $this->getFormatedPrice($order->getGrandTotal()); ?></span></strong>
</td>
</tr>
</tfoot>
</table>
</div>
It's working
edited Aug 5 at 4:30
answered Aug 1 at 13:09
Limbani HimanshuLimbani Himanshu
3321 silver badge9 bronze badges
3321 silver badge9 bronze badges
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
add a comment |
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
Oi @LimbaniHimanshu Thanks for your response. Could you help me understand it? Because in my case it gave error. Get Shipping Method and Get Product Details are inserted into success.phtml? And what would the method of returning them look like?
– R.Park
Aug 1 at 15:17
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
sorry i have add half answer. can you please try with modify answer.
– Limbani Himanshu
Aug 2 at 5:09
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
Hello @LimbaniHimanshu, tks for answer! Do I replace all the di.xml content with just this one? in htdocs/vendor/magento/module-checkout/etc this is ?
– R.Park
Aug 5 at 15:48
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
I followed your example but unfortunately I was unsuccessful, could you help me?
– R.Park
Aug 5 at 16:01
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284014%2fmagento-2-how-to-show-products-and-shipping-method-on-order-success-page-as-p%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
check my answer,you can download complete module from github
– Ketan Borada
Aug 2 at 6:54
simple extension magecomp.com/magento-2-checkout-success-page.html
– Gaurav Jain
Aug 6 at 7:09