How to add more information to Order Information page (Admin and Customer)How to extend backend template files in Magento 21.9.0.1 CE Programmatically Authorize, then CaptureProgramatically create order with Authorize.net payment method, already authorizedMagento 2 - Get order PayPal information programmaticallyHow to add an extension attribute into “Customer Address”Custom payment gateway order getPayment returns nullAdd additional information to payment methodHow to post data to a payment provider when placing an order in Magento 2Form is not displayed on panel admin Magento 2Magento offline custom Payment method with drop down listMagento 2 How to disable price from orders, customer account and order view if custom module is enabled?

Is "safes" an acceptable alternative to "makes safe"

Does a 4 bladed prop have almost twice the thrust of a 2 bladed prop?

Write The Shortest Program To Check If A Binary Tree Is Balanced

Non-small objects in categories

What is an air conditioner compressor hard start kit and how does it work?

Why do proponents of guns oppose gun competency tests?

Is it double speak?

Does a humanoid possessed by a ghost register as undead to a paladin's Divine Sense?

What is the corner house number?

Only charge capacitor when button pushed then turn on LED momentarily with capacitor when button released

Why am I not getting stuck in the loop

Where to pee in London?

How easy is it to get a gun illegally in the United States?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Why can I log in to my facebook account with misspelled email/password

Changing Row Keys into Normal Rows

Is the first page of a novel really that important?

Generate a random point outside a given rectangle within a map

Whats the difference between <processors> and <pipelines> in Sitecore configuration?

Ubuntu show wrong disk sizes, how to solve it?

Why do dragons like shiny stuff?

How does LIDAR avoid getting confused in an environment being scanned by hundreds of other LIDAR?

Is space radiation a risk for space film photography, and how is this prevented?

Does this smartphone photo show Mars just below the Sun?



How to add more information to Order Information page (Admin and Customer)


How to extend backend template files in Magento 21.9.0.1 CE Programmatically Authorize, then CaptureProgramatically create order with Authorize.net payment method, already authorizedMagento 2 - Get order PayPal information programmaticallyHow to add an extension attribute into “Customer Address”Custom payment gateway order getPayment returns nullAdd additional information to payment methodHow to post data to a payment provider when placing an order in Magento 2Form is not displayed on panel admin Magento 2Magento offline custom Payment method with drop down listMagento 2 How to disable price from orders, customer account and order view if custom module is enabled?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm super noob in Magento module development, but I'm working on a custom payment module that grabs some payment information on checkout into "additional_information", using this Observer:



class DataAssignObserver extends AbstractDataAssignObserver

/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)

$method = $this->readMethodArgument($observer);
$data = $this->readDataArgument($observer);

$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData))
return;


// $paymentModel = $this->readPaymentModelArgument($observer); // Magento 2.1 ONLY
$paymentInfo = $method->getInfoInstance();

// $paymentModel->setAdditionalInformation(
$paymentInfo->setAdditionalInformation(
$additionalData
);




Is there a detailed example on how to pull this information into the Order information pages, admin and customer side?



I know a few bits and pieces, like $paymentInfo->getAdditionalInformation(), but I'd really like to have a detailed example for it.










share|improve this question
























  • do you want to show the additional information on order page(adminhtml)?

    – Bojjaiah
    Feb 21 '17 at 9:39












  • Yes, adminhtml and frontend

    – Marco Ferreira
    Feb 22 '17 at 19:06











  • which place do you want to show?

    – Bojjaiah
    Feb 23 '17 at 4:56











  • Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

    – Marco Ferreira
    Feb 24 '17 at 5:14












  • see example magento.stackexchange.com/questions/76434/…

    – Bojjaiah
    Feb 24 '17 at 6:51

















1















I'm super noob in Magento module development, but I'm working on a custom payment module that grabs some payment information on checkout into "additional_information", using this Observer:



class DataAssignObserver extends AbstractDataAssignObserver

/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)

$method = $this->readMethodArgument($observer);
$data = $this->readDataArgument($observer);

$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData))
return;


// $paymentModel = $this->readPaymentModelArgument($observer); // Magento 2.1 ONLY
$paymentInfo = $method->getInfoInstance();

// $paymentModel->setAdditionalInformation(
$paymentInfo->setAdditionalInformation(
$additionalData
);




