Price agreements and subscriptions

Infradox version 31.2 supports pricing agreements that you can link to user accounts. This function can also be used for subscriptions.

Article status: Draft

Recommended reading

Introduction

Infradox lets you create any number of pricing agreements which you can then link to user and/or organisation accounts. Multiple agreements can be linked to accounts. You can use the pricing agreements just for your own information (pricing agreements will appear on order pages in backoffice), but you can also make price agreements available on the client facing pages. I.e. if there are pricing agreements that a user can apply when ordering a file, these will appear on preview pages and the cart page. Users will however still be able to order files without making use of any of the agreements available to them (unless you don’t want this). Pricing agreements can be configured to limit what an agreement can be used for, e.g. you can exclude certain suppliers, you can make an agreement valid for a certain period only, for images only, for royalty free only, for files of a fixed size only and so on. And you can also limit the number of downloads – either indefinitely or in a month. This way you can configure agreements to be used for subscriptions.

Creating and editing price agreements

To view and edit pricing agreements, go to User management and click on the Pricing agreements button in the toolbar. This will open a dialog showing all the previously created agreements. To add a new agreement, click Add agreement at the top. The properties dialog as in the screen shot below will display.

The first tabsheet has the following properties:
Can be assigned
If this setting is enabled, the agreement can be linked to user and organisation accounts.
Enable on website
If you create an agreement for use by staff members only, then leave this unchecked. To make it available to users on the client facing pages, check this setting.
Title
Enter a short title that makes clear what this agreement entails.
Description
Enter a complete description of what the agreement entails. On client facing pages only the title appears and when the user hovers over the help icon, the full description appears. If the agreement is limited (see below) to certain types of content or suppliers, then make this clear in the description.
Media
Select the content types/media for which the agreement can be used.
Rights
You can limit the agreement so that it can be used for Rights managed or Royalty free files only.
Type
You can limit the agreement so that it can be used for Editorial or Commercial files only.
Maximum files, and Periodicity
Agreements can be configured to be used for a maximum number of files only. Either indefinitely or within a month. Note that when you link an agreement to an account, you can specify the start and end date. So if you are creating an agreement for e.g. a subscription that lets a user download 50 files per month for a year, then enter 50 in the maximum files input box and select per month in the dropdown box next to it.
Fixed size
Enter 0 to leave the normal download function unchanged (i.e. the user can choose a file size on the download page) or enter a number of pixels for a fixed file size. The file will always be the specified size regardless of the pixel sizes etc that you have configured via File collections.
Fixed size label
If the agreement is configured for a fixed size (above) then the normal file information (configured via File collections) won’t display, the text that you enter will display instead. Note that his option can be used with Images only.
Discount
If you are configuring an agreement for staff member use only (i.e. users won’t see it or be able to select it) then you can configure a discount percentage.
File price
Enter a price in your own currency. These prices will be visible to the user if the setting Hide prices (at the bottom of the dialog) is not checked. If the agreement is available to end users then prices should be made visible – unless the agreement is used for a pre paid subscription.
Disable user’s discount
With this setting checked, the normal discount that may have been configured on the user’s account will not be applied on orders that have one or more files with this agreement applied.
Disable coupons
With this setting checked the user won’t be able to apply a coupon code (for extra discount) to orders that have one or more files with this agreement.
Hide prices
If you don’t want to show the price on the client facing pages, then check this setting. This can be used if the agreement is created for a subscription.
Hide total price
With this setting checked, the total price will not show at the bottom of the cart page. Again, this is for agreements that are created for subscriptions.
Enable download permissions
Check this setting if the user is allowed to download the files immediately – even if his/her account does not have immediate download permissions.

Note that an agreement will not appear on the client facing pages unless it can be applied to a file. I.e. the properties that you configure determine whether an agreement can be used for a certain file or not. So for example, agreements for RF files only can not be used for RM files.

Suppliers

