user_subscriptions

This article describes what the user_subscriptions function does, how it should be used, and when.

Introduction

The user_subscriptions function allows you to retrieved and display product subscriptions for the currently logged in user in Aurora Smarty templates.

How and where to call this function

📘

This feature can be used in any of the Aurora front-end members area templates.

Accepted Parameters

ParameterValuesDefaultDescriptionRequired?
assignStringNoneThe name of the variable to assign user subscription data to.Yes

Examples

A very simply application of this method has been included below to demonstrate this feature:

You are subscribed to the following products:
{user_subscriptions assign="subscriptions"}
{foreach from=$subscriptions item="subscription"}
{if $subscription.active == 1}
  <div class="subscription">
  {$subscription.product_name} ({$subscription.product_id}) 
  For {$subscription.duration} Months, 
  From {$subscription.start_date}, 
  Until {$subscription.expiry_date}
  </div>
{/if}
{/foreach}