Using Other Assets as Items

Last Updated: 17 Dec 2015

Assets such as a Standard Page can be used as an e-commerce item on an Ecommerce Form. In order to define the price of these assets you need to create a Metadata Schema. Once you have created and applied this Metadata Schema, you can send this information to an Ecommerce FormPage via the variables and source strings configured in the Asset Purchase section of the Ecommerce Form ContentsDetails screen.

Setting Up the Metadata Schema

A Metadata Schema needs to be applied to the assets so that you can input the price information. The suggested list of fields that should be added to the Metadata Schema are as follows:

  • Price: enter the price of the item without the currency symbol. For example, 5.00 will price the item at $5.00. If this item is taxable, this price should include tax.
  • Taxable: if the item is taxable, enter a value into this field, for example YES. If the item is not taxable, leave this field blank.
  • Multiple: if multiples of an item can be purchased at once, enter a value into this field, for example YES. If the item does not allow multiple purchases, leave this field blank.

Tip: If you do not want your items to be taxable or have multiples, these fields can be omitted from the Metadata Schema.

These fields should be text fields. For more information on how to create a Metadata Schema, refer to the Metadata Schema manual.

Configuring the Asset Purchase Source Strings

The information entered into the Metadata Schema must be sent the e-commerce form using the source string options in the Asset Purchase section of the Ecommerce Form Contents Details screen. The Asset Purchase fields are shown in the figure below.

The Asset Listing Variables and Source Strings for an Ecommerce Form Page asset
Asset Listing Variables and Source Strings for an Ecommerce Form Page asset

For more information on these fields, refer to the Asset Purchase Variables section of the Ecommerce Form Page chapter in this manual.

Keyword Replacements for the Asset Purchase Variables

The keyword replacements that can be used in the Asset Purchase Variables section include the following:

  • : this will show the name of the asset and can be used in the Name Source field, provided you have given your asset the same name as its item.
  • %asset_metadata_<metadata_field_name>%: this will show the information entered into a metadata field where <metadata_field_name> is the name of that field. For example, if a metadata field is created titled Value with the price of the item, will be used in the Price Source.
Example of Setting Up the Source Strings

For the fields suggested in the Setting Up the Metadata Schema section of this chapter, the Asset Purchase source strings will be set out as follows:

  • Price Source: enter . This will send the information entered into the Price metadata field to the Ecommerce Form Page and evaluated to construct the price of the item.
  • Taxability Source: enter . This will send the information entered into the Taxable metadata field to the Ecommerce Form Page and evaluated to determine if the item includes tax.
  • Multiplicity Source: enter . This will send the information entered into the Multiple metadata field to the Ecommerce Form Page and evaluated to determine if multiples of an item can be purchased.
Linking Items to the Ecommerce Form Page

When creating an e-commerce system using an Ecommerce Form Page, item assets must be linked from the Asset Listing Page to the form using the variables specified in the Asset Purchase section of the Ecommerce Form Contents Details screen. In the following example, the Asset ID Request Variable is set to add_to_cart and the Asset Quantity Request Variable is set to add_quantity, as shown in the figure below.

Variables set in the Asset Purchase section of the Details screen
Variables set in the Asset Purchase section of the Ecommerce Form Contents Details screen

On the Default Bodycopy of the Asset Listing Page, listed items should be linked to the Ecommerce Form Page using the HTML structure shown in the figure below.

The HTML structure for linking item assets to an Ecommerce Form Page
The HTML structure for linking item assets to an Ecommerce Form Page

Take note of the following sections, underlined in yellow:

  • ./?a=<asset_id>: this will send the user to the page of the e-commerce form, where <asset_id> is the asset ID of the Ecommerce Form Page.
  • <asset_id_request_variable>=: this will add the Product to the e-commerce form, where <asset_id_request_variable> is the Asset ID Request Variable of the e-commerce form.
  • <asset_quantity_request_variable>=<quantity>: this will determine the number of items to add to the e-commerce form, where <asset_quantity_request_variable> is the Asset Quantity Request Variable of the e-commerce form and <quantity> is the number of items to add.

When this structure is applied to the above example, the link will appear as shown in the figure below.

The variables applied to the HTML structure
The variables applied to the HTML structure

The add_to_cart and add_quantity variables have been added to the link. The <asset_id> and <quantity> fields need to be replaced with the information determined upon the ecommerce setup. For example, if the asset ID of the Ecommerce Form Page was 100 and we want to sell our items in batches of ten, the link shown in the figure below will be used.

The completed HTML structure
The completed HTML structure

In the above example, the <asset_id> is 100, linking the item to the form, and the <quantity> is 10, adding ten of the selected item to the form.

Tip: The Asset Quantity Request Variable is not mandatory to include when linking an item to the Ecommerce Form Page. If no quantity is determined, items will be sold individually.


Previous Chapter Next Chapter

The Latest

Let Us Know What You Think

Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.

Contact Squiz for Demo

Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.