If there are multiple prices (because of product variations) then a price range is displayed showing the lowest – highest prices. Additionally, if the country of the store’s base of operations uses VAT-style taxes, Shopp will automatically include the applicable tax rate to the price. This behavior can be overriden with the taxes option.
- taxes: Default behavior depends on the inclusive taxes setting. When set to true, includes the tax in the price(s) shown. When set to false, excludes tax from the price(s) displayed. For inclusive taxes, setting to false will remove the included tax from the price (for example, when excluding VAT). When inclusive taxes is disabled (as is the case for most sale tax countries like in the US), setting to true will add the tax to the price.
- starting: Default is (empty). Displays the smallest price of a price range with the value of this option as the label (e.g. **starting=Starting at **: Starting at $5.99)
- separator: Default is —. The separator between low- and high-price ranges created by variant prices.
- high: Default is false. Display only the highest price of the price range created by variants.
- low: Default is false. Display only the lowest price of the price range created by variants.
- disabled: Default is Currently unavailable. The text label to use for pricing when all price variants are disabled.
Consistent numeric value control options.
- money: when set to
on, this option will display the number value in the configured currency format as defined by the current base of operations. Default is on.
- number: when set to
on, this option forces the tag to display the amount as a pure numeric value. Values will be given as a
numericPHP data type which may be either
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.
<?php shopp('product','price'); ?>
Variant dot-notation usage
<?php shopp('product.price'); ?>
Include taxes in the price shown
<?php shopp('product.price', 'taxes=true'); ?>
Exclude taxes in the price shown
<?php shopp('product.price', 'taxes=false'); ?>
Show the lowest price with a label (e.g. “from $9.99”)
<?php shopp('product.price', 'starting=from'); ?>
Change the separator for price ranges to a comma
<?php shopp('product.price', 'separator=,'); ?>
Special markup on the lowest price
<?php $lowprice = shopp('product.get-price', 'money=off&low=on'); list($dollars, $cents) = explode('.', $lowprice); echo "Starting from <big>$dollars</big><sup>$cents</sup>"; ?>