[Skip to main content](#vessel-content)

#   Add option to subscribe to AcyMailing at guest buy

##

- **[utillis](/forum/user/6295-utillis "View utillis's Profile")**
- [![utillis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6295-utillis "View utillis's Profile") Topic Author
- [ Offline](/forum/user/6295-utillis)

Less More

- Posts: 36
- Thank you received: 0
-
-

14 years 5 months ago [\#51891](#51891) by [utillis](/forum/user/6295-utillis "View utillis's Profile")  *[Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#51891 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")* was created by *[utillis](/forum/user/6295-utillis "View utillis's Profile")*

Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?

I only sell without registration, so guest only.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

14 years 5 months ago [\#51894](#51894) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#51894 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

For a checkout with registration, it is already possible with that pluginof AcyMailing:
[ www.acyba.com/en/support/documentation/1...n-regacymailing.html](http://www.acyba.com/en/support/documentation/142-acymailing-plugin-regacymailing.html)
For a checkout without registration, it will require that this plugin implements the onAfterUserCreate trigger that we have in HikaShop. That plugin is developed by AcyMailing, so it should be something to ask them actually.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[austio](/forum/user/4775-austio "View austio's Profile")**
- [![austio's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4775-austio "View austio's Profile")
- [ Offline](/forum/user/4775-austio)

Less More

- Posts: 35
- Thank you received: 0
-
-

14 years 2 months ago [\#67506](#67506) by [austio](/forum/user/4775-austio "View austio's Profile")  Replied by *[austio](/forum/user/4775-austio "View austio's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#67506 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

utillis,
did you figure this out? might you be able to share the steps you took if you did?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[utillis](/forum/user/6295-utillis "View utillis's Profile")**
- [![utillis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6295-utillis "View utillis's Profile") Topic Author
- [ Offline](/forum/user/6295-utillis)

Less More

- Posts: 36
- Thank you received: 0
-
-

14 years 1 month ago [\#67638](#67638) by [utillis](/forum/user/6295-utillis "View utillis's Profile")  Replied by *[utillis](/forum/user/6295-utillis "View utillis's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#67638 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

Nope, so far I have added a custom check field at the end of the checkout procedure. So now my database has the information. However I would have to create a script which runs after a successful buy which verifies this field in the database and if true adds the emailadress and customer name to the AcyMailing table with the wanted list IDs.

Until now my focus has been on other stuff.

Although I would be willing to pay a small fee if someone can make that script, even if the configuration of tables and list IDs are not in a Joomla plugin or something.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")**
- [![bullantmm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32134-bullantmm "View bullantmm's Profile")
- [ Offline](/forum/user/32134-bullantmm)

Less More

- Posts: 10
- Thank you received: 0
-
-

12 years 7 months ago [\#152292](#152292) by [bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")  Replied by *[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#152292 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

I want to re-ignite this discussion. Does anyone have a solution for this yet?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[utillis](/forum/user/6295-utillis "View utillis's Profile")**
- [![utillis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6295-utillis "View utillis's Profile") Topic Author
- [ Offline](/forum/user/6295-utillis)

Less More

- Posts: 36
- Thank you received: 0
-
-

12 years 7 months ago [\#152306](#152306) by [utillis](/forum/user/6295-utillis "View utillis's Profile")  Replied by *[utillis](/forum/user/6295-utillis "View utillis's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#152306 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

I don't have one yet. Would be a nice one for freelance.com or something like that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 7 months ago [\#152579](#152579) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#152579 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

Hi,

This will require a custom plugin for such action.
So a PHP developer is required, you can post a request on our Commercial jobs section, there is potentially developers which can develop that for you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")**
- [![bullantmm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32134-bullantmm "View bullantmm's Profile")
- [ Offline](/forum/user/32134-bullantmm)

Less More

- Posts: 10
- Thank you received: 0
-
-

12 years 6 months ago -  12 years 6 months ago [\#154178](#154178) by [bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")  Replied by *[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#154178 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

Ok so I have done it (in a way). I am not at all a php developer so basically I went in search for a different solution, there are flaws in this solution (it takes the Subscribers Name from the first address created and it's a First Name only) but it will work in my situation and hopefully some others. Also worth noting that this solution copies the new user every 30 minutes... you can change this if you like by editing the query when creating the scheduled event.

The way to do it is via MySQL Event Scheduler Queries (5.1+). So here's how.
1. Login to your MySQL database and ensure that Event Scheduler is running by running the query: Code:

SET GLOBAL event_scheduler = "ON"

2. Login to your Joomla Backend and create two Hikashop Custom Fields (Components &gt; Hikashop &gt; Display &gt; Custom Fields) as follows:
"Subscribe" as Radio Button field with two values "Yes" and "No" configured as follows:
Table: **user**  Column name: **subscribe** Display: Font-end YES Back-end YES
"sub_user_name" as text field with no value configured as follows:
Table: **user** Column name: **sub\_user\_name** Display: NO for all

3.Once Created the Subscribe Yes/No should appear in the checkout

4. Go back to MySQL and run the following queries - PLEASE FILL IN YOUR DATABASE TABLE PREFIX WHERE "XXX" APPEARS IN THE QUERIES BELOW: Code:

CREATE EVENT hikasub1 ON SCHEDULE EVERY 30 MINUTE COMMENT 'Copies name from address to sub_user_name' DO UPDATE XXX_hikashop_user a, XXX_hikashop_address b SET a.sub_user_name = b.address_firstname WHERE a.user_id = b.address_user_id

Code:

CREATE EVENT hikasub2 ON SCHEDULE EVERY 30 MINUTE COMMENT 'Copies from Hikashop to AcyMailing' DO INSERT INTO XXX_acymailing_subscriber (name, email) SELECT sub_user_name, user_email FROM XXX_hikashop_user WHERE subscribe = 'Yes' ON DUPLICATE KEY UPDATE subid=subid

Code:

CREATE EVENT hikasub3 ON SCHEDULE EVERY 30 MINUTE COMMENT 'Sets timestamp on new subscriber row' DO UPDATE XXX_acymailing_subscriber SET created = UNIX_TIMESTAMP() WHERE created IS NULL

This step Adds the user to the Newsletter with the ID 1 if you want to subscribe them to another list just change the "1" at the beginning of the "SELECT" query. Code:

CREATE EVENT hikasub4 ON SCHEDULE EVERY 30 MINUTE COMMENT 'Adds the new user to subscription list' DO INSERT INTO XXX_acymailing_listsub (listid, subid, subdate, status) SELECT 1, XXX_acymailing_subscriber.subid, XXX_acymailing_subscriber.created, 1 FROM XXX_acymailing_subscriber ON DUPLICATE KEY UPDATE listid=listid

5. Test it! REMEMBER: It will take up to 30 minutes for the new user to be added to AcyMailing...

Hopefully this sets someone on the right track... It's fairly basic and I am sure anyone with PHP knowledge could make this work much better but I have a limited budget for my project and I also learnt some stuff on the way!

Chris

Last edit: 12 years 6 months ago by [bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 6 months ago [\#154244](#154244) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#154244 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

Hi,

Thanks for sharing a solution.

We've shared with the AcyMailing team the code necessary in their plugin to handle the guest mode of HikaShop.
They just need to review it, accept it and release it and it should work automatically with the (auto)subscription on Joomla registration plugin of AcyMailing.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")**
- [![bullantmm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32134-bullantmm "View bullantmm's Profile")
- [ Offline](/forum/user/32134-bullantmm)

Less More

- Posts: 10
- Thank you received: 0
-
-

12 years 6 months ago [\#154288](#154288) by [bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")  Replied by *[bullantmm](/forum/user/32134-bullantmm "View bullantmm's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#154288 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

Yeah no worries. My solution is a little more user friendly because it only adds people if the say "yes" to subscribing, the AcyMailing auto plugin just registers everyone.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 6 months ago [\#154296](#154296) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add option to subscribe to AcyMailing at guest buy](/forum/4-how-to/51891-add-option-to-subscribe-to-acymailing-at-guest-buy#154296 "Is there an easy way to have a tickbox in the address form which allows an opt-in on a certain AcyMailing?  I only sell without registration, so guest only.")*

No, the AcyMailing plugin can also ask the clients if they want to subscribe or not.
You have the option "Lists displayed on registration form" for that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxODkxLWFkZC1vcHRpb24tdG8tc3Vic2NyaWJlLXRvLWFjeW1haWxpbmctYXQtZ3Vlc3QtYnV5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.070 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
