How to Show Bid History on the View Product Page

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

How to Show Bid History on the View Product Page

Postby 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!
rickyspears
 
Posts: 4
Joined: Thu Sep 03, 2009 1:42 pm

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

Postby rickyspears » Thu Sep 10, 2009 11:16 am

Perfect! Thank you!
rickyspears
 
Posts: 4
Joined: Thu Sep 03, 2009 1:42 pm

Re: How to Show Bid History on the View Product Page

Postby 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
marko
 
Posts: 7
Joined: Thu Sep 08, 2011 10:21 pm

Re: How to Show Bid History on the View Product Page

Postby SCAScot » Thu Oct 06, 2011 10:16 am

Ooh, this is a tasty tidbit - where does the code go?
SCAScot
 
Posts: 4
Joined: Tue Aug 30, 2011 5:45 pm

Re: How to Show Bid History on the View Product Page

Postby 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.
SCAScot
 
Posts: 4
Joined: Tue Aug 30, 2011 5:45 pm

Re:

Postby 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....,.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Image
Klaus G Schulz, CPP-OCP
Greyhound Adoption Squad-Canada
www.t-legs.com

Not everyone needs a Greyhound,
But every retired racing Greyhound, needs someone....
GrizBear
 
Posts: 30
Joined: Thu Sep 02, 2010 3:15 pm
Location: Montreal, QC, CANADA

Re: How to Show Bid History on the View Product Page

Postby shannah » Thu Nov 10, 2011 10:34 am

That would go in the view_product.html template.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: How to Show Bid History on the View Product Page

Postby 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
Image
Klaus G Schulz, CPP-OCP
Greyhound Adoption Squad-Canada
www.t-legs.com

Not everyone needs a Greyhound,
But every retired racing Greyhound, needs someone....
GrizBear
 
Posts: 30
Joined: Thu Sep 02, 2010 3:15 pm
Location: Montreal, QC, CANADA

Re: How to Show Bid History on the View Product Page

Postby 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!
fluffybutts
 
Posts: 1
Joined: Sun Nov 13, 2011 3:18 pm

Re: How to Show Bid History on the View Product Page

Postby shannah » Sun Nov 13, 2011 3:54 pm

templates/view_product.html
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

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