retrieves a Shopp product object by id.

shopp_product ( $product, $load_by )

@param int $product (required) the product id to load
@param string $load_by (optional) Default is 'id'. The product property to load against.
@return Product a product object, false on failure


Retrieves a Shopp product object.


// Retrieve product object with id 147
$Product = shopp_product( 147 );

// Retrieve product object with the slug: code-is-poetry
$Product = shopp_product( 'code-is-poetry', 'slug' );

// Retrieve product object with the name: Code is Poetry
$Product = shopp_product( 'Code is Poetry', 'name' );

See Also

You must be logged in to post a comment.

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