Is there a detailed example on how to pull this information into the Order information pages, admin and customer side?



I know a few bits and pieces, like $paymentInfo->getAdditionalInformation(), but I'd really like to have a detailed example for it.










share|improve this question
























  • do you want to show the additional information on order page(adminhtml)?

    – Bojjaiah
    Feb 21 '17 at 9:39












  • Yes, adminhtml and frontend

    – Marco Ferreira
    Feb 22 '17 at 19:06











  • which place do you want to show?

    – Bojjaiah
    Feb 23 '17 at 4:56











  • Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

    – Marco Ferreira
    Feb 24 '17 at 5:14












  • see example magento.stackexchange.com/questions/76434/…

    – Bojjaiah
    Feb 24 '17 at 6:51













1












1








1








I'm super noob in Magento module development, but I'm working on a custom payment module that grabs some payment information on checkout into "additional_information", using this Observer:



class DataAssignObserver extends AbstractDataAssignObserver

/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)

$method = $this->readMethodArgument($observer);
$data = $this->readDataArgument($observer);

$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData))
return;


// $paymentModel = $this->readPaymentModelArgument($observer); // Magento 2.1 ONLY
$paymentInfo = $method->getInfoInstance();

// $paymentModel->setAdditionalInformation(
$paymentInfo->setAdditionalInformation(
$additionalData
);




Is there a detailed example on how to pull this information into the Order information pages, admin and customer side?



I know a few bits and pieces, like $paymentInfo->getAdditionalInformation(), but I'd really like to have a detailed example for it.










share|improve this question














I'm super noob in Magento module development, but I'm working on a custom payment module that grabs some payment information on checkout into "additional_information", using this Observer:



class DataAssignObserver extends AbstractDataAssignObserver

/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)

$method = $this->readMethodArgument($observer);
$data = $this->readDataArgument($observer);

$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData))
return;


// $paymentModel = $this->readPaymentModelArgument($observer); // Magento 2.1 ONLY
$paymentInfo = $method->getInfoInstance();

// $paymentModel->setAdditionalInformation(
$paymentInfo->setAdditionalInformation(
$additionalData
);




Is there a detailed example on how to pull this information into the Order information pages, admin and customer side?



I know a few bits and pieces, like $paymentInfo->getAdditionalInformation(), but I'd really like to have a detailed example for it.







magento-2.1 orders custom payment-methods payment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 20 '17 at 20:45









Marco FerreiraMarco Ferreira

62 bronze badges




62 bronze badges















  • do you want to show the additional information on order page(adminhtml)?

    – Bojjaiah
    Feb 21 '17 at 9:39












  • Yes, adminhtml and frontend

    – Marco Ferreira
    Feb 22 '17 at 19:06











  • which place do you want to show?

    – Bojjaiah
    Feb 23 '17 at 4:56











  • Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

    – Marco Ferreira
    Feb 24 '17 at 5:14












  • see example magento.stackexchange.com/questions/76434/…

    – Bojjaiah
    Feb 24 '17 at 6:51

















  • do you want to show the additional information on order page(adminhtml)?

    – Bojjaiah
    Feb 21 '17 at 9:39












  • Yes, adminhtml and frontend

    – Marco Ferreira
    Feb 22 '17 at 19:06











  • which place do you want to show?

    – Bojjaiah
    Feb 23 '17 at 4:56











  • Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

    – Marco Ferreira
    Feb 24 '17 at 5:14












  • see example magento.stackexchange.com/questions/76434/…

    – Bojjaiah
    Feb 24 '17 at 6:51
















do you want to show the additional information on order page(adminhtml)?

– Bojjaiah
Feb 21 '17 at 9:39






do you want to show the additional information on order page(adminhtml)?

– Bojjaiah
Feb 21 '17 at 9:39














Yes, adminhtml and frontend

– Marco Ferreira
Feb 22 '17 at 19:06





Yes, adminhtml and frontend

– Marco Ferreira
Feb 22 '17 at 19:06













which place do you want to show?

– Bojjaiah
Feb 23 '17 at 4:56





which place do you want to show?

– Bojjaiah
Feb 23 '17 at 4:56













Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

– Marco Ferreira
Feb 24 '17 at 5:14






Well, ideally to the "Payment Information" on the adminhtml side and "Payment Method" on the frontend side. Basically the same way you get credit card information when you use credit card.

