- Posts: 36
- Thank you received: 0
Add option to subscribe to AcyMailing at guest buy
14 years 4 months ago #51891
by utillis
Add option to subscribe to AcyMailing at guest buy was created by utillis
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 only sell without registration, so guest only.
Please Log in or Create an account to join the conversation.
14 years 4 months ago #51894
by nicolas
Replied by nicolas on topic Re: Add option to subscribe to AcyMailing at guest buy
For a checkout with registration, it is already possible with that pluginof AcyMailing:
www.acyba.com/en/support/documentation/1...n-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.
www.acyba.com/en/support/documentation/1...n-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 or Create an account to join the conversation.
14 years 1 week ago #67506
by austio
Replied by austio on topic Re: Add option to subscribe to AcyMailing at guest buy
utillis,
did you figure this out? might you be able to share the steps you took if you did?
did you figure this out? might you be able to share the steps you took if you did?
Please Log in or Create an account to join the conversation.
14 years 1 week ago #67638
by utillis
Replied by utillis on topic Re: Add option to subscribe to AcyMailing at guest buy
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.
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 or Create an account to join the conversation.
12 years 5 months ago #152292
by bullantmm
Replied by bullantmm on topic Re: Add option to subscribe to AcyMailing at guest buy
I want to re-ignite this discussion. Does anyone have a solution for this yet?
Please Log in or Create an account to join the conversation.
12 years 5 months ago #152306
by utillis
Replied by utillis on topic Re: Add option to subscribe to AcyMailing at guest buy
I don't have one yet. Would be a nice one for freelance.com or something like that.
Please Log in or Create an account to join the conversation.
12 years 5 months ago #152579
by Xavier
Replied by Xavier on topic Re: Add option to subscribe to AcyMailing at guest buy
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.
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 or Create an account to join the conversation.
12 years 5 months ago - 12 years 5 months ago #154178
by bullantmm
Replied by bullantmm on topic Re: Add option to subscribe to AcyMailing at guest buy
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:
2. Login to your Joomla Backend and create two Hikashop Custom Fields (Components > Hikashop > Display > 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:
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.
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
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 > Hikashop > Display > 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
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
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 5 months ago by bullantmm.
Please Log in or Create an account to join the conversation.
12 years 5 months ago #154244
by nicolas
Replied by nicolas on topic Re: Add option to subscribe to AcyMailing at guest buy
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.
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 or Create an account to join the conversation.
12 years 5 months ago #154288
by bullantmm
Replied by bullantmm on topic Re: Add option to subscribe to AcyMailing at guest buy
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 or Create an account to join the conversation.
12 years 5 months ago #154296
by nicolas
Replied by nicolas on topic Re: Add option to subscribe to AcyMailing at guest buy
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.
You have the option "Lists displayed on registration form" for that.
Please Log in or Create an account to join the conversation.
Time to create page: 0.233 seconds