Shopp

Hide Price in Product and Category Templates: Shopp Plugin for WordPress

WordPress Shopp PluginThe need to hide a product’s price is common for many online retailers; we’ve helped a number of clients with this on multiple platforms. For instance, many clients like to have “Call for Price” displayed in place of an actual amount when a products price is $0.00 (zero). This can be useful when selling wholesale amounts, unique or rare products, such as pieces of art, or high ticket items, such as boats or vehicles, as well as for meeting minimum advertized price (MAP) criteria.

The steps below detail how to replace a the price display for a $0 priced product with a “Contact Us for Pricing” for the Shopp plugin for WordPress.

1) Locate the following code in /wp-content/plugins/shopp/templates/product.php around line 28:

<?php shopp('product','price'); ?>

2) Change it to:

<?php
//Looks to see if the price is equal to $0.00
if (shopp('product', 'price','return=true') == "$0.00") {
//Shows nothing
echo "Contact Us For Pricing";
} else {
//Else, if the $0.00 price is not met then show price
shopp('product','saleprice','starting=from','return=true');
}
?>

3) If you need to change the message displayed when a products price is $0 or zero simple edit the below line in the code:

echo "Contact Us For Pricing";

Let us know if you have any questions by commenting on this post.

13 Comment on “Hide Price in Product and Category Templates: Shopp Plugin for WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *