Skip to content

Instantly share code, notes, and snippets.

@stuartchaney
Last active April 16, 2024 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartchaney/2a6ef821e45b708df0a8448bbbb5fcd4 to your computer and use it in GitHub Desktop.
Save stuartchaney/2a6ef821e45b708df0a8448bbbb5fcd4 to your computer and use it in GitHub Desktop.
Variables available for Rivo Theme Extensions

How to use these variables

Our theme extensions are built using liquid and a very small javascript framework called Alpine.js.

Here is how to display variables anywhere on the html displayed.

  1. Pick any element
  2. Add x-data to the element
  3. Add x-text to display text
  4. Add x-html if your text has html included.

Example

You have <strong><span x-data x-text="$store.customer.pretty_points_tally"></span></strong> Points

Variables available

You have all of the window.Rivo variables available inside of the $store object.

$store.customer =>

Eg:

  • $store.customer.first_name
  • $store.customer.last_name
  • $store.customer.email
  • $store.customer.current_vip_tier_info

Others:

  • $store.loy_config
  • $store.translations
  • $store.icons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment