Get and set the global Product object

ShoppProduct( $Object );

@param Product $Object (optional) The product object to set to the global context.

@return mixed If the global Product context isn't set, bool false will be returned, otherwise the global Product object will be returned


This function provides access to Shopp’s global Product object used to render Theme API calls against.


// Get the current global Shopp Product object in a local variable
$Product = ShoppProduct();

// Set the global Shopp Product to a new Product object
ShoppProduct( shopp_product(99) );

See Also

You must be logged in to post a comment.

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