Announcement

Collapse
No announcement yet.

Allow a product to be accessible only via a url?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Allow a product to be accessible only via a url?

    Is this possible?

    I want to make a product available to a small group of people via a url. I.e. I give them the url & they can then go straight to the product. The catch is I don't want a normal customer to see any indication of the product on the site.

    I don't want to create a special group for them as I don't want them to have to register.

    I'm not bothered about search engines finding it or people finding it through digging around.

    I read on another thread that hiding products might achieve this but this doesn't seem to work.

    Any ideas?

    Regards,
    Lance
    Lance

    www.brightkidz.co.uk

    "High visibility clothing and accessories for children and adults"

    #2
    One way. Use a customised product layout for that item that wraps the whole thing in
    Code:
    <div id="hiddenproduct" style="display:none; visibility:hidden">
    .
    Product layout here
    .
    </div>
    <script type="text/javascript">
    <!--
    if (location.href.indexOf('reveal') > -1)
      {
      document.getElementById('hiddenproduct').style.display = 'block';
      document.getElementById('hiddenproduct').style.visibility = 'visible';
      }
    // -->
    </script>
    The product is on the page but is invisible to the customer.

    However if you give customers an URL like www.mysite.com/acatalog/pagename.html?reveal the JavaScript will reveal the item.
    Last edited by NormanRouxel; 02-Sep-2008, 01:39 PM. Reason: Fixed typo in JavaScript.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks for your fast response Norman.

      That works a treat.

      Lance
      Lance

      www.brightkidz.co.uk

      "High visibility clothing and accessories for children and adults"

      Comment


        #4
        Glad to help.

        Were there any bugs in the code above that you had to correct (I just typed it in untested)?

        If so, let me know and I'll amend my post so others can benefit.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          No it works fine as it is.

          Although I wrapped the div around a custom section layout that held the product so that the section was hidden not the product. This meant I didn't need to put the ?reveal on the end.

          You can see it at www.brightkidz.co.uk/acatalog/WHWRfleece.html
          Lance

          www.brightkidz.co.uk

          "High visibility clothing and accessories for children and adults"

          Comment


            #6
            In fact, thinking about it I guess if I'm doing it like that I don't even need the script! Just hiding the section link will be enough. Even better!

            I've just tried it out without the javascript and it works fine.
            Lance

            www.brightkidz.co.uk

            "High visibility clothing and accessories for children and adults"

            Comment

            Working...
            X