shopp('cartitem.coverimage')

Displays the default image, known as the cover image for the product.

The cover image is the image that is set as the first image when using a custom image order, or which ever image is automatically sorted to be first when using other image order settings set in the Presentation Settings screen.

Options

  • alt: The alt property of the image
  • bg: The background color to use with the matte fit (#rrggbb, default is #ffffff)
  • class: Specifies the CSS class of the image
  • fit: The fit of unproportional images to the requested size (defaults to all) :

    • width — Scale the image down to fit the image in the new size by the width, cropping any extra height
    • height — Scale the image down to fit the image in the new size by the height, cropping any extra width
    • crop — Scale the image down to fit by the smallest dimension to fill the entire image, cropping the extra off the other dimension (specific cropping adjustments can be made in the product editor)
    • matte — Scale the image down to fit within the new size filling extra space with a background color
    • all — Scale the image down to fit within the new size (the final size may differ from the specified dimensions)
  • height: The maximum height of the image in pixels
  • quality: The JPEG image quality (0-100%, default is 80)
  • sharpen: Apply an unsharp mask to the image (100%-500%, default is none)
  • size: The size to use for width and height of the image (used in place of width and height)
  • title: The title property of the image
  • width: The maximum width of the image in pixels

Universal Options

All Theme API calls have these options.

  • return: when set to true, 1, or on, this option forces the tag to return the value instead of displaying/echoing the value to the page. Alternatively, prefix the tag parameter with get to get the same effect. All theme api tags that return a boolean value will return by default.
  • echo: when set to false, 0, or off, this option forces the tag to display the value to the page. This is the default for all non-boolean tags.
  • is: when set to true, 1, or on, this option will evaluate the return of the theme api call as a boolean true or false value. See how values are converted to boolean.

Examples

<?php shopp('cartitem','coverimage'); ?>

Display a 32×32 pixel image

<?php shopp('cartitem','coverimage','size=32'); ?>

See Also

You must be logged in to post a comment.

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

Skip to toolbar