shopp_product_add_categories()

add one or more shopp product categories to a product.

shopp_product_add_categories ( $product, $categories )

@param int $product (required) Product id to add the product categories to.
@param array $categories array of integer category term ids to add the product to.  Names are not unique.
@return bool true for success, false otherwise

Description

Add one or more shopp product categories to a product.

Example

// Add a new product category "Jackets"
$id = shopp_add_product_category ( 'Jackets', "Men's Jackets", 5 );

// Add new category to product 130
shopp_product_add_categories ( 130,  array($id))

See Also

You must be logged in to post a comment.

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

Skip to toolbar