– Marco Ferreira
Feb 24 '17 at 5:14














see example magento.stackexchange.com/questions/76434/…

– Bojjaiah
Feb 24 '17 at 6:51





see example magento.stackexchange.com/questions/76434/…

– Bojjaiah
Feb 24 '17 at 6:51










2 Answers
2






active

oldest

votes


















0














you can pull the information by extending Payment Method Block.



registration.php



<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);


Info.php



<?php

namespace [VendorName][ModuleName]BlockAdminhtmlOrderViewTab;

class Info extends MagentoSalesBlockAdminhtmlOrderViewTabInfo






etc/adminhtml/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="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[VendorName][ModuleName]BlockAdminhtmlOrderViewTabInfo" />
</config>


view/adminhtml/layout/sales_order_view.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="order_tab_info">
<action method="setTemplate">
<argument name="template" translate="true" xsi:type="string">order/view/tab/Info.phtml</argument>
</action>
</referenceBlock>
</body>
</page>


view/adminhtml/templates/order/view/tab/Info.phtml



 <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

?>
<?php /** @var $block MagentoSalesBlockAdminhtmlOrderViewTabInfo */ ?>
<?php $_order = $block->getOrder() ?>

<div id="order-messages">
<?php echo $block->getChildHtml('order_messages') ?>
</div>

<?php echo $block->getChildHtml('order_info') ?>
<input type="hidden" name="order_id" value="<?php /* @escapeNotVerified */ echo $_order->getId() ?>"/>

<section class="admin__page-section order-view-billing-shipping">
<div class="admin__page-section-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Payment &amp; Shipping Method') ?></span>
</div>
<!-- this is Sample Text -->
<h1>Magento 2 Custom Payment Text</h1>
<div class="admin__page-section-content">
<div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
<?php /* Payment Method */ ?>
<div class="admin__page-section-item-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Payment Information') ?></span>
</div>
<div class="admin__page-section-item-content">
<div class="order-payment-method-title"><?php echo $block->getPaymentHtml() ?></div>
<div class="order-payment-currency"><?php /* @escapeNotVerified */ echo __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
<div class="order-payment-additional">
<?php echo $block->getChildHtml('order_payment_additional'); ?>
<?php echo $block->getChildHtml('payment_additional_info'); ?>
</div>
</div>
</div>
<?php echo $block->getChildHtml('order_shipping_view') ?>
</div>
</section>

<?php echo $block->getGiftOptionsHtml() ?>

<section class="admin__page-section">
<div class="admin__page-section-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Items Ordered') ?></span>
</div>
<?php echo $block->getItemsHtml() ?>
</section>

<section class="admin__page-section">
<div class="admin__page-section-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Order Total') ?></span>
</div>
<div class="admin__page-section-content">
<div class="admin__page-section-item order-comments-history">
<div class="admin__page-section-item-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Notes for this Order') ?></span>
</div>
<?php echo $block->getChildHtml('order_history') ?>
</div>

<div class="admin__page-section-item order-totals">
<div class="admin__page-section-item-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('Order Totals') ?></span>
</div>
<?php echo $block->getChildHtml('order_totals') ?>
</div>
</div>
</section>

<?php echo $block->getChildHtml('popup_window');?>

<script>
require([
"prototype",
"Magento_Sales/order/giftoptions_tooltip"
], function()

//<![CDATA[
/**
* Retrieve gift options tooltip content
*/
function getGiftOptionsTooltipContent(itemId)
var contentLines = [];
var headerLine = null;
var contentLine = null;

$$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element)
if (element.down(0))
headerLine = element.down(0).innerHTML;
contentLine = element.down(0).next().innerHTML;
if (contentLine.length > 30)
contentLine = contentLine.slice(0,30) + '...';

contentLines.push(headerLine + ' ' + contentLine);

);
return contentLines.join('<br/>');

giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
//]]>

);
</script>


By this way you can override the Payment Section.






share|improve this answer

























  • Thank you. I'll try this out tonight and give some feedback.

    – Marco Ferreira
    Feb 28 '17 at 20:35











  • Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

    – Marco Ferreira
    May 7 '17 at 14:59


















0














Add vendor_name in view/adminhtml/layout/sales_order_view.xml



vendor_name::order/view/tab/Info.phtml



This solve the blank page in order info.






