1

I have to show customers three recent orders in My Account page in Dashboard section in Magento 2. How will I achieve this?

  • Did you check with after place order. Because by default the recent order would be show in customer account dashboard page. – Jjo Jul 13 '17 at 4:38
  • Currently how many orders are displayed on my account page in recent orders – Manoj Deswal Jul 13 '17 at 4:57
  • Rrecently placed 5 orders will be displayed. – Jjo Jul 13 '17 at 5:06
  • I have checked it's not coming – Amrit Pal Singh Jul 13 '17 at 8:11
1
  • Try changing your current theme to Luma or Blank theme from the Design configuration.
  • If nothing has been changed in applied theme, then you will be able to see recent orders in customer account section. If yes, then the problem lies in one of the layout XML files in your theme.
  • If you still don't get recent orders, then enable logs and delete /var/log folder (if already exists)
  • Reload the page and you should get the clue from log folder now.
| improve this answer | |
0

Old Post I know but you need to copy the recent block into customer_account_index.xml like this

<referenceContainer name="content">


            <block class="Magento\Customer\Block\Account\Dashboard\Info" name="customer_account_dashboard_info" as="info" template="account/dashboard/info.phtml" cacheable="false"/>
            <block class="Magento\Customer\Block\Account\Dashboard\Address" name="customer_account_dashboard_address" as="address" template="account/dashboard/address.phtml" cacheable="false"/>


                <block class="Magento\Sales\Block\Order\History" name="sales.order.history" cacheable="false">
                    <container name="sales.order.history.info" as="info" label="Order History Info"/>
                    <container name="sales.order.history.extra.column.header" as="extra.column.header" label="Order History Extra Column Header"/>
                    <block class="Magento\Sales\Block\Order\History\Container"
                           name="sales.order.history.extra.container" as="extra.container">
                        <block class="Magento\Framework\View\Element\Template"
                            name="sales.order.history.extra.container.data" as="extra.container.data"/>
                    </block>
                </block>






    </referenceContainer>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.