Using Breezingforms Integrator to insert data into Acymailing tables

  • piluche
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 0

piluche created the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Hi,
I'm using Breezingforms to publish a form dedicated to clients data base registration with a multiple selectionfield choice of Acymailing lists to register in.
I cannot code !
I allready succeded to insert subscribers simple data into Acymailing subscribers table ( name, firstname etc..) using Breezingforms integrator. ( smart !)
I need help to find how doing the same (using Breezingforms integrator) to implement the lists choice.
In the form , i'm using a "Multiple list Selection" field i.e which means that i can entitle the client to be assigned to one or several mailing lists.
Can you tell me in which Acymailing data table the users are registered in lists (single or multiple mailing lists) ? So i could find out what to do.
Or help me to solve that issue, if possible.
For your information, i asked the same question to Acymailing support team and i'm waiting for their answer
Thanks for all,

Rgds
Piluche
#207806
  • Posts: 6478
  • Karma: 170
  • Thank you received: 667

tomeperica replied the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Hey there,

while w8ing the answer from Acymailing, also check this topic:

crosstec.org/en/forums/40-club-forums-su....html?start=6#197259

Let me know what Acymailing said so we can somehow help you achive your result.

Regards,
Tome

Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#207845
  • piluche
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 0

piluche replied the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Hi Tome,
Acymailing gave me this code :

In the Text Area, copy this code :

Show/Hide php code
View source


$this->execPieceByName('ff_InitLib');



include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acymailing'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');



$myUser = new stdClass();
$myUser->email = strip_tags(ff_getSubmit('email_field')); //Please replace email_field by your own field name (the name of the field "email").
$myUser->name = strip_tags(ff_getSubmit('name_field')); //Please replace name_field by your own field name (the name of the field "name").



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


$subscriberClass->sendConf($subid); //we send the confirmation email... only if needed based on the current user status and the option from the Acy configuration page.



$subscribe = array(3,4,5); //Specify here the ID of your lists separated by a comma, in this example the user will be subscribed to lists IDs 3,4 and 5.
$newSubscription = array();
if(!empty($subscribe)){
foreach($subscribe as $listId){
$newList = array();
$newList = 1;
$newSubscription[$listId] = $newList;
}
}
$subscriberClass->saveSubscription($subid,$newSubscription);




Please make sure to replace the fields name based on your form configuration and enter the IDs of your own lists.


Subscribe the user only if the user checks the box

You can create a checkbox on your form and then only subscribe the user if he checks that box.

Please add this part only if the previous code works fine.

Once your checkbox created (let's call the checkbox "subscribeme" ), add this code at the top of the previous code:

Show/Hide php code
View source


$this->execPieceByName('ff_InitLib');
if(!ff_getSubmit('subscribeme')) return;
#207892
  • Posts: 6478
  • Karma: 170
  • Thank you received: 667

tomeperica replied the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Thats almost indentical code like I posted you.

Try it and see result.

Regards,
Tome

Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#207894
  • piluche
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 0

piluche replied the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Except that i dont want my user to be subscribed to several lists i.e.

$subscribe = array(3,4,5); //Specify here the ID of your lists separated by a comma, in this example the user will be subscribed to lists IDs 3,4 and 5.

but only the ones corresponding with the ones he has choosen.
I'll try and let you know

Thanks for your kindness
Rgds

Piluche
#207899
  • Posts: 6478
  • Karma: 170
  • Thank you received: 667

tomeperica replied the topic: Using Breezingforms Integrator to insert data into Acymailing tables

Ok try it ;)

Enjoy the weekend.

Regards,
Tome

Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#207903
The following user(s) said Thank You: piluche
Moderators: ForumSupporttomeperica
Time to create page: 0.061 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here