Friday 25th April 2014,

Extensions

Ξ Comments are off

AC File Payments

posted by steve

Please note that I no longer develop or support Joomla plugins. This post is here in case anyone is still interested in the plugins I developed a few years ago.
Scroll down a bit for the download url …

AC File Payments is a free Joomla! 1.5 extension that helps you to provide files to your users in a variety of secure ways.

Whether you are asking for payment or a donation via PayPal, or you require the user to register before they can download, you can restrict downloading until they have made the required action.

Once a user has paid/donated/registered they will then have access to the file(s).
You can even create an individual download page and add any other information or files they might require. Only users with authorised access will be able to download the files on offer.

Features:

  • Contains a Joomla! component for back end administration and creating download pages and a user download area
  • Contains a Joomla! content plugin for displaying your payment buttons in article content
  • Contains a Joomla! editor button plugin allowing you to easily insert payment button tags into article content
  • Contains a Joomla! Module for displaying your payment buttons anywhere else on your site
  • Uses PayPal for purchases/donations
  • Can be used to restrict file downloads to registered users only
  • Payment buttons are displayed dynamically allowing for site wide changes to be made from the component administration
  • Records the amount of ‘purchases’ and ‘downloads’ for each file
  • As with all our products, you are entitled to free future updates and an unlimited site license

Requirements:

  • An Internet Connection
  • Joomla! Content Management System Version 1.5.x

This software is GPL licensed, by downloading it, you are agreeing to these terms.

At present, AC File Payments can only grant paid access to file downloads. If you need a more powerful solution that will let you grant paid access to different areas of your Joomla site, such as specific articles or extensions, then I highly recommend using RSMembership!


Download here: com_acfilepayments_1.0.1_beta


Tutorial/Overview

Here’s a basic overview of how to use AC File Payments. More tutorials, and hopefully some visuals, coming soon …

Installation
You should have downloaded a single zip file. There is no need to unzip this, as it’s a package, just go to Extensions->Install/Uninstall and upload the zip.
The component, module and 2 x plugins will be installed automatically.

Upgrading
To upgrade from a previous version of AC File Payments you do not need to uninstall the previous version first, just install as normal and everything will be upgraded and your settings will all be kept.
If you require a new fresh install, however, then please uninstall the original version first.

Uninstalling
Please be aware that, by uninstalling the component, you will also automatically uninstall any AC File Payments modules and the plugins as well. We will provide more uninstall options in a later version, but at the moment it is not high priority.

Configuration
The first thing to do after installing, is go to the component back end – Components->AC File Payments.
AC File Payments uses PayPal for all payments so you must be signed up with them in order to use this extension. You must have a PayPal account that can accept website payments so make sure you have signed up to either a Premier or a Business account. Sign up to PayPal here.
It is strongly recommended that you also sign up for a PayPal sandbox account here: https://developer.paypal.com. The PayPal sandbox is a mirror image of the PayPal website used for testing without any real money changing hands.
Once you are all signed up, you need to click the ‘Configuration Settings’ button at the top right of the AC File Payments configuration page.
Here you need to enter the email addresses for your PayPal and PayPal Sandbox accounts, choose your default currency, and choose whether you want to use the Sandbox for testing.
Also, at various points your users may be redirected to a login or register page by AC File Payments, you can change the pages they’re redirected to using the login and register redirect link fields.

Add a File to Sell
Let’s get stuck right in and add a file for you to sell. Go to Manage Files and click ‘New’.
Give your file a title – make it meaningful as it is likely to be displayed at various points.
If you leave the alias blank, it will be filled in automatically based on the title. The alias is used in URL links.
Published enables or disables the file.
The File Name and Folder Name can not be entered manually, so you need to click the ‘Browse Files’ button to select the file that’s for sale. Here you can choose where you want your file to go on the server, allowing you to upload it if you haven’t already. It is advisable to place your file outside of the public folder for extra security. For instance, if the path to my Joomla site is ‘/home/sites/mysite.com/public_html/ ‘, I would go up one level, create a folder there and place my file(s) in this new folder. Once you have selected the correct file, make sure the name has appeared in the ‘File Name’ field and click ‘OK’.
The File Size will now also appear automatically.
Item created and Item modified can be displayed in the front end, so make sure they’re to your liking.
Purchases/Donations/Downloads – these keep track of how well your files are doing and can be reset any time. Add to downloads is useful if you have a new file and wish to exaggerate how many downloads have been made.
Link type is very important as it selects what type of payment button will be shown. Purchase and donate are obvious, register will force the user to register before downloading, and download will simply let your users download straight away.
The Inherit type will use settings from the file parent set below it. So, if the file parent has it’s link type set to ‘purchase’ then this will ‘inherit’ that setting and will also be a purchase button. The following data is inherited from the parent file: Button link type and display, all pricing information, user access, and the download page options (but not the download page itself).
Inheriting settings from a parent is useful for old versions of files that you still wish to make available to your clients, or file’s that are sold as part of a package.
We will talk about user access a bit more later, but it’s fairly obvious ….
Purchase button is where you select which button image you want to use. First select the type – Buy Now, or Pay Now for purchase types, and Donate for the donate type – and then select which style you want.

File Pricing
Still on the same page, you will notice that all these file options have been split into tabs. To set prices for your file click on the ‘File Pricing’ tab.
Listed are all the main supported PayPal currencies for you to choose from. Only one can be selected as a default, which at this stage is the currency you selected in the Configuration settings earlier. You can now change this default currency to whatever you wish for this file though. The default currency will always be displayed, but if you wish for other currencies to be displayed, you must enter a price and make sure the box is checked next to it in the ‘Display’ column.
If you are using the donate type, any price entered will become a minimum donation amount that your customer will have to match or exceed in order for them to download your file. If you want the user to enter any amount they wish, then leave the price column blank.

Once you are done setting prices click ‘Save’. You may have noticed one more tab (Download Page) which we haven’t covered yet, we will come to this later …

Add a file payment button to your article content
Now that you have set up a file to sell, let’s display it on your site.
Go to Content->Article Manager and create a new article or edit an existing one.
You will notice a button towards the bottom of the editor called AC File Payments Link, place the cursor where you’d like to place the file button and click on AC File Payments Link.  A popup window will display all the file items you have created, just click on the title to insert the relevant tag into your content.
Once inserted you will notice that a tag has been inserted, similar to {acfp id=1}. You could of course type this in manually if you know the id of your file item already. The content plugin will look for this tag and replace it with the relevant file payment button. If the file is unpublished or doesn’t exist, the tag will still be replaced but with nothing displayed at all. Once saved, have a look at your article from the front end site to see what’s happened.

Add a file payment button using the module
If you need to place a payment button elsewhere on your site, you can use the AC File Payments module.
Go to  Extensions->Module Manager and create a new AC File Payments module or use the one that was automatically created when installing the extension package (it should be located in the left position).
This time you can select the file item by using the select button in the module parameters. You can also use a Module Class Suffix and add text/html that will appear above or below the button.
Once you’ve selected the file item you wish to be displayed, set any other settings, and enable the module, you should see the correct file button displayed on your site.

Customize the buttons
Not happy with the way the button looks by default? No problem, you can change all that!
Go back to the site administration and select Components->AC File Payments->Default Templates.
This is where you can change the way various content is displayed on your site.
The first template is for the purchase button, so if you’re using that type for your file, then make the changes you need and hit save.
You can apply any HTML styles you wish so there’s no real limitation as to how you want your payment buttons to look. Dynamic elements in square brackets will be changed as they are displayed on the front end with the relevant content.
We will cover the templates in greater detail later, but for now you should be able to change the way your button looks fairly easily.
(note for JCE users: The ‘Add Dynamic Elements’ buttons may only work when in source mode)

Test Payment
Let’s do a quick test to make sure payment is working. For this you will need to make sure you have ‘Use Sandbox’ enabled in the configuration and have logged in to the PayPal sandbox.
Go to your main site and click on a payment button, you might also want to try selecting a different currency to make sure these are being displayed correctly.
If you’re not logged in, you will probably see a message telling you so and the login page will be displayed (the one that is set in the configuration).
If you were logged in, you will see a message saying that the payment is processing and you will shortly be redirected to PayPal, with a failsafe button in case the auto-redirection doesn’t work – this message can be changed in the default templates. Then you will see the PayPal page.
Make sure you’re using the sandbox and proceed with payment using your test buyer account.
Check your email accounts for the site admin and site user to make sure that the appropriate emails have been sent and check that you can actually download the file after payment ….. (see next section)

