shopp_product_addon_options()

get an associative array of the addon option groups and array of associated addon options for a product.

shopp_product_addon_options ( $product )

@param int $product (required) product id of the product to retrieve the addon options for
@return array of options, false on error or product without addon options

Description

Get an associative array of the addon option groups and array of associated addon options for a product

Example

// Get addon options menu for product 130
$options = shopp_product_addon_options ( 130 );

print_r($options);

// Outputs something like: 
// (depending on your product's addon group names and option names)
// Array
// (
//     [AddonGroup1] => Array
//         (
//             [0] => Addon Option 1
//             [1] => Addon Option 2
//         )
//     [AddonGroup2] => Array
//         (
//             [0] => Addon Option 1
//         )
// )

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar