shopp_product_add_tags()

add shopp product tags to a product.

shopp_product_add_tags ( $product, $tags )

@param int $product (required) Product id to add the product tags to.
@param array $tags array of tags or tag ids to add to the product
@return bool true for success, false otherwise

Description

Add shopp product tags to a product

Example

// Create a new tag called "Waterproof", and get id
$tag_id = shopp_add_product_tag ( 'Waterproof' );

// Create a new tag called "Fashionable"
shopp_add_product_tag ( 'Fashionable' );

// Add the tags to product 130, by tag id or by tag name
shopp_product_add_tags(130, array($tag_id, 'Fashionable'));

See Also

You must be logged in to post a comment.

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

Skip to toolbar