You can limit agreements to files that are not from certain suppliers, or that are from specific suppliers only. And the same is true for supplier groups. Click on the Suppliers tab and enter part of a supplier name in the input box and press enter. A list of matching names will appear in the list. You can click on the names to add them to the box. When you’re done adding the suppliers, click close to hide the list. You’ll finally need to select either the “Excluded” or “Included” radio button. If Included is selected, then the agreement can be used for files from the specified suppliers only. If Excluded is selected, then the agreement can be used for all files except the files from the files of the selected suppliers.
You can also include or exclude entire supplier groups. This works the same as described above.

Linking agreements to accounts

You can link agreements to both user accounts and organisation accounts. The agreements available to a user are the agreements linked to his/her organisation and those linked to the user’s account. Find the user account (or organisation account) and open its properties. Click on the Prices tab. All the agreements that you have created are listed in the box on the right. The box on the left shows the agreements that are linked to the account (see below screen shot). To link an agreement, drag it from the box on the right to the box on the left. To remove it drag it from the left to the right. If you have created many agreements you can type a few letters in the Filter input box. This will help you find the agreement that you’re looking for (agreements that do not have what you entered in the title are hidden).
The agreements that are in the box on the left show an edit link. Click this link to change the start and end date. Without an end date the agreement can be used indefinitely.

Management pages

  • The User management overview page has a new filter that lets you list user accounts with one or more pricing agreements only.
  • There’s an orange indication in the user overview for accounts that have agreements.
  • The Order management overview page clearly indicates that there are files to which price agreements are applied.
  • The admin Order page shows how many agreements the user has. You can click on the button to show the agreement details.
  • The admin Order page shows the applied agreement for each order detail
  • Administrators/Staff members can apply pricing agreements to a user’s order details

Technical implementation

The following paragraphs are about technical implementation of the price agreements functionality if you want to make price agreements available on the client facing pages (you can also use price agreements for your own information only).
The required templates, Javascript and CSS for use on the client facing pages must be added to the code editor. We have taken this approach to allow for maximum flexibility. I.e. to let us/you change how the process works depending on your specific requirements. You’ll find examples in the code editor that you can use, but we are of course available to take care of all of this for you.

Backoffice settings

Once the technical implementation (read below) is completed, there are a few settings that you need to change in Backoffice:

  • Go to Site configuration > Preview pages > Buttons – and tick the setting Hide Quote, Pricing and Download buttons if there are pricing agreements.
  • Go to Site configuration > Cart page > Cart page settings – and enable the price agreements.

Furthermore there are some optional changes that you may want to make:

  • To list the user’s price agreements on his/her account page, go to Site configuration, Website forms and open the section My account form. At the bottom of this section, check the Price agreements setting. Scroll down and click Save. Users can now see their price agreements and how many files they have ordered. If a price agreement limits the number of files one can download, it will also show how many files can still be ordered.
  • Note that an overview of the user’s agreements are also visible on the cart page. There’s a button for it at the top of the cart page.

Templates, script and CSS for price agreements

The following templates must be added in the code editor:

  • Preview > Price agreements outer (170) – the HTML that will contain the details (below)
  • Preview > Price agreements inner (171) – the HTML that is repeated for every available agreement within the outer HTML
  • Cart page > Price agreements outer (180) – the HTML that will contain the details (below)
  • Cart page > Price agreements inner (181) – the HTML that is repeated for every available agreement within the outer HTML

You can find ready to use examples for each of the above templates in the code editor.

CSS

In the code editor you’ll find the CSS necessary for this example, the file is called price-agreements-radios.txt. Copy the CSS and paste it into the code editor. It looks like this:

Javascript

To let the user add a file to the cart from the preview pages with a selected pricing agreement, you will need to add the beforepreview method to the client object, or if it already exists then you’ll just have to add the script to it. Below is the example script that you can find in the code editor examples . It lets the user select a pricing agreement or other use (in case the user doesn’t want to apply one of the available agreements), and to add a file to the cart with that selection applied. The name of the file with the code for our example is before-preview-method-priceagreements-radio.txt.