Pages only registered customers can see

I created a new page and selected “Registered” under User Groups in the Availability section so the page is only visible to customers who are signed in to their account.



When someone who is not registered or signed in to their account tries to visit the page, the cart redirects them to the generic 404 error page. How do I configure the cart so it directs them instead to a page that says something like “You can only view this page if you are signed in to your customer account”?

I would make the page public and then use smarty code inside of it to determine if the user is logged in or not. You can find that kind of code in some of the other template pages

Hi,

Thank you for the suggestion about how to handle this type of scenario. I didn't realize I could make a page public but still limit what it displayed to people who aren't logged in. That's definitely a better option than redirecting people to a separate notification page.



Could you give me any additional information about which template file has this kind of code in it, and/or what kind of code I should look for? I'm still very new to working with CS-Cart so I'm not sure exactly how to work with the templates, despite reading a bunch of the documentation already. The set-up and configuration process for the cart was simple, and changing the basic design aspects via the skins and blocks was easy enough to figure out, but the rest of the design process is a bit more complicated than the last shopping cart my company used.



Thanks in advance for any help. I appreciate it!

I believe this will check if the person is logged in or not:



{if !$auth.user_id}
Not logged in
{/if}

{if $auth.user_id}
Logged in
{/if}

This is another example someone at cscart has neglected to “join the dots”.

Yeah its a bit dodgy. I just dont get how directing an un-signed-in visitor to the 404 error message page, upon attempting to view a page for registered users only, could ever be a good idea. Its completely useless!

Whats needed perhaps, is for the visitor to be directed to the signin/register page, then to be redirected back, after signing in, to the page they first requested. A Setting in Admin perhaps where you can enter the page number to jump to for “registered only” unlogged in pages.



As a work-around on one site, I edited the exception.tpl file with a message “You may need to be logged in to view this page . .” with “sign-in” and “register” links. Also put a time-out to auto redirect to the home page after 10secs if the visitor does not click anything.

Its a good idea what you did, but it should be solved as you describe, from day one .



Take as example Joomla. Although its a fully open source software with all the bad stuff that comes with it, you have such small issues solved since the first version.



I think that cs-cart should have a kind of quality department apart from the beta and RC versions, inorder to constantly check and fix the little things.



Fotis

They do have this department… Its called the “Custom Development” Department. :?

Hmmm … I better be nice …

same situation here!!!

But I always put all the stuff on a clear installation and then use that as backup for a new store every time.



Offcourse not even thinking about updating.

Looking at other websites, regarding the Page-Not-Found exception. I think it would be even better to Adda page called “page-not-found.html” and have all 404 errors reload this page imediately . This way the Cart Menus, Headings and banners can be shown. The customer cam still navigate to wherever they like without having to click “Home” or Back"