Template Tags for the Store Front Plugin

The following reference details the template tags provided by this plugin.

Accessing a Product's Meta Data

All of a product's properties, its price, etc, can be accessed through template tags available to all Movable Type users. The template tag to use is the <$mt:AssetProperty$> tag. For example:

<$mt:AssetProperty property="PROPERTY_NAME"$>

Here is a list of all of a product's property names:

  • sku_id (string)
  • inventory_type (integer)
  • inventory (integer)
  • payment_type (integer)
  • status (string)

Shipping Properties

  • requires_shipping (integer)
  • weight (float)
  • weight_unit (string)
  • shipping_cost (float)

One Time Purchase Options

  • list_price (float)
  • sale_price (float)
  • tax_rate (float)
  • limit_per_order (integer)

Subscription Options

  • offer_trial (integer)
  • trial_price (float)
  • trial_duration (integer)
  • trial_duration_units (string)
  • duration (integer)
  • duration_units (string)
  • recur (integer)
  • recurrence_count (integer)

The product's name and description can be displayed using the following tags respectively:

  • <$mt:AssetLabel$>
  • <$mt:AssetDescription$>

Function Tags

The following template tags are provided to you by the Store Front plugin:

<$mt:PayPalButton$>

Arguments

  • encrypt (boolean) - When set to true, the button generated will be encrypted to help prevent fraud. This is the recommended setting for production usage. In development however, it will be useful to leave this as false so that you can manually inspect the properties of the button. Default: false.

  • require_login (boolean) - When set to true, a link to an internal app page will be generated through which a user will be required to first login. The resulting button that is generated (and submitted automatically by the plugin) will be encoded with the authenticated user's user id so that the purchase can be correlated to their account. When false, this will result in the tag outputting the raw purchase button and no user information will correlated to the purchase. Default: false.

  • auto_submit (boolean) - When this is set to true, the submit button for the form generated will be suppressed, allowing for an invisible button to be generated and submitted automatically. This is used primarily internally by the plugin. Default: false.

Block Tags

<mt:DoesUserHaveActiveSubscription>

Maybe: <mt:UserIsAuthorized>??

<mt:HasUserPurchased>

Maybe: <mt:ProductIfPurchased>??

<mt:IsProductOnSale>

Maybe: <mt:ProductHasDiscount>??

Blog

July 25, 2011 2:13 PM

Google Sitemaps of all shapes and sizes

Recently a number of people in the Movable Type community asked questions relating to Google Sitemaps. Endevver was quick to respond and assembled a number of tutorials in our support knowledge base to address the questions they had and share...

Read More ยป

Endevver Consulting