Custom link in Account dashboard Magento 2 with order history

by jafar pinjar   Last Updated October 15, 2018 15:09 PM

I am trying to add custom link in account dashboard of customer account navigation. Used below code to add link on left side in my layout/default.xml

    <referenceBlock name="customer_account_navigation">
            <block class="Magento\Customer\Block\Account\SortLinkInterface" name="history-link">
                    <argument name="path" xsi:type="string">orderview/history/index</argument>
                    <argument name="label" xsi:type="string">Order History</argument>
                     <argument name="sortOrder" xsi:type="number">50</argument>

And added below code in my layout/oderview_history_index.xml

   <page xmlns:xsi="" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
    <title>Order History</title>
<update handle="customer_account"/>
    <referenceBlock name="page.main.title">
        <action method="setPageTitle">
            <argument translate="true" name="title" xsi:type="string">Order History</argument>

    <referenceContainer name="content">
        <block class="Vendor\Module\Block\Order\History" name="module.history"  cacheable="false" template="history.phtml"/>

I am able to add the link successfully and my template file is loading there,

In my template file i am looking for code to show all the orders, invoice and shipments in table view along with the pagination and filters.

Like the My Orders history page of default magento2, but here can we show all orders, invoice and shipments in table view one after the other?

Is something that can be achieved? Please anyone suggest me on this. Thanks

Related Questions