_wpsc_ajax_get_cart

Returns the Cart Widget.

Description

_wpsc_ajax_get_cart( (constant) $die = true, (array) $cart_messages = array() ); 

Parameters (2)

0. $die — Optional. (constant) => true
Whether or not to return the output (for new JSON requests) or to die() on the old $output / action.
1. $cart_messages — Optional. (array) => array()
An array of cart messages to be optionally passed. Primarily passed via wpsc_add_to_cart().

Usage

  1. if ( !function_exists( '_wpsc_ajax_get_cart' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-ecommerce/wpsc-components/theme-engine-v1/helpers/ajax.php'; 
  3.  
  4. // Whether or not to return the output (for new JSON requests) or to die() on the old $output / action. 
  5. $die = true; 
  6.  
  7. // An array of cart messages to be optionally passed. Primarily passed via wpsc_add_to_cart(). 
  8. $cart_messages = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = _wpsc_ajax_get_cart($die, $cart_messages); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wpsc-components/theme-engine-v1/helpers/ajax.php