Setting up your site
This information will provide a basic explanation of the functionality that is required to distribute in2Era Products on your website. This section relates to the selling of Subscriptions and management of User access to in2Era Products.
Overview
Users must be able to login to their own account with a username and password. Once logged in, they should be able to purchase a Subscription to an online Product. This can be done in the same way as any other purchases. Once they have paid for their Products, the Subscription(s) they have chosen will be associated with their User account for the duration of the Subscription period (e.g. 1 year). When Users login, using their username and password, they are able to access the resources that they have subscribed to.
Example: www.in2era.com.au
The following is an outline of how Era provides access to customers on the in2Era website - in2era.com.au. This is intended as an example to illustrate how the required functionality might be implemented. Each website is different, though, and you may have much of this functionality setup already. The important thing is that the functionality detailed in the above 'overview' section is present, how this is implemented will be unique for everyone.
Data Models
In order to setup Era's website to sell and deliver online content to customers, Era has implemented the following models:

- User
- Subscription
- Product
- Item
These models have the following associations:
- User has many Subscriptions, and a Subscription belongs to a User
- Subscription has one Product, and a Product belongs to a Subscription
- Product has many Items, and an Item belongs to a Product
User
This is a normal User model, and is probably already implemented on your website. The User model holds all the data associated with a User, including a username and password to login. When the User purchases an online Product, a Subscription is created that links the User to the Product that they have purchased.
Subscription
A Subscription links a User to a Product. The Subscription model will hold information specific to the User and the Product, such as the expiration date. When the User logs in to the site, their Subscriptions are checked to see which Products they should have access to.
Products
A Product is the thing that a User will purchase a Subscription to. In most cases, a Product is like a series or category of Items. Most content supplied by the in2Era Web Service consists of Products that contain many Items. However, a Product may also only contain a single Item. When a Subscription is purchased, that user will gain access to all Items that are associated with that Product.
Item
An Item is a single piece of online content. Content might be an online book, game, or other activity. The Item is the final piece of content that a user will interact with.
Note: Some Items consist of a number of activities, such as a book with an accompanying quiz and drawing tool. These are all contained within the Item itself, and are not considered individual Items as they cannot be accessed separately.
Implementation
The in2Era Web Service API is used to retrieve the data for the Product and Item models. You may use it to get a list of:
- all the Products available,
- the Items each Product contains
- links to logos and cover images, and
- Item IDs, which are used to embed an Item into a template on your site.
You can read more about this in the Implementation section.