Login Form

#337 – Bidder on item can also be seller of item

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, 18 August 2014 17:22 AEST
lesterhopkins
Joomla! version: 3.3

Hi Tim

I did some testing and currently I see that I can bid on an item I have posted for auction. If bidder is also seller of item the bid should not be allowed. How can we fix this?

Regards
Les :)
Monday, 18 August 2014 23:17 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Les,
Potentially you could edit the bid view, and hide the bid button when the current user is the owner of the auction item.

[edit - shouldn't post code samples when I'm tired :) ]
if($this->bfauction_plus->uid != $user->id){

//show bid button

}


regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Monday, 18 August 2014 23:52 AEST
lesterhopkins
Tim

Could you give me the location of the file to edit?

Also is the code to use...

if($this->bfauction_plus->uid != $user->id){

//show bid button

}

regards
les
Tuesday, 19 August 2014 00:06 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
/componenents/com_bfauction_plus/views/bid/tmpl/default.php

Try that code, in theory it should work (I haven't tested).
Follow us on twitter http://twitter.com/tamlynsoftware
Tuesday, 19 August 2014 00:59 AEST
lesterhopkins
Should the code not say hide, instead of show?
Sorry, just want to make sure you understood what I needed, you did mention being tired earlier :)
Tuesday, 19 August 2014 08:12 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
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 currently logged in user. If they do not match, then we know it's not the seller, so we should show the button. If they do match, then the test fails and we hide the button.
Follow us on twitter http://twitter.com/tamlynsoftware
Tuesday, 19 August 2014 19:16 AEST
lesterhopkins
Thanks Tim

I should be able to figure it out now.

Regards
Les
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