The Download Page
When you return from PayPal, you should be greeted by a Success! message (this is a requirement of PayPal terms), and the download page. The user should also have been sent an email, and granted access to download the file(s) (the email is customizable in the default templates section – more on that later).
This download page can be customized by going back to the Manage Files section in the administration back end and selecting the file you wish to edit.
Select ‘Download Page’ from the three tabs at the top.
Here you can add content and customize the download page any way you wish – dynamic elements can be added by using the buttons on the right.
There are 3 Yes/No options, with explanations for each, so I won’t go into that here.
You can also add other file links for ‘download only’ type files and any files that inherit the settings for this particular file ‘parent’. This is useful for providing previous versions or other files that the user might need access to after purchase.
If you mess up the page completely, you can start again by using the load default button – this will load the default download page that is set in the ‘Default Templates’ admin section. Alternatively, if you decide you want to use the page you’ve created for other files in the future can also ‘Save as Default’ – which will overwrite the existing default template. This saves having to copy what you’ve done and go back to the ‘Default Templates’ to edit the default.
Once you’re happy, click ‘Save’/'Apply’, go back to your site front end, and refresh the download page to see your changes.
Try clicking the download link and make sure the file can be downloaded.

Security note: The download page itself is not secure and can be accessed by anyone, so make sure that any file links you wish to keep secure are inserted dynamically by using the add file links section (or the link for the current file that is displayed by default). These file links are secure and will only allow users with access to download the corresponding file.

User Access
By purchasing the file, the user has been granted access to download it. This can be shown to the administrator in two ways.
First, go back to manage your file in the back end admin. You will see that the user who purchased the file has moved from the ‘Users without access’ column, to the ‘Users with access’ column. These two columns show you straight away who has access to download the file, and who doesn’t. If you wish to grant or remove access for any users you can do so by using the buttons below to move the user(s) from one column to the other. If you make changes to the user access, you must select ‘Yes’ to ‘Apply User Access’ before saving. This is a safety feature to minimize the risk of saving the wrong user access for someone who may have purchased a product while you’ve been editing this file item. There is still a risk of doing so, but the risk is greatly reduced if you can open the file item to edit, quickly make the user access change and hit save/apply straight away. In the unlikely event that your user can’t access the file they’ve just purchased, just apologize, blame it on someone else ;-) and grant them access as soon as possible (without blocking anyone else hopefully).

Manage Users
I mentioned two ways of managing user access, the second being the ‘User Manager’.
Go to  Components->AC File User->Manage Users and you will find a list of all your Joomla site users.
You will see straight away that your file title should appear in the column  ’File Access’ next to the user that you used to purchase the file. This indicates that they have access to download that file. If you click on the users name, or on the ‘Manage File Access’ link you will be taken to a page which lists all of the file items you have created. By highlighting the files in this list you can grant this user access to the file(s) that are highlighted. A highlighted file item means access granted, a non-highlighted file item means access denied (unless the file item has no restrictions placed on it).
The donations field will give a bit of information about how much the user has donated to any of your files. This feature will be improved upon in future releases of AC File Payments.

Adding a file download page menu item to your site
If you wish to make a particular file’s download page a menu link on your site you can do so.
Go to Menus->Main Menu (or whichever menu you wish) and click New.
Click AC File Payments and select the ‘Download Page Layout’.
Here you can choose which file’s download page you wish to display when the menu link is clicked by hitting the ‘select’ button as you have done previously.
You can also add text/html that will be displayed before and/or after the download page itself.
Once you’ve selected the file item you want, give the menu item a title, change any other settings you need, and click ‘Save’.
You will now have a menu link that will display the relevant download page when clicked. User access is still taken into account, so users without access to the file will not be able to download from this page, but they will still be able to see the download page content.

Adding a user download page menu item
It is also possible to give your users a list of the files they have access to.
Go to Menus->User Menu (or whichever menu you wish) and click New.
Click AC File Payments and select the ‘User Downloads Layout’.
This layout doesn’t need any special parameters setting as the page will be displayed based on who’s logged in, so give it a title, set the access level to ‘Registered’ if you wish, select any other settings, and click ‘Save’.
You will now have a menu link that will display the file items the logged in user can download, when clicked.

Back to Default Templates
I think we’ve covered most of what you will need to get stuck into using AC File Payments. One last thing though is the ‘Default Templates Manager’ which we have already looked at briefly.
Here you can change the look of various aspects of this extension by clicking through the tabs. Factory defaults can be loaded here and saved if you find that you’ve made a complete mess of things and want to start again. Everything is pretty self explanatory.

Comments are closed.

Categories