Page 1 of 1

Does anybody know where to find this

PostPosted: Mon Aug 29, 2011 11:00 am
by silverb0t
I tried "windows grep" still cannot find the text on my watch list the high bid and high bidder want to change it to highest bid and highest bidder

here is the image:

Image

thank you in advance really love this auction simple yet powerfull

-

Re: Does anybody know where to find this

PostPosted: Wed Aug 31, 2011 7:20 pm
by shannah
templates/watch_list.html

Re: Does anybody know where to find this

PostPosted: Thu Sep 01, 2011 5:51 am
by silverb0t
shannah wrote:templates/watch_list.html


Hi Steve,

heres the content of the templates/watch_list.html:

{use_macro file="Dataface_Main_Template.html"}
{fill_slot name="main_section"}
<h1>My Watch list</h1>
<p>Below is a list of items that you have bid on already.</p>
{$grid}
{/fill_slot}
{/use_macro}



I cannot find the text "High Bid" and "High Bidder" I was going to change that text.

Re: Does anybody know where to find this

PostPosted: Fri Sep 02, 2011 8:30 am
by silverb0t
Hi Steve I was really trying to figure out hours and hours I cannot find that text "High Bid" and "Higher Bidder" I would to change that text. :cry:

Re: Does anybody know where to find this

PostPosted: Sun Sep 04, 2011 10:02 pm
by shannah
Oh.. yes. Looks like these are taken directly from the SQL query in
actions/watch_list.php

Unfortunately you can't just change the labels in the query because they are used as part of the query . However you can manually assign the labels for the RecordGrid (the component used to display the table). Only the line:

Code: Select all
$grid = new Dataface_RecordGrid($data);


You can add a third parameter with the column labels. E.g:
Code: Select all
$grid = new Dataface_RecordGrid($data, null, array(
    'product_id' => 'Product ID',
    'product_name' => 'Product Name',
    'high_bidder' => 'High Bidder'

));

etc...


But you'll need to make sure that you have a label for every column.

-Steve

Re: Does anybody know where to find this

PostPosted: Thu Sep 08, 2011 8:34 am
by silverb0t
shannah wrote:Oh.. yes. Looks like these are taken directly from the SQL query in
actions/watch_list.php

Unfortunately you can't just change the labels in the query because they are used as part of the query . However you can manually assign the labels for the RecordGrid (the component used to display the table). Only the line:

Code: Select all
$grid = new Dataface_RecordGrid($data);


You can add a third parameter with the column labels. E.g:
Code: Select all
$grid = new Dataface_RecordGrid($data, null, array(
    'product_id' => 'Product ID',
    'product_name' => 'Product Name',
    'high_bidder' => 'High Bidder'

));

etc...


But you'll need to make sure that you have a label for every column.

-Steve



Thank You very much Steve the steps you gave works perfect.

I tried also to edit the sql query but seems to work perfect also the output was Highest Bid and Highest Bidder works perfect I dont know if this will affect the system.

heres what I changed:



$sql = "select p.product_id, p.product_name, concat('\Php',format(high_bid,2)) as highest_bid, highest_bidder from products p inner join
(
select product_id, $highbidamount as high_bid from bids group by product_id
) as hb
on p.product_id=hb.product_id
inner join
(
select product_id, username as highest_bidder from bids b where not exists (select * from bids where product_id=b.product_id and $highbidderq)



//-------------------

while ($row = mysql_fetch_assoc($res) ) {
if ( $row['highest_bidder'] != getUsername() ) $row['highest_bidder'] = '';
$data[] = $row;

}