How to restrict a category by login only
Hello,
I want to restrict a category which will display after registrations and logged in.How to achieve that? The flow will be in this way 1)The customer comes in the site 2)when he is trying to access that category he will ask for registrations 3)After registrations happens he will be logged in 4)after login he can able to see that category How to achieve that? Thanks. |
Re: How to restrict a category by login only
This is just psuedo code, you should find and test for the actual variables to use:
Code:
{if $cat.categoryid eq 12} |
Re: How to restrict a category by login only
Quote:
|
Re: How to restrict a category by login only
Xtech,
What you are asking can be custom coded of course. I have provided you with an example of how to achieve what you want, it is up to you and your development team to implement it properly. If you want to hire my team we will build this solution for you. Should only take a few hours to implement it properly. |
Re: How to restrict a category by login only
It's increasingly complicated due to the way x-cart handles registrations and logins. You have to pass variables through the login and registration process to identify the success redirect as well.
|
Re: How to restrict a category by login only
Quote:
Working like a charm.But one issue after login and register how to redirect to that current category page not on home page or cart page? How to achieve this? Thanks. |
Re: How to restrict a category by login only
Look in include/login.php I would pass a variable in the URL, from your login link. Like login.php?cat_return=1.
Then test for this in the PHP file, and if found assign a variable to smarty. Then include a hidden input field in the login form, and populate it with 0 or 1 depending on whether this return value is set. Then on form submission and successful login, assign the $redirect_url to your special origin point if that hidden input field is populated. |
All times are GMT -8. The time now is 01:14 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.