0

In magento2 path

wowshop/app/design/frontend/MageBig/martfury/wowshop/GShop_Customer/layout/customer_account.xml

I have a code of this

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">

    <body>
        <referenceBlock name="sidebar.main.account_nav">
            <referenceBlock name="customer_account_navigation">
                <referenceBlock name="customer_account_navigation"><!--ifconfig="wishlist/general/active"-->
                    <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-logout-link">
                        <arguments>
                            <argument name="path" xsi:type="string">customer/account/logout</argument>
                            <argument name="label" xsi:type="string">Logout</argument>
                        </arguments>
                    </block>
                    
                </referenceBlock>
                <referenceBlock name="customer-account-navigation-account-link">
                    <arguments>
                        <argument name="label" xsi:type="string" translate="true">Account Information</argument>
                    </arguments>
                </referenceBlock>
                 <referenceBlock name="customer-account-navigation-orders-link">
                    <arguments>
                        <argument name="path" xsi:type="string">customer/order/history</argument>
                        <argument name="label" xsi:type="string" translate="true">Order History</argument>
                    </arguments>
                </referenceBlock>
                <referenceBlock name="customer_account_navigation">
                    <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-newpassword-change-link">
                        <arguments>
                            <argument name="path" xsi:type="string">wishlist</argument>
                            <argument name="label" xsi:type="string" translate="true">My Wishlist</argument>
                        </arguments>
                    </block>
                </referenceBlock>
                <referenceBlock name="customer-account-navigation-wish-list-link" >
                    <arguments>
                            <argument name="path" xsi:type="string">customer/preorder/history</argument>
                            <argument name="label" xsi:type="string" translate="true">Pre Order History</argument>
                    </arguments>
                </referenceBlock>
               <!--  <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-track-my-order-link" after="customer-account-navigation-wish-list-link" >
                    <arguments>
                        <argument name="path" xsi:type="string">order-tracking</argument>
                        <argument name="label" xsi:type="string" translate="true">Track My Order</argument>
                    </arguments>
                </block> -->
                 <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-my-voucher-link" >
                    <arguments>
                        <argument name="path" xsi:type="string">customer/customer/voucher</argument>
                        <argument name="label" xsi:type="string" translate="true">My Vouchers</argument>
                    </arguments>
                </block>
                <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-my-rewards-link" after="customer-account-navigation-track-my-order-link">
                    <arguments>
                        <argument name="path" xsi:type="string">customer/customer/wowcashback</argument>
                        <argument name="label" xsi:type="string" translate="true">WOW Rewards</argument>
                    </arguments>
                </block>
            </referenceBlock>
            <!-- <block class="Magento\Framework\View\Element\Template" name="recent_orders" template="Magento_Sales::reorder/sidebar.phtml"/> -->
            
        </referenceBlock>

        <referenceBlock name="sidebar.main">
            <block class="Magento\Sales\Block\Reorder\Sidebar" name="recent_orders" template="Magento_Sales::reorder/sidebar.phtml"/>
        </referenceBlock>

        <referenceBlock name="customer-account-navigation-my-voucher-link" remove="false"/>
        <referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-perks" remove="true"/>
        
        <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>
        <referenceBlock name="checkout.cart.giftcardaccount" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-my-subscriptions-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-my-saved-cards-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
    </body>
</page>

which produce this account navigation view

enter image description here

I am so confused as to how the view appear like this

I wanted to make a view that appear like this

  1. Account Information
  2. Order History
  3. Pre Order History
  4. My Wishlist
  5. My Vouchers
  6. WOW Rewards
  7. Logout

I don't know how do the My Invitations appear even though I didnt put any of that in code, I am able to hide it, but the big problem I am facing is the missing Wow Rewards menu which I really need, whenever I try to adjust something another problem appear, I figure I might be missing some understanding here

Really appreciate if anyone can provide a direct solution and explanation on how to change this part of the code

Thank you

2 Answers 2

0

Try this code

<referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="tutorial_custom_my_account">
                <arguments>
                    <argument name="path" xsi:type="string">tutorial/account/custom</argument>
                    <argument name="label" xsi:type="string">My custom</argument>
                    <argument name="sortOrder" xsi:type="number">150</argument>
                    <argument name="navigation" xsi:type="boolean">true</argument>
                </arguments>
            </block>
        </referenceBlock>

Or Create a file : app/code/Vendor/Module/view/frontend/layout/customer_account.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="tutorial_custom_my_account">
                <arguments>
                    <argument name="path" xsi:type="string">tutorial/account/custom</argument>
                    <argument name="label" xsi:type="string">My custom</argument>
                    <argument name="sortOrder" xsi:type="number">150</argument>
                    <argument name="navigation" xsi:type="boolean">true</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>
0
<referenceBlock name="customer-account-navigation-magento-invitation-link" remove="true"/>

and in module xml add Magento_Invitation as module dependency

Replace you customer_account.xml file with this

    <!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
      label="Customer My Account (All Pages)" design_abstraction="custom">
<body>
    <referenceBlock name="customer_account_navigation">
        <block class="Magento\Framework\View\Element\Html\Link\Current"
               name="customer-account-navigation-logout-link">
            <arguments>
                <argument name="path" xsi:type="string">customer/account/logout</argument>
                <argument name="label" xsi:type="string">Logout</argument>
            </arguments>
        </block>
        
        <block class="Magento\Customer\Block\Account\SortLinkInterface"
               name="customer-account-navigation-newpassword-change-link">
            <arguments>
                <argument name="path" xsi:type="string">wishlist</argument>
                <argument name="label" xsi:type="string" translate="true">My Wishlist</argument>
            </arguments>
        </block>

        <block class="Magento\Customer\Block\Account\SortLinkInterface"
               name="customer-account-navigation-my-voucher-link">
            <arguments>
                <argument name="path" xsi:type="string">customer/customer/voucher</argument>
                <argument name="label" xsi:type="string" translate="true">My Vouchers</argument>
            </arguments>
        </block>
        <block class="Magento\Customer\Block\Account\SortLinkInterface"
               name="customer-account-navigation-my-rewards-link"
               after="customer-account-navigation-track-my-order-link">
            <arguments>
                <argument name="path" xsi:type="string">customer/customer/wowcashback</argument>
                <argument name="label" xsi:type="string" translate="true">WOW Rewards</argument>
            </arguments>
        </block>
    </referenceBlock>

    <referenceBlock name="customer-account-navigation-account-link">
        <arguments>
            <argument name="label" xsi:type="string" translate="true">Account Information</argument>
        </arguments>
    </referenceBlock>

    <referenceBlock name="customer-account-navigation-orders-link">
        <arguments>
            <argument name="path" xsi:type="string">customer/order/history</argument>
            <argument name="label" xsi:type="string" translate="true">Order History</argument>
        </arguments>
    </referenceBlock>

    <referenceBlock name="customer-account-navigation-wish-list-link">
        <arguments>
            <argument name="path" xsi:type="string">customer/preorder/history</argument>
            <argument name="label" xsi:type="string" translate="true">Pre Order History</argument>
        </arguments>
    </referenceBlock>


    <referenceBlock name="sidebar.main">
        <block class="Magento\Sales\Block\Reorder\Sidebar" name="recent_orders"
               template="Magento_Sales::reorder/sidebar.phtml"/>
    </referenceBlock>

    <referenceBlock name="customer-account-navigation-my-voucher-link" remove="false"/>
    <referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>
    <referenceBlock name="customer-account-navigation-perks" remove="true"/>

    <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>
    <referenceBlock name="checkout.cart.giftcardaccount" remove="true"/>
    <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
    <referenceBlock name="customer-account-navigation-my-subscriptions-link" remove="true"/>
    <referenceBlock name="customer-account-navigation-my-saved-cards-link" remove="true"/>
    <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
    <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
    <!-- My Invitations -->
    <referenceBlock name="customer-account-navigation-magento-invitation-link" remove="true"/>
</body>

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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