shopp('purchase.item-input')

Used in the ‘inputs’ loop to show an individual purchased item input.

With no options specified, this tag displays the value of the input.

Options

  • name: Displays the name of the purchased item input.
  • return: Set to 1 or true to store in a PHP variable.

Examples

<?php shopp('purchase','item-input'); ?>

Display the list of purchased item inputs

This example generates a listing identical to the output created by shopp(‘purchase’,’item-inputs-list’) and provides a base of reference for creating custom markup listings.

<?php if(shopp('purchase','item-hasinputs')): ?>
    <ul>
    <?php while(shopp('purchase','item-inputs')): ?>
        <li><?php shopp('purchase','item-input','name'); ?>: <?php shopp('purchase','item-input'); ?></li>
    <?php endwhile; ?>
    </ul>
<?php endif; ?>
shopp('purchase', 'item-input', 'options')

@param string $object the object or object.tag combination, if object.tag is used, the tag parameter can be omitted
@param string $tag the tag, can be hyphenated or not. Prefix with 'get' as shorthand for the return=true option
@param mixed $options associative array, or url-style name=value pairs separated by ampersands (&). Each pair is passed to the theme api tag as an option.
@returns void by default, returns value when 'return=true' option is used.

See Also

You must be logged in to post a comment.

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

Skip to toolbar