AcyMailing list SQL statements

9 years 4 months ago #120625 by nant
I have been playing with the AcyMailing list system by the Acyba team and have figured out - with the help of krileon (thanks) - the following SQL integration scripts.

This one subscribes a user to a specific AcyMailing list with listid number = <listid> (you need to look at your jos_acymailing_list table to find the listid you need or you can just look at your backend Components -> AcyMailing -> Lists area to find the listid of your list (right column). Make sure you substitute <listid> with your listid value.

[code:1]INSERT INTO `#__acymailing_listsub` ( `listid`, `subid`, `subdate`, `status` ) VALUES ( <listid>, ( SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ), UNIX_TIMESTAMP( NOW() ), 1 )[/code:1]

And this one removes the subscription (once again remember to replace <listid> with your listid:

[code:1]DELETE FROM `#__acymailing_listsub` WHERE ( (`listid` = <listid>«») AND (`status` = 1) AND (`subid` = (SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ) ) )[/code:1]
9 years 4 months ago #120686 by lexxm
Nick, you're so awesome! Exactly what I was looking for. Although I was originally thinking Acajoom, I just took Acy for a drive and now I'm liking it more than Acajoom. A big thank you!
9 years 2 months ago #126182 by staeren
i tried this but when activating plan X in backend, everything is correct saved without adding to list number 7 in acymailing. i replaced <listid> by 7...
9 years 2 months ago #126579 by coachnet
This worked first time for me! I never managed to make it work for Acajoom, and having made the switch to Acymailing I feel like a new woman!

Renee Hasseldine
CoachNetwork Founder
Life Coaches | Business Coaches | Executive Coaches
9 years 2 months ago #127340 by swordfish
In Australia we have a strict 'opt-in' government policy, so I cannot automatically register users to any newsletter.

All I want to do is give person registering to CB Subs Plan A the option to subscrube to newsletter 1, the person registering to CB Subs Plan B the option to subscribe to newsletters 1 and/or 2.

Further, I only want to give person registered to CB Subs Plan B the option to subscribe to newsletter 2, so this option cannot be available in the CB Profile tab for Plan A subscribers.

Can anyone suggest how I can do this?

Post edited by: swordfish, at: 2010/03/19 02:40
8 years 11 months ago #135957 by coachnet
I've come across a challenge with this... The SQL statement adds the user to the list correctly HOWEVER if that list has a welcome message or campaigns associated with it, they are NOT triggered...

We need to be able to send follow up messages to people who have purchased a particular plan/merchandise in CB Subs...

I have posted this in the AcyMailing Forum , but I don't have the expertise to resolve this one (plugin required?)

Nant or Krileon - would you mind checking this out and seeing if there is a way? CB Subs + AcyMailing is a killer solution if we can make it work seemlessly! :)

Renee Hasseldine
CoachNetwork Founder
Life Coaches | Business Coaches | Executive Coaches
Moderators: beatnantkrileon
Time to create page: 0.409 seconds
Facebook Twitter Google LinkedIn