shopp_rmv_category_image()

remove a category image by image asset id

shopp_rmv_category_image ( $image )

@param int $image image id to remove from product category.
@return bool false on failure, true on success.

Description

Remove a category image by image asset id.

Example

// set the global shopp category
ShoppCollection(shopp_product_category(5));

// remove all the category images for category 5
if ( shopp('collection', 'has-images') ) {
    while ( shopp('collection', 'images') ) {
        $image = shopp('collection', 'get-image', array('property'=>'id'));
        shopp_rmv_category_image ( $image );
    }
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar