shopp('product.in-category')

Used to test whether the product exists in a specified category.

Options

  • id: Specify the category to compare against by the category’s ID.
  • slug: Specify the category to test by the category’s slug.
  • name: Use the category’s name to specify the category to test against.

Examples

<?php if(shopp('product','in-category','id=3')) { … } ?>
<?php if(shopp('product','in-category','id=3')): ?>
    …content to show if the product is in category 3…
<?php endif; ?>

See Also

You must be logged in to post a comment.

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

Skip to toolbar