Customisable Access Denied and Content Unavailable Pages
Visitors who reach content they cannot view see a customisable page within the storefront. Two pages cover the two cases: an Access Denied page for permission-restricted content, and a "This content is not available" page for unpublished products, categories or blog posts. Requests for pages that do not exist at all now correctly return a not-found response. Two of these pages have their own block in the Editable Content admin area, so you can reword them: "Access Permission Denied Page Content" and "404 Error Page Content".
Previously, a visitor without permission to view a category (with access permissions enabled) was shown a completely blank page with no explanation. Separately, visiting an unpublished product, category or blog post silently redirected the visitor to the homepage with no message. Neither case gave the visitor any useful feedback, and non-existent pages did not reliably return a proper not-found response for browsers or search engines.
Applies to all storefronts automatically. The Access Denied page is relevant to storefronts that use Access Permission Settings to restrict category or product visibility; the "This content is not available" page applies to any storefront that unpublishes products, categories or blog posts.
What has to be true for each page to appear
Access Denied page: Access Permission must be switched on for the storefront, AND your permission setup must refuse that particular visitor. A visitor is refused either because a rule denies them, or because "Default is Allowed" is off and no rule grants them access.
Access Denied page and guests: with "Deny Guest Accounts" on, visitors who are not signed in are refused too, so the Access Denied page is what an anonymous visitor sees on restricted content.
Access Denied page scope: it covers the storefront web pages for categories and products (including those reached through rules that target tags). API responses were deliberately left as they were and still return their own error shapes.
"This content is not available" page: no configuration, no permissions involvement. It is driven only by the Published tick box, and it shows for every visitor. This includes a signed-in customer with full access.
Not-found: an item that does not exist, because it was deleted or the link is wrong, returns a 404 instead. If you would rather a visitor saw "not available" than a 404, unpublish the item rather than deleting it.
Admin access: the Access Permission Settings page needs the "Manage settings" permission on your admin role. If you cannot see the page, ask Infigo Customer Support to enable that permission for the roles that need it.
Configuration
Go to Content Management > Editable Content and open the "1. General" group. Two blocks in that group hold the wording for the pages in this article, and both should be available already, filled in with default wording, so there is nothing to create: "Access Permission Denied Page Content", used when a visitor is refused access, and "404 Error Page Content", used when a link points at something that no longer exists. Both are visible in the list below.
Click Edit against whichever block you want to change, rewrite the message in your own words, then Save -- and repeat for the other block, as the two are edited one at a time from this same list. The change goes live on the storefront immediately, meaning there is no separate publish step. You may have to clear your cache to view the changes.
For certain elements of this setup, Access Permissions are required to be configured on your storefront. The Infigo Academy contains many resources on Access Permissions:
Sign in as (or impersonate) a customer whose role is granted access to the restricted item, and open it. Nothing has changed for them: they see the product exactly as before. Check this first, so that the refusal in the next step is proof your permission setup is working rather than a sign something is broken.
Now open the very same URL as a customer whose role is not granted access. They get the Access Denied page carrying your wording and a link back to the homepage, and it is returned as a 403 so browsers and search engines treat it correctly.
Categories behave identically. A refused visitor gets the same Access Denied page, so there is nothing extra to configure for them.
Untick Published on a product, category or blog post and anyone who opens its page now gets a short "This content is not available" message with a Home Page button, rather than being redirected to the homepage with no explanation. This is the one page here with no Editable Content block of its own: nothing to switch on and nothing to edit. It appears automatically, with its standard wording, for every visitor, as soon as the item is unpublished.
Unpublished and deleted are different cases and now behave differently. A link to a product or category that has been deleted, or never existed, returns a proper 404 not-found page. That is the correct answer for a browser and it stops search engines from continuing to index dead links -- so an old URL in a customer's bookmark or an email is no longer indistinguishable from a permissions problem. To reword this page, go back to Content Management > Editable Content > "1. General" and open the second block from Step 1, "404 Error Page Content".
Where to learn more
This article covers the two new pages. Setting up who is allowed to see what is a separate subject the Academy already covers in depth:
What are Access Permissions? -- https://academy.infigo.net/p/1378/what-are-access-permissions-bg_ap_001
access denied page, content not available page, unpublished product page, editable content access permission, storefront 404 page