First, a quick note that I will be out of town for a week, so this will be the last blog entry for awhile, as I'll have lots of catch-up to do when I get back! So pardon the dust while I enjoy some time off.
So let's get to today's topic. This came up on a chat with a customer recently, and I thought it would make a good blog topic. The question was how to hide some content on a page, while still showing the full product information otherwise. For instance, you might want to show wholesale pricing details to your wholesale customers but hide that from regular customers. The Access Keys in CFWebstore have basic content control built in, but it hides the entire page from non-authorized users, which is not what is wanted.
So to accomplish this, a small amount of custom coding is needed. We still need to set up an access key, and assign it to the group we want to see our custom content. Make a note of the ID of the access key you create. Now, open up the page you wish to hide the content on. For instance, if we are adding this content to the detailed product page, we would edit the productdsp_product.cfm page. Find the spot on the page where you want to add your hidden content and add code in this format:
requiredpermission="3" >
--- For Wholesalers View Only ---
You will need to modify this for the ID of the access key that you want to use and of course change the included code for whatever it is you want to insert into the page, whether it's static text, or a cfinclude to some other dynamic code (for instance, an additional field you add to the table with the specific info for each product.)