Login Form

#539 – possible to email certain addresses when item is sold?

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.
Wednesday, 25 February 2015 02:33 AEDT
minbori
Joomla! version: 2.5
BF Auction Plus 1.7.5

I have a requirement that administrators ONLY get notified when an item sells, either through Buy Now or a normal auction sale. These admins don't want to get all the other system notifications, so using the "bcc" field in the controller.php Joomla mailer line isn't an option.

I read through some tickets and saw this ticket : #355 – how can we add an email to seller

I thought that might be a good way to implement this -- currently we're not using the supplier field because we are the seller for all items. Is it possible to enter an email somewhere and have a notice sent when an auction ends?

Or is there another cleaner way to implement this?
 
Wednesday, 25 February 2015 16:46 AEDT 10'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Seller email type was added in v1.6.0, which triggers when an item sells. Currently this sends notification to email address of the user account that created the auction item. If you wanted to change this to a different address, you could take a look at the code in /components/com_bfauction_plus/controller.php

//line 983
//get seller details
$query->clear();
$query->select('*');
$query->from('#__users');
$query->where('id = '.(int)$myitem[0]->uid);

$db->setQuery((string)$query);
$userdetail = $db->loadObjectList();
if ($db->getErrorNum())
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $db->getErrorNum(), $db->getErrorMsg()).'<br />';
return;
}
$sellername = $userdetail[0]->name; //get seller name
$selleremail = $userdetail[0]->email; //get seller email


regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Wednesday, 25 February 2015 19:53 AEDT
minbori
Thanks! Didn't see that in the email templates. Is it possible to change the owner/creator of an auction item, instead of messing about with the code?
 
Wednesday, 25 February 2015 21:32 AEDT 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Yes, you can just change the UID field in jos_bfauction_plus table that contains the auction items. This matches up with the id field in table.

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Wednesday, 25 February 2015 21:49 AEDT
minbori
Great, I think that's going to be a better option than hard-coding.
 
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