Hide minimum bid

Archived from the Web Auction Discussion forum.

bobede — Wed Oct 31, 2007 10:34 am

Is there a way to hide the minimum bid amount in the product list view if the minimum bid has been met?

Thanks

Bob


shannah — Thu Nov 01, 2007 8:21 am

You could do something like this in the templates/public_product_list.html template:

Code: Select all
`{if $product->val(‘minimum_bid’) >= $product->val(‘current_high_bid’)}
Minimum Bid
{$product->display(‘minimum_bid’)}

{/if}

Current Bid
{$product->display(‘current_high_bid’)}`

Note that the only modification here is to wrap the Minimum bid section in an {if} tag.

-Steve


bobede — Thu Nov 01, 2007 11:58 am

Thanks!! That worked great. I modified it slightly. I removed the = from the first part so that the minimum bid would not show up if it was the same as the current high bid. Then I added another if statement, so that the current bid won’t show unless it is equal to, or greater than the minimum bid. Now the users see either Minimum bid: or Current bid:

Here’s the code in case anyone is interested.

Code: Select all
`{if $product->val(‘minimum_bid’) > $product->val(‘current_high_bid’)}
Minimum Bid
{$product->display(‘minimum_bid’)}

         {/if}
         {if $product->val(‘current_high_bid’) >= $product->val(‘minimum_bid’)}

Current Bid
{$product->display(‘current_high_bid’)}

         {/if}`

Thanks again!

Bob