I am trying to set up a members only page however when I set the user group to the group I created the “guest” group is still selected no matter what.
Is this a bug or am I doing something wrong?
Chris
from my end this works, i´ve tested at the moment with an product. Have test it to one group access. And i´ve logged in with a customer at this group, it´s work fine, if i try to access without a member to this link, i get not page found error.
Also work!
Strange - I set this page to wholesale only and when I hit save the page comes back that it is open to guest and wholesale. See screenshot.
stupid question, but on your screenshot you have enabled the site for access with usergroup Wholesale & Guest!???
When I click save, Guest is not selected. However, after the page refreshes it is.
Anyone else have anything to add on this issue?
I can’t speak to the access privileges not saving (my suspicion is a cache issue), but I’ve got pages set to members-only and I wanted to share how I did it.
- Add a User Group called “Members”.
- Add any user to the group (for testing).
- Set a page (ex. “members-only.html”) to be accessible ONLY for the “Members” group.
- If you try to hit that page and you’re not logged in as a user who’s part of this group, you’ll see CS-Cart’s standard 404.
- If you ARE logged in as a user who’s part of this group, you should see this page.
----
Now, the tricky part. I wanted to add a “Members Only” link to be visible only after a user was logged in. I added the following code to a template, “/skins/basic/customer/top_quick_links.tpl”:
{* show Members Only link if user is in Group 3 *}
{if !empty($auth.usergroup_ids)}
{foreach from=$auth.usergroup_ids item="groups"}
{if $groups==3}
Members Only
{/if}
{/foreach}
{/if}
This may not be the most efficient way to do it, but it’s the first solution I came across that worked properly.