Subscriptions - 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 PA+. If you are using PA+, follow the PA+ instructions to create protected directories, then see integrate AShop Deluxe with Password Administrator +, and then create a subscription within the product catalogue.
|
|
|
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.
|
|
2. | Create a blank text file and save it as ".htpasswd". Upload it to the top level of the subscription directory and 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.
|
|
|
|
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 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.
|
|
1. | From within the Administration Panel/Edit Catalogue, select an existing or create a new category where the subscription product is to appear within the store catalogue.
|
2. | Select New Subscription.
|
3. | Enter the product name, status, price, and description. If the status box is unchecked, the product will not appear in the shopping cart catalogue. 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.
|
3. | 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.
|
5. | Enter the length in days until each password expires. Set this to 0 (zero) for no expiration.
|
|
![]() |
|
Options
|
· | License Agreement - If the product requires a license agreement, click the License Agreement button and enter the license agreement text.
|
· | Picture File - To upload a thumbnail image, navigate to a gif or jpg image or leave this box blank. The thumbnail image size should first be set in Layout.
|
· | Set the default Affiliate Commission as a percentage of the product price or as a fixed currency amount.
|
|
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.
|
|
4. | Click "Submit" to save the product information.
|
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
|
|
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.
|