Subscription Products - Password Access to Protected Directories
Previous  Top  Next


ASubscribe provides a method to sell password-protected access to specific folders (directories).

The first few instructions are for creating subscription directories without Password Robot. If you are using Password Robot, follow the Password Robot instructions to create protected directories, then see integrate AShop Deluxe with Password Robot, and then create a subscription within the product catalog.

To add a subscription without Password Robot
, you must first create a subdirectory to hold the protected content. The directory must be below AShop on the server directory tree and it must be protected using a .htaccess and .htpasswd file inside the protected directory.

1.Create a directory below AShop on the server directory tree so that the protected folder is at the same directory as catalogue.php. Name it whatever you want to.  

a.Change permissions for this directory to 777.  

clip0085
2.Create a blank text file and save it as ".htpasswd".  

a.Upload it to the top level of the subscription directory.  

b.Change permissions for this file to 777.  

Note: AShop will write the e-mail address and encrypted passwords to the .htpasswd file for authorized access to this directory.

Note: Depending on your FTP client software and server settings, the .ht files may not appear in the FTP browser on the server side. In this case, to view or edit the file use your web host's file utility program. OR Rename the files without the leading dot and upload them, change the permissions to 777, then rename them with the dot in front.

3.Create a text file, and insert the following text:  

AuthUserFILE /usr/home/username/ashop/protected/.htpasswd  
AuthGroupFILE /dev/null  
AuthNAME "Text that is shown in the login dialog box"  
AuthTYPE Basic  
AuthAuthoritative On  
 
require valid-user  
<limit GET POST PUT>  
order 'allow,deny'  
allow from all  
</limit>  

a.Set the AuthUserFILE to the protected directory path and change the AuthNAME to the text that will display on the login page.  

Hint: View the Secure File System Path in the Admin Panel under Shop Parameters then Advanced Options and add the protected directory name then the file name ".htpasswd".  
Example: /home/httpd/vhosts/username/httpdocs/ashop/protected/.htpasswd  

b.Save the file as ".htaccess".  
   
c.Upload it to the top level of the protected directory.  
   
d.Change permissions for this file to 777.  


Create A Subscription In The Product Catalog

1.From within the Administration Panel/Edit Catalog, select an existing or create a new category where the subscription product is to appear within the store catalog.  

2.Select New Subscription.  

clip0086

3.Enter the product name, status, price, and description. If the status box is unchecked, the product will not appear in the shopping cart catalog. HTML may be used in the description box to include larger images or link to product detail pages.  

4.Enter the name of the protected directory.  

5.Enter the URL to the protected directory. If this setting is available it is always used to create the link to the protected directory in the customer receipt.  

6.Enter the length in days until each password expires. Set this to 0 (zero) for no expiration.  

clip0087
Other Options  
·License Agreement - If the product requires a license agreement, click the License Agreement button and enter the license agreement text.  
·Affiliate Commission Level - Set the default Affiliate Commission as a percentage of the product price or as a fixed currency amount.  
·Taxable - Select whether the product is taxable or not.  

Third Party Software Integration  
AShop will optionally integrate with several popular PHP applications such as mailing list, bulletin board, and password management programs. If the third party application is installed within the same server account and the path is set within the admin/config.inc.php, a drop-down selection box will appear on the add product or edit product pages. Select the group that this product is to be associated with.  
See Installation of AShop - Third Party Software Integration.  

7.   Click the Submit button to save the product information.


Customers May Recover Forgotten Passwords
If a customer, who has purchased a subscription product, cannot remember their password, they can retrieve it. If they call sendsubscrpass.php from their browser they will be prompted for the directory that they have subscription access to and their email address. An email will be sent to your customer with their password.

example: http://www.yourdomain.com/ashop/sendsubscrpass.php

clip0088

Deactivating Expired Subscriptions (without Password Robot)
1.The checksubscr.php script deactivates expired subscriptions. You can run this script manually through a browser or setup a Cron job in the server control panel to run this script on a regular basis. Your hosting company must provide a method to create Cron jobs or you must have root access to the server to set up a Cron job. More Info...  

2.Change the $ashoppath at the top of the checksubscr.php script to the correct path to AShop Deluxe if the script is placed outside of the AShop root, for instance outside the document root to avoid making it publicly accessible.  

3.Change permissions to chmod 755.  

The subscription product will be labeled "Instant Access
" in the store catalog product listing.

Links to the purchased subscription directories, user names, and passwords will be included in the e-mailed store receipts that are sent to customers.

Discount Coupon Codes may be created for subscription products.