Login Form

#427 – User ID

Posted in ‘BF Auction’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 13 October 2014 17:26 AEDT
Leeroy Brown
Joomla! version: 3.3.4

Hi Tim,

Quick question, is it possible to have the User ID of the registered user that is auctioning an item displayed in the auction details and also in the Auction Items list preferably between category and title columns? I have been able to create a column with seller as the title but from there I have no idea what pages need editing.

I can have a go at editing the pages if you can list which pages I would need to look at. Ideally the login in user that is submitting an item for auction would have their username already inputed into a seller field. I guess then it would need to be echoed into the seller's column and then echoed into the auction details page for that particular item. At the moment a user can run more than one auction but can be anyone they wish to write in the auction.

Also I have had a look at the fact that an auctioneer can bid on their own item, have read this ticket:

Bidder on item can also be seller of item

If you look at the logic, we are comparing the user id (uid) of the person who created the auction item, and comparing this to the user id of the curr…

Sorry could not find a ticket number....... Where about's in the referenced page do you add the code you wrote? Line number?

Thanks Tim

Leigh Stone
Monday, 13 October 2014 21:03 AEDT 15'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Leigh,
Here is one way you could implement the sellers name on the item detail page.
Edit the file /components/com_bfauction_plus/models/bid.php
In the &getData function, change the query to

$query = ' a.*, b.username AS seller FROM #__bfauction_plus AS a'.
' LEFT JOIN #__users AS b ON a.uid=b.id'.
' WHERE a.id = '.$this->_id;

Note that the word select is removed from above query by this ticket system.

Then in your view file
/components/com_bfauction_plus/views/bid/tmpl/default.php
you could add something like:

<tr>
<td class="bfauction_plusLabel">
<label for="supplier">
<?php echo JText::_( 'COM_BFAUCTIONPLUS_TITLE_SELLER' ); ?>:
</label>
</td>
<td class="bfauction_plusDetails">
<?php echo $this->bfauction_plus->seller;?>
</td>
</tr>


Then you'd just need to add a language string like this:
COM_BFAUCTIONPLUS_TITLE_SELLER="Seller"


regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Tuesday, 14 October 2014 11:41 AEDT
Leeroy Brown
Hi Tim,

Thanks for the reply. I have made the changes to the mentioned php files.

I noticed that in the following code you have supplier and not seller, is that an issue?
<tr>
<td class="bfauction_plusLabel">
<label for="supplier">
<?php echo JText::_( 'COM_BFAUCTIONPLUS_TITLE_SELLER' ); ?>:
</label>
</td>
<td class="bfauction_plusDetails">
<?php echo $this->bfauction_plus->seller;?>
</td>
</tr>

On the item detail page I am now getting the seller id but other functions have stopped including the countdown timer, images and current bid amount reports $NaN. I have attached a print screen to show the issues.

I have attached another print screen showing the auctions list page and how I have created a seller column. I can not seem to get the sellers to display in the list. I have added some code into the components/com_bfauction_plus/views/bfauction_plus/tmpl/default.php page between
<td align="center">
				<?php echo $row->category_name;?>
			</td>

and 

<td align="center">
				<a href="/<?php echo $link; ?>"><?php echo $row->title; ?></a>
			</td>

but can't get it to echo the sellers id. Do you have a solution to this??

Many Thanks

Leigh Stone

Saturday, 18 October 2014 10:40 AEDT 60'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Leigh,
I've added the show seller feature in v1.6.1, just set the option to yes in your component options.

http://tamlynsoftware.com/download/bf-auction-plus/bf-auction-plus-1-6-1.html

Let me know how you go.

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Saturday, 18 October 2014 12:06 AEDT
Leeroy Brown
Hi Tim,

Yes thats brilliant, it all works great... Now users can see who is auctioning the item.

What would be involved in having the seller's id (name) in the item details page linkable to their joomla details. On my site only logged in users can bid, if one of them wanted to see who the seller was they could click on the seller's link and it would take them to the joomla user's account details page or in my case take them to jomsocial's users details page via the redirect jomsocial plugin.


regards

Leigh
Saturday, 18 October 2014 14:13 AEDT 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
HI Leigh,
It's on my todo list to link the seller to a view that shows all their auction items, and a link to their profile.

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.
Go to top