Print Page | Close Window

Force Log-in to view Content Pages

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=685
Printed Date: 22-April-2025 at 4:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Force Log-in to view Content Pages
Posted By: GTiFreak
Subject: Force Log-in to view Content Pages
Date Posted: 01-March-2007 at 1:30pm
I have a bunch of articles that I want to put up on my site as content pages,
but I want to have people log in or register to view the articles. Anyone have
any insight on this?



Replies:
Posted By: netprofits
Date Posted: 01-March-2007 at 2:05pm

There are probably several solutions but here is one...

If you feel comfortable modifying the header.asp, which by default shows all of your active content pages, change it so it just displays the specific pages you want. Easiest would be to create the links manually.

Then create all of your other content pages. Create one content page that has links to all of the other content pages for your login area. Then modify custpref.asp and where it displays the other account links, add a new link to your single content page that links to all of your other restricted content pages.

Please note, this does not keep search engines from potentially indexing those pages but it will keep visitors from finding those content pages from your site.

Another solution would be to use a specific naming convention for your content page title, i.e. put *** as the first three characters of the name, and then in viewcontent.asp do a check on for the page title to see if it is a restricted page. If so, then check if the customer is logged in and if they aren't display an error message. Otherwise display the page content.



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: plezaic
Date Posted: 12-December-2007 at 11:16am

In case someone else is still looking for solution for this.

Modify beginning of viewcontent.asp to look like this:


<% response.Buffer=true %>
<!--#include file="CustLIv.asp"-->
<!--#include file="../includes/settings.asp"-->

Create your content pages through Store admin area. Then you just have to decide where you want to put links to those paes. Login will be required. 

Links to content pages will look like this: http://www.domainname.com/cart/pc/viewContent.asp?idpage=1 - http://www.domainname.com/cart/pc/viewContent.asp?idpage=1

You can see them from Preview link under Manage content pages.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net