Link Search Menu Expand Document

Price Promotions List Element

Overview


An example Price Promotions List
An example Price Promotions List

The Price Promotions List Element shows a list of price promotions from Spaaza, personalised to the authenticated user.

Using the Price Promotions Element

To include a Price Promotions Element on a webpage do the following:

  • Add the following script tags at the top of the page
<script type="module" src="https://elements.spaaza.com/elem/spaaza-environment.js"></script>
<script type="module" src="https://elements.spaaza.com/elem/spaaza-price-pronotions-list.js"></script>
  • Add the Environment tag to the contents of the page (below the script tags). Include the Price Promotions List within the Environment tag.
<spaaza-environment config="your_config_goes_here">
    <h3>This weeks deals for members</h3>
    <spaaza-price-promotions loading="2" includetags="webshop"></spaaza-price-promotions-list>
    <!-- other Spaaza Elements and HTML goes here  -->
</spaaza-environment>    

Element Properties

The following optional properties can be passed to the Price Promotions List.

Property Description
includetags (optional) Campaigns can have one or more tags. If included, price promotions with one or more matching tags will be show. A list of tags can be used in which case the tag names should be separated by commas (with no spaces), for example “autumn-promos,webshop”.
excludetags (optional) Price Promotion Campaigns can have one or more tags. If included, campaigns with the specified tags will be excluded. A list of tags can be used in which case the tag names should be separated by commas (with no spaces), for example “influencer,employee”.
loading (optional) By default a single price promotion list item is shown as loading while waiting for a response from the Spaaza API. More can be shown by specifying the required number. To show no loading campaigns set the value to 0.