shopp_add_product_tag()

add a product tag term.

shopp_add_product_tag ( $tag )

@param string $tag (required) The tag term to add.
@return bool/int - The tag id, false on failure

Description

add a product tag term.

If the tag already exists, will return the id of that tag.

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