shopp_product_term()

get a ProductTaxonomy object.

shopp_product_term ( $term, $taxonomy, $options )

@param int $term the term id
@param string $taxonomy (optional default:shopp_category) the taxonomy name
@param array $options (optional) loading options
@return bool|ProductTaxonomy returns false on error, ProductTaxonomy object on success

Description

get a ProductTaxonomy object.

Example

// register shopp_product_terms taxonomy
shopp_register_taxonomy('product_terms');

// Add a new shopp_product_term, "My Custom Term"
$termid = shopp_add_product_term('My Custom Term', 'shopp_product_terms');

// Add the term to product 131
shopp_product_add_terms ( 131, array($termid), 'shopp_product_term' );

// get the ProductTaxonomy object
$Term = shopp_product_term($termid, 'shopp_product_terms');

// set the ProductTaxonomy as the global Collection
ShoppCollection($Term);

See Also

You must be logged in to post a comment.

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

Skip to toolbar