No announcement yet.

Can I bounce unregistered customers out of sections

  • Filter
  • Time
  • Show
Clear All
new posts

    Can I bounce unregistered customers out of sections

    If you wish to prevent unregistered customers from being able to view specific store pages, then you will need to include a simple JavaScript function into the overall page layout for those sections.

    1. Go into 'Layout' in the 'Section Details' of the section that you want to restrict to only registered customers.

    2. Locate the 'Overall Page Layout' field and make a mental note of the name of the current overall page layout.

    3. Click in the 'Overall Page Layout' field and select '<New>' from the bottom of the list.

    4. In the 'Based On' field, select the overall page layout that is currently being used by the section.

    5. In the 'Name' field enter 'Registered Customers Only'.

    6. Click 'OK' and then click 'Apply' to make this section use the new layout.

    7. Now change to the 'Design' tab and select the overall page layout.

    8. Locate the following command in the headers of the template:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    9. Just underneath this, copy and paste the following into the template:

    <meta http-equiv="Refresh" content="0; url=NoEntry.html">
    <script language="javascript1.1">
    function actNotRegistered(){
    location.replace ('NoEntry.html');

    Note: replace page.html with whatever page you want unregistered customers to be bounced to.

    10. Next, locate the <body> tag further down in the layout:

    <body onload="PreloadImages">

    11. Change the 'onload' part to read:

    <body onload="PreloadImages";actNotRegistered()">

    Whatever sections you don't want unregistered customers going into, specify this new layout in the 'Overall Page Layout' field. This should now automatically take customers back to the designated page if they try and go to a page in your store that you do not want them to.

    Naturally, you are going to want to have some explanation in the section description of the section to point out that certain sections are for trade customers only.