0

How to redirect same page or Homepage instead of Customer dashboard?

Here is my code: Magento 2.1.1

<?php if( $isLoggedIn ) { ?>                                    
    <li class="first">
        <a id="quick_sigup_link" style="positon:relative;" href="<?php echo $this->getUrl('customer/account/'); ?>">
                <span>Hello. User</span>
                <span class="youraccount" style="margin-top:-25px;">My Account</span>
        </a>
    </li>
0
0

1- On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.

2- In the panel on the left, under Customers, choose Customer Configuration.

3-Expand the Login Options section.

4- Set Redirect Customer to Account Dashboard after Logging in to one of the following:

    Yes - The account dashboard appears when customers log in to their accounts.
    No - Customers can continue shopping after logging in to their accounts.

5- When complete, tap Save Config.

6- Click the Cache Management link in the yellow modal that shows up

7- Select the Configuration and Page Cache checkboxes.

    Configuration
    Page cache

8- Click Submit to refresh the two selected cache types.

2
  • I was trying this several times but it's not working. Now what I will do? – Shakib Rahman Jan 9 '17 at 6:00
  • It always worked for me, now I have no idea, either you can do it in the code or i promose you to open another tiquet for this. – PЯINCƏ Jan 9 '17 at 8:39

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