Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

{jr_calendar} Index {jr_chart}

{jr_cart}


The {jr_cart} template function is used for embedding the contents or count of a user's Vault Shopping cart into a Jamroom template.

Parameters:

Name Type Required Default Description
user_id integer no viewing user_id The "user_id" parameter tells Jamroom the user_id to show the Vault cart items for.
mode string yes n/a

The "mode" option tells Jamroom the type of data you want returned from the function.  Valid "mode" values are:

"count" - if the mode is set to "count", then the number of items in the user's cart is returned.

"display" - if the mode is set to "display", then the template is used for displaying the contents of the cart to the user.

template string yes* n/a The "template" parameter defines the Jamroom skin template that will be used to format the output cart details.  Note that the template parameter is required for the "display" mode.
assign string no no The "assign" parameter is an optional parameter that allows you to take the processed output and store it in a template variable for further processing.  This is handy to check to ensure the results of the function contains valid data.

 

Example:

Example embedding the {jr_cart} template function into a Skin Template:

{jr_cart template="cart_display.tpl"}

The contents of the "cart_display.tpl" Skin Template file:

{foreach from=$_CART item="_cart"}
{$_cart.VAULT_ID} - {$_cart.VAULT_NAME}
{/foreach}

 For a full listing of available variables within the {jr_cart} template file, place the following code in your template file:

{debug output=html"}

Then call your template - this will dump all available variables to your screen.

 The {jr_cart} function first became available in the Jamroom Payment Pack 3.0.29


{jr_calendar} page 103 of 171 {jr_chart}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network