How to Show Bid History on the View Product Page

Archived from the Web Auction Discussion forum.

rickyspears — Thu Sep 03, 2009 1:52 pm

Being able to see who has bid on an item creates friendly bidding wars in our group. Unfortunately, it seems that only the administrator can see them. Is there a way to show all the bids and bidder’s names on the Product page? I’ve added the “Current High Bidder” name that I saw in another thread in this forum, but I haven’t been able to figure out how to show the full bid history on the page.

Any help would be greatly appreciated!


shannah — Wed Sep 09, 2009 9:51 am

You can access the bids as follows:

Code: Select all
{foreach from=$product->getRelatedRecordObjects('bids') item=bid}   {$bid->val('username')} : {$bid->val('bid_amount')} {/foreach}

Etc.. you can access any field in the bids table by this method. I have only shown the username and bid_amount in this snippet.


rickyspears — Thu Sep 10, 2009 11:16 am

Perfect! Thank you!


marko — Thu Oct 06, 2011 1:34 am

hi steve

it is possible that show the date and time of bid.

Thanks and regards,

Mark


SCAScot — Thu Oct 06, 2011 10:16 am

Ooh, this is a tasty tidbit - where does the code go?


SCAScot — Fri Oct 07, 2011 11:47 am

Nevermind - I figured it out.

I’d like to include the timestamp of the bid in the history, but can’t seem to get that to work. Any help would be appreciated.


GrizBear — Tue Nov 08, 2011 3:44 pm

shannah wrote:You can access the bids as follows:

Code: Select all
{foreach from=$product->getRelatedRecordObjects('bids') item=bid}   {$bid->val('username')} : {$bid->val('bid_amount')} {/foreach}

Etc.. you can access any field in the bids table by this method. I have only shown the username and bid_amount in this snippet.


Could you please let us know in which file and where we might put this tidbit. I thank you a kajillion times…..
These little items makes it a fun program to work with…
Hope to find more here….,.
———————————————————————————————————————————————————————


shannah — Thu Nov 10, 2011 10:34 am

That would go in the view_product.html template.

-Steve


GrizBear — Thu Nov 10, 2011 4:33 pm

shannah wrote:That would go in the view_product.html template.

-Steve

Thanks Steve….I just to need a small hint on where in the file is the best spot to incl this snippet……

L8tr


fluffybutts — Sun Nov 13, 2011 3:21 pm

I want to show who bid and how much, too, but I can’t find the view_product.html template. Where is it? Thanks. Love this application!


shannah — Sun Nov 13, 2011 3:54 pm

templates/view_product.html


shannah — Sun Nov 13, 2011 3:54 pm

templates/view_product.html