Hide minimum bid

A place to discuss and receive support for the Web Auction application.

Hide minimum bid

Postby 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
bobede
 
Posts: 24
Joined: Tue Oct 30, 2007 7:01 am

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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
bobede
 
Posts: 24
Joined: Tue Oct 30, 2007 7:01 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 23 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved