wpsc_add_to_cart_form

Echo the HTML output for the Add to cart form.

Description

wpsc_add_to_cart_form( (null) $id = null ); 

Parameters (1)

0. $id — Optional. (null) => null
Product ID. Defaults to the current product in the loop

Usage

  1. if ( !function_exists( 'wpsc_add_to_cart_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-ecommerce/wpsc-components/theme-engine-v2/helpers/template-tags/form.php'; 
  3.  
  4. // Optional. Product ID. Defaults to the current product in the loop 
  5. $id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpsc_add_to_cart_form($id); 
  9.  

Defined (1)

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

/wpsc-components/theme-engine-v2/helpers/template-tags/form.php