[TYPO3-english] DirectMail, dynamic SQL query?
Xavier Perseguers
xavier at typo3.org
Tue Oct 8 16:18:08 CEST 2013
Hi,
>> No, you have to provide UIDs, not PIDs, thus specifying each fe_user
>> account you want to include. If you really want to include every fe_user
>> account within a given pid, it's just a matter of fetching the
>> corresponding uids with a custom SQL query.
>
> So If I understand correctly, this is an optional parameter? Or is
This is of course optional, remember this is just a sample and this is
really stated like that in the documentation:
"If you wish to provide records from tables tt_address or fe_users, ..."
> necessary that $params['lists']['fe_users'][] = must have a pid in his
> memory? This is going to be tricky for more complicated querry..
Sorry, I really don't understand what you say about pid, a pid is a
"page id", that is basically a storage folder for us. The array expects
uids, that is the ID of the fe_users records. Records are stored in a
storage folder and have thus an associated pid but that's all! you don't
have to store pid in this array, only uid.
>> For plain lists, I'm really using only this:
>
> Yeah I inspired myself with your example, but it still doesn't work :
>
>> class user_testList {
>>
>> function myRecipientList($params, $pObj) {
>> $params['lists']['fe_users'][] = 5584;
>> $params['lists']['PLAINLIST'][] = array(
>> 'name' => 'Luc Salander',
>> 'email' => 'mini-skate (at) laposte.net'
>> );
>> }
>>
>> }
>
> I tried with and without '$params['lists']['fe_users'][] = 5584;' . I
> checked on the fe_users table and these name+email are correct.
> The file I'm modifying is 'user_testlist.php' from
> 'typo3conf/ext/direct_mail_userfuncs/sample'. Is it correct?
> In 'itemsProcFunc', in the 2nd field, there is
> 'user_testList->myRecipientList'. I have nothing tho in the field
> 'Additional parameters'.
>
> Do you have any idea why it doesn't work with me?
No, when using user_testList->myRecipientList locally I have a few
sample recipients shown by opening module Direct Mail > Recipients
Lists. It shows me how many recipients are in the custom list (shown as
"plain list") and that's it.
Cdt
Xavier
--
Xavier Perseguers
Release Manager TYPO3 4.6
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-english
mailing list