• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Transferring data from a fabrik to AcyMailing

hitek6456

New Member
OK, I was able to get it to work by using Joomla User data on another table. But I wanted to try it on another database by using using a table for the user data. The table I created for the user data is called "sk_add". In that table I added the elements of an id, name, and phone. Then I added the databasejoin field in a table called "soulkeeper". In the addon of the soulkeeper form, I added the below code. Can you tell me what I'm doing wrong?

$myAssignedId = '{soulkeeper___soulkeeper_raw}';
$myAssignedId = is_array($myAssignedId) ? $myAssignedId[0] : $myAssignedId;
$myVisitor = '{soulkeeper___name}';
$myPhone = '{soulkeeper___mobile}';
$myVis_Email ='{soulkeeper___email}';

if (!empty($myAssignedId)) {
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('name, email, phone')->from('add_sk')->where('id = ' . $myDb->quote($myAssignedId));
$myDb->setQuery($myQuery);
$myAssignedId = $myDb->loadObject();

if (! include_once JPATH_ADMINISTRATOR . '/components/com_acymailing/helpers/helper.php')
{
throw new RuntimeException("Acymailing not installed");
return false;
}

$myUser = new stdClass();
$myUser->email = $myAssignedId->get email;
$myUser->name = $myAssignedId->get name;
$myUser->skphone = $myAssignedId->get phone;
$myUser->visitor = $myVisitor;
$myUser->phone = $myPhone;
$myUser->visemail = $myVis_Email;

$subscriberClass = acymailing_get('class.subscriber');
$subid = $subscriberClass->save($myUser);

$newSubscription = array();
$newList = array();
$newList['status'] = 1;
$newSubscription[6] = $newList; // Replace 2 with the ID of the list.

$subscriberClass->saveSubscription($subid, $newSubscription);
}
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top