share|improve this answer



























    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160871%2fhow-to-add-more-information-to-order-information-page-admin-and-customer%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    you can pull the information by extending Payment Method Block.



    registration.php



    <?php
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    '[VendorName]_[ModuleName]',
    __DIR__
    );


    Info.php



    <?php

    namespace [VendorName][ModuleName]BlockAdminhtmlOrderViewTab;

    class Info extends MagentoSalesBlockAdminhtmlOrderViewTabInfo






    etc/adminhtml/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="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[VendorName][ModuleName]BlockAdminhtmlOrderViewTabInfo" />
    </config>


    view/adminhtml/layout/sales_order_view.xml



    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="order_tab_info">
    <action method="setTemplate">
    <argument name="template" translate="true" xsi:type="string">order/view/tab/Info.phtml</argument>
    </action>
    </referenceBlock>
    </body>
    </page>


    view/adminhtml/templates/order/view/tab/Info.phtml



     <?php
    /**
    * Copyright © 2016 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */

    // @codingStandardsIgnoreFile

    ?>
    <?php /** @var $block MagentoSalesBlockAdminhtmlOrderViewTabInfo */ ?>
    <?php $_order = $block->getOrder() ?>

    <div id="order-messages">
    <?php echo $block->getChildHtml('order_messages') ?>
    </div>

    <?php echo $block->getChildHtml('order_info') ?>
    <input type="hidden" name="order_id" value="<?php /* @escapeNotVerified */ echo $_order->getId() ?>"/>

    <section class="admin__page-section order-view-billing-shipping">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment &amp; Shipping Method') ?></span>
    </div>
    <!-- this is Sample Text -->
    <h1>Magento 2 Custom Payment Text</h1>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
    <?php /* Payment Method */ ?>
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment Information') ?></span>
    </div>
    <div class="admin__page-section-item-content">
    <div class="order-payment-method-title"><?php echo $block->getPaymentHtml() ?></div>
    <div class="order-payment-currency"><?php /* @escapeNotVerified */ echo __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
    <div class="order-payment-additional">
    <?php echo $block->getChildHtml('order_payment_additional'); ?>
    <?php echo $block->getChildHtml('payment_additional_info'); ?>
    </div>
    </div>
    </div>
    <?php echo $block->getChildHtml('order_shipping_view') ?>
    </div>
    </section>

    <?php echo $block->getGiftOptionsHtml() ?>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Items Ordered') ?></span>
    </div>
    <?php echo $block->getItemsHtml() ?>
    </section>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Total') ?></span>
    </div>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-comments-history">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Notes for this Order') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_history') ?>
    </div>

    <div class="admin__page-section-item order-totals">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Totals') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_totals') ?>
    </div>
    </div>
    </section>

    <?php echo $block->getChildHtml('popup_window');?>

    <script>
    require([
    "prototype",
    "Magento_Sales/order/giftoptions_tooltip"
    ], function()

    //<![CDATA[
    /**
    * Retrieve gift options tooltip content
    */
    function getGiftOptionsTooltipContent(itemId)
    var contentLines = [];
    var headerLine = null;
    var contentLine = null;

    $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element)
    if (element.down(0))
    headerLine = element.down(0).innerHTML;
    contentLine = element.down(0).next().innerHTML;
    if (contentLine.length > 30)
    contentLine = contentLine.slice(0,30) + '...';

    contentLines.push(headerLine + ' ' + contentLine);

    );
    return contentLines.join('<br/>');

    giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
    window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
    //]]>

    );
    </script>


    By this way you can override the Payment Section.






    share|improve this answer

























    • Thank you. I'll try this out tonight and give some feedback.

      – Marco Ferreira
      Feb 28 '17 at 20:35











    • Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

      – Marco Ferreira
      May 7 '17 at 14:59















    0














    you can pull the information by extending Payment Method Block.



    registration.php



    <?php
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    '[VendorName]_[ModuleName]',
    __DIR__
    );


    Info.php



    <?php

    namespace [VendorName][ModuleName]BlockAdminhtmlOrderViewTab;

    class Info extends MagentoSalesBlockAdminhtmlOrderViewTabInfo






    etc/adminhtml/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="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[VendorName][ModuleName]BlockAdminhtmlOrderViewTabInfo" />
    </config>


    view/adminhtml/layout/sales_order_view.xml



    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="order_tab_info">
    <action method="setTemplate">
    <argument name="template" translate="true" xsi:type="string">order/view/tab/Info.phtml</argument>
    </action>
    </referenceBlock>
    </body>
    </page>


    view/adminhtml/templates/order/view/tab/Info.phtml



     <?php
    /**
    * Copyright © 2016 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */

    // @codingStandardsIgnoreFile

    ?>
    <?php /** @var $block MagentoSalesBlockAdminhtmlOrderViewTabInfo */ ?>
    <?php $_order = $block->getOrder() ?>

    <div id="order-messages">
    <?php echo $block->getChildHtml('order_messages') ?>
    </div>

    <?php echo $block->getChildHtml('order_info') ?>
    <input type="hidden" name="order_id" value="<?php /* @escapeNotVerified */ echo $_order->getId() ?>"/>

    <section class="admin__page-section order-view-billing-shipping">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment &amp; Shipping Method') ?></span>
    </div>
    <!-- this is Sample Text -->
    <h1>Magento 2 Custom Payment Text</h1>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
    <?php /* Payment Method */ ?>
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment Information') ?></span>
    </div>
    <div class="admin__page-section-item-content">
    <div class="order-payment-method-title"><?php echo $block->getPaymentHtml() ?></div>
    <div class="order-payment-currency"><?php /* @escapeNotVerified */ echo __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
    <div class="order-payment-additional">
    <?php echo $block->getChildHtml('order_payment_additional'); ?>
    <?php echo $block->getChildHtml('payment_additional_info'); ?>
    </div>
    </div>
    </div>
    <?php echo $block->getChildHtml('order_shipping_view') ?>
    </div>
    </section>

    <?php echo $block->getGiftOptionsHtml() ?>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Items Ordered') ?></span>
    </div>
    <?php echo $block->getItemsHtml() ?>
    </section>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Total') ?></span>
    </div>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-comments-history">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Notes for this Order') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_history') ?>
    </div>

    <div class="admin__page-section-item order-totals">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Totals') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_totals') ?>
    </div>
    </div>
    </section>

    <?php echo $block->getChildHtml('popup_window');?>

    <script>
    require([
    "prototype",
    "Magento_Sales/order/giftoptions_tooltip"
    ], function()

    //<![CDATA[
    /**
    * Retrieve gift options tooltip content
    */
    function getGiftOptionsTooltipContent(itemId)
    var contentLines = [];
    var headerLine = null;
    var contentLine = null;

    $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element)
    if (element.down(0))
    headerLine = element.down(0).innerHTML;
    contentLine = element.down(0).next().innerHTML;
    if (contentLine.length > 30)
    contentLine = contentLine.slice(0,30) + '...';

    contentLines.push(headerLine + ' ' + contentLine);

    );
    return contentLines.join('<br/>');

    giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
    window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
    //]]>

    );
    </script>


    By this way you can override the Payment Section.






    share|improve this answer

























    • Thank you. I'll try this out tonight and give some feedback.

      – Marco Ferreira
      Feb 28 '17 at 20:35











    • Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

      – Marco Ferreira
      May 7 '17 at 14:59













    0












    0








    0







    you can pull the information by extending Payment Method Block.



    registration.php



    <?php
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    '[VendorName]_[ModuleName]',
    __DIR__
    );


    Info.php



    <?php

    namespace [VendorName][ModuleName]BlockAdminhtmlOrderViewTab;

    class Info extends MagentoSalesBlockAdminhtmlOrderViewTabInfo






    etc/adminhtml/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="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[VendorName][ModuleName]BlockAdminhtmlOrderViewTabInfo" />
    </config>


    view/adminhtml/layout/sales_order_view.xml



    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="order_tab_info">
    <action method="setTemplate">
    <argument name="template" translate="true" xsi:type="string">order/view/tab/Info.phtml</argument>
    </action>
    </referenceBlock>
    </body>
    </page>


    view/adminhtml/templates/order/view/tab/Info.phtml



     <?php
    /**
    * Copyright © 2016 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */

    // @codingStandardsIgnoreFile

    ?>
    <?php /** @var $block MagentoSalesBlockAdminhtmlOrderViewTabInfo */ ?>
    <?php $_order = $block->getOrder() ?>

    <div id="order-messages">
    <?php echo $block->getChildHtml('order_messages') ?>
    </div>

    <?php echo $block->getChildHtml('order_info') ?>
    <input type="hidden" name="order_id" value="<?php /* @escapeNotVerified */ echo $_order->getId() ?>"/>

    <section class="admin__page-section order-view-billing-shipping">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment &amp; Shipping Method') ?></span>
    </div>
    <!-- this is Sample Text -->
    <h1>Magento 2 Custom Payment Text</h1>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
    <?php /* Payment Method */ ?>
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment Information') ?></span>
    </div>
    <div class="admin__page-section-item-content">
    <div class="order-payment-method-title"><?php echo $block->getPaymentHtml() ?></div>
    <div class="order-payment-currency"><?php /* @escapeNotVerified */ echo __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
    <div class="order-payment-additional">
    <?php echo $block->getChildHtml('order_payment_additional'); ?>
    <?php echo $block->getChildHtml('payment_additional_info'); ?>
    </div>
    </div>
    </div>
    <?php echo $block->getChildHtml('order_shipping_view') ?>
    </div>
    </section>

    <?php echo $block->getGiftOptionsHtml() ?>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Items Ordered') ?></span>
    </div>
    <?php echo $block->getItemsHtml() ?>
    </section>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Total') ?></span>
    </div>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-comments-history">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Notes for this Order') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_history') ?>
    </div>

    <div class="admin__page-section-item order-totals">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Totals') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_totals') ?>
    </div>
    </div>
    </section>

    <?php echo $block->getChildHtml('popup_window');?>

    <script>
    require([
    "prototype",
    "Magento_Sales/order/giftoptions_tooltip"
    ], function()

    //<![CDATA[
    /**
    * Retrieve gift options tooltip content
    */
    function getGiftOptionsTooltipContent(itemId)
    var contentLines = [];
    var headerLine = null;
    var contentLine = null;

    $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element)
    if (element.down(0))
    headerLine = element.down(0).innerHTML;
    contentLine = element.down(0).next().innerHTML;
    if (contentLine.length > 30)
    contentLine = contentLine.slice(0,30) + '...';

    contentLines.push(headerLine + ' ' + contentLine);

    );
    return contentLines.join('<br/>');

    giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
    window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
    //]]>

    );
    </script>


    By this way you can override the Payment Section.






    share|improve this answer













    you can pull the information by extending Payment Method Block.



    registration.php



    <?php
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    '[VendorName]_[ModuleName]',
    __DIR__
    );


    Info.php



    <?php

    namespace [VendorName][ModuleName]BlockAdminhtmlOrderViewTab;

    class Info extends MagentoSalesBlockAdminhtmlOrderViewTabInfo






    etc/adminhtml/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="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[VendorName][ModuleName]BlockAdminhtmlOrderViewTabInfo" />
    </config>


    view/adminhtml/layout/sales_order_view.xml



    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="order_tab_info">
    <action method="setTemplate">
    <argument name="template" translate="true" xsi:type="string">order/view/tab/Info.phtml</argument>
    </action>
    </referenceBlock>
    </body>
    </page>


    view/adminhtml/templates/order/view/tab/Info.phtml



     <?php
    /**
    * Copyright © 2016 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */

    // @codingStandardsIgnoreFile

    ?>
    <?php /** @var $block MagentoSalesBlockAdminhtmlOrderViewTabInfo */ ?>
    <?php $_order = $block->getOrder() ?>

    <div id="order-messages">
    <?php echo $block->getChildHtml('order_messages') ?>
    </div>

    <?php echo $block->getChildHtml('order_info') ?>
    <input type="hidden" name="order_id" value="<?php /* @escapeNotVerified */ echo $_order->getId() ?>"/>

    <section class="admin__page-section order-view-billing-shipping">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment &amp; Shipping Method') ?></span>
    </div>
    <!-- this is Sample Text -->
    <h1>Magento 2 Custom Payment Text</h1>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
    <?php /* Payment Method */ ?>
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Payment Information') ?></span>
    </div>
    <div class="admin__page-section-item-content">
    <div class="order-payment-method-title"><?php echo $block->getPaymentHtml() ?></div>
    <div class="order-payment-currency"><?php /* @escapeNotVerified */ echo __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
    <div class="order-payment-additional">
    <?php echo $block->getChildHtml('order_payment_additional'); ?>
    <?php echo $block->getChildHtml('payment_additional_info'); ?>
    </div>
    </div>
    </div>
    <?php echo $block->getChildHtml('order_shipping_view') ?>
    </div>
    </section>

    <?php echo $block->getGiftOptionsHtml() ?>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Items Ordered') ?></span>
    </div>
    <?php echo $block->getItemsHtml() ?>
    </section>

    <section class="admin__page-section">
    <div class="admin__page-section-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Total') ?></span>
    </div>
    <div class="admin__page-section-content">
    <div class="admin__page-section-item order-comments-history">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Notes for this Order') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_history') ?>
    </div>

    <div class="admin__page-section-item order-totals">
    <div class="admin__page-section-item-title">
    <span class="title"><?php /* @escapeNotVerified */ echo __('Order Totals') ?></span>
    </div>
    <?php echo $block->getChildHtml('order_totals') ?>
    </div>
    </div>
    </section>

    <?php echo $block->getChildHtml('popup_window');?>

    <script>
    require([
    "prototype",
    "Magento_Sales/order/giftoptions_tooltip"
    ], function()

    //<![CDATA[
    /**
    * Retrieve gift options tooltip content
    */
    function getGiftOptionsTooltipContent(itemId)
    var contentLines = [];
    var headerLine = null;
    var contentLine = null;

    $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element)
    if (element.down(0))
    headerLine = element.down(0).innerHTML;
    contentLine = element.down(0).next().innerHTML;
    if (contentLine.length > 30)
    contentLine = contentLine.slice(0,30) + '...';

    contentLines.push(headerLine + ' ' + contentLine);

    );
    return contentLines.join('<br/>');

    giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
    window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
    //]]>

    );
    </script>


    By this way you can override the Payment Section.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 24 '17 at 7:11









    BojjaiahBojjaiah

    2,53132 silver badges81 bronze badges




    2,53132 silver badges81 bronze badges















    • Thank you. I'll try this out tonight and give some feedback.

      – Marco Ferreira
      Feb 28 '17 at 20:35











    • Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

      – Marco Ferreira
      May 7 '17 at 14:59

















    • Thank you. I'll try this out tonight and give some feedback.

      – Marco Ferreira
      Feb 28 '17 at 20:35











    • Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

      – Marco Ferreira
      May 7 '17 at 14:59
















    Thank you. I'll try this out tonight and give some feedback.

    – Marco Ferreira
    Feb 28 '17 at 20:35





    Thank you. I'll try this out tonight and give some feedback.

    – Marco Ferreira
    Feb 28 '17 at 20:35













    Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

    – Marco Ferreira
    May 7 '17 at 14:59





    Sorry, but only now I could get back to this. Three issues I'm having: 1. After following the sample code/files you posted I got the excepption ReflectionException: Class [...]BlockAdminhtmlOrderViewTabInfo does not exist. 2. Removing <preference for="MagentoSalesBlockAdminhtmlOrderViewTabInfo" type="[...]BlockAdminhtmlOrderViewTabInfo" /> from etc/adminhtml/di.xml fixed the exception, but the order info page is empty. 3. Finally, in Info.php, I already have a namespace defined as namespace [VendorName][ModuleName]Block;. How would I go about these?

    – Marco Ferreira
    May 7 '17 at 14:59













    0














    Add vendor_name in view/adminhtml/layout/sales_order_view.xml



    vendor_name::order/view/tab/Info.phtml



    This solve the blank page in order info.






    share|improve this answer





























      0














      Add vendor_name in view/adminhtml/layout/sales_order_view.xml



      vendor_name::order/view/tab/Info.phtml



      This solve the blank page in order info.






      share|improve this answer



























        0












        0








        0







        Add vendor_name in view/adminhtml/layout/sales_order_view.xml



        vendor_name::order/view/tab/Info.phtml



        This solve the blank page in order info.






        share|improve this answer













        Add vendor_name in view/adminhtml/layout/sales_order_view.xml



        vendor_name::order/view/tab/Info.phtml



        This solve the blank page in order info.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 8 at 5:24









        Dharmender SainiDharmender Saini

        1




        1






























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160871%2fhow-to-add-more-information-to-order-information-page-admin-and-customer%23new-answer', 'question_page');

            );

            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







            Popular posts from this blog

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form