Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
epicurean
epicurean
I'm wondering if there is a way to change the URL that users are redirected to after clicking the logout button. I've just redesigned our store so that now we are only using Viart as a cart, but not using the product/category pages, etc. And I don't want people to be directed to the old, obsolete store-front after logging out. Is there a way to change the URL that users are redirected to after logging out?
 
Ned
Ned
Hi Mitsy,
Its referenced in "templates/block_login.html" at line 55 as
a href="{user_home_href}"
HTH
 
mltsy (Guest)
mltsy (Guest)
But changing that won't change where they are automatically redirected to after logging out, will it? Actually, I don't think that's the right link anyway. They are redirected to the store home page, not the user account homepage. I need to be able to change the page they are taken to after clicking "logout."
 
Thanks for the suggestion!
 
mltsy (Guest)
mltsy (Guest)
Got the following response from support:
 
You could change the location to another page by changing just a row in block_user_home.php to
header("Location: " . get_custom_friendly_url("index.php"));
which would redirect to the home page, for example.
 
Regards,
Michael
Viart Support
-----------------------------------------------------------------------------
 
I actually ended up adding a header line to <viart>/index.php which solved my particular problem, since I don't want anybody ever going to the storefront page anymore, but for someone who just wants to change the logout URL, Michael's advice, put more clearly is:
 
The logout redirection is performed around line 12 of <viart>/blocks/block_user_home.php - which reads:
 
header("Location: " . get_custom_friendly_url("index.php"));
 
Change that URL to change where the user is redirected after logging out. For my case, I would have used:
 
header("Location: /index.php");
 
Tada! Thanks Viart! :)