Transfer Cs-Cart Registered User Email To Subscriber List

I am using CS-CART V 4.3.7 and I want to add the email id's of all currently registered customers to the subscribers list in bulk and henceforth upon new registration customer's email should directly go into subscriber list

Please help me how to do this.

When a customer is good enough to register on your website or to make a purchase I would hesitate to automatically enroll them as a subscriber.

When a customer is good enough to register on your website or to make a purchase I would hesitate to automatically enroll them as a subscriber.

I still want thr email in subscriber list so that we can send them weekly newsletter of our latest products and promotion.

I still want thr email in subscriber list so that we can send them weekly newsletter of our latest products and promotion.

Though it is a bad practice to subscribe your customers to a newsletter without their permission you can do it via the Export/Import feature (Administration > Import data > Subscribers).

I don't want this way. Its a tedious job. By default every member's email registering on my website should go into subscriber list. Please help anyone

Though it is a bad practice to subscribe your customers to a newsletter without their permission you can do it via the Export/Import feature (Administration > Import data > Subscribers).

app/addons/newsletters/controllers/frontend/checkout.pre.php

Try to replace:

      if (!empty($_REQUEST['mailing_lists']) && !fn_is_empty($_REQUEST['mailing_lists'])) {
            if (empty($subscriber)) {
                $_data = array(
                    'email' => Tygh::$app['session']['cart']['user_data']['email'],
                    'timestamp' => TIME,
                );
            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $_REQUEST['mailing_lists'], NULL, fn_get_notification_rules(true));
    } elseif (isset($_REQUEST['mailing_lists'])) {
        if (!empty($subscriber)) {
            fn_delete_subscribers($subscriber['subscriber_id']);
        }
    }

with

            $_REQUEST['mailing_lists'] = array(1,2,3);
            if (empty($subscriber)) {
                $_data = array(
                    'email' => Tygh::$app['session']['cart']['user_data']['email'],
                    'timestamp' => TIME,
                );
            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $_REQUEST['mailing_lists'], NULL, fn_get_notification_rules(true));

where 1,2,3 - IDs of the required mailing lists (can be found in the admin panel)

Hi ecom Thanks. But I have disabled guest checkout on my website. So any customer wanting to purchase the product will have to register compulsorily. Upon registration I want them to become subscribers of newsletter automatically. Kind

app/addons/newsletters/controllers/frontend/checkout.pre.php

Try to replace:

      if (!empty($_REQUEST['mailing_lists']) && !fn_is_empty($_REQUEST['mailing_lists'])) {
            if (empty($subscriber)) {
                $_data = array(
                    'email' => Tygh::$app['session']['cart']['user_data']['email'],
                    'timestamp' => TIME,
                );
            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $_REQUEST['mailing_lists'], NULL, fn_get_notification_rules(true));
    } elseif (isset($_REQUEST['mailing_lists'])) {
        if (!empty($subscriber)) {
            fn_delete_subscribers($subscriber['subscriber_id']);
        }
    }

with

            $_REQUEST['mailing_lists'] = array(1,2,3);
            if (empty($subscriber)) {
                $_data = array(
                    'email' => Tygh::$app['session']['cart']['user_data']['email'],
                    'timestamp' => TIME,
                );
            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $_REQUEST['mailing_lists'], NULL, fn_get_notification_rules(true));

where 1,2,3 - IDs of the required mailing lists (can be found in the admin panel)

Hi ecom Thanks. But I have disabled guest checkout on my website. So any customer wanting to purchase the product will have to register compulsorily. Upon registration I want them to become subscribers of newsletter automatically. Kind

This code will do the trick. But only after first order is placed (even it will not be paid)

This code will do the trick. But only after first order is placed (even it will not be paid)

Is there any way to do this immediately after registration of the customer instead of after the first order placed.

app/functions/fn.users.php

add

     if (Registry::get(‘addons.newsletters.status’) == ‘A’) {
$subscriber = db_get_row(“SELECT * FROM ?:subscribers WHERE email = ?s”, $user_data[‘email’]);

        $mailing_lists = array(1,2,3);
        if (empty($subscriber)) {
            $_data = array(
                'email' => $user_data['email'],
                'timestamp' => TIME,
            );

            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $mailing_lists, NULL, fn_get_notification_rules(true));
 }


after the following line:
$user_id = db_query(“INSERT INTO ?:users ?e” , $user_data);
(!) Not tested

there is no different mailing lists as such.

I am using E-mail Marketing Addon by Simtech instead Newsletter addon by Simtech. Please guide accordingly as there are no mailing lists in E-mail Marketing Addon

Thanks ecom labs in advance.

app/functions/fn.users.php

add

     if (Registry::get('addons.newsletters.status') == 'A') {            
            $subscriber = db_get_row("SELECT * FROM ?:subscribers WHERE email = ?s", $user_data['email']);
        $mailing_lists = array(1,2,3);
        if (empty($subscriber)) {
            $_data = array(
                'email' => $user_data['email'],
                'timestamp' => TIME,
            );

            $subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);
        } else {
            $subscriber_id = $subscriber['subscriber_id'];
        }

        fn_update_subscriptions($subscriber_id, $mailing_lists, NULL, fn_get_notification_rules(true));
 }

after the following line:
$user_id = db_query("INSERT INTO ?:users ?e" , $user_data);
(!) Not tested

Please try

if (Registry::get('addons.email_marketing.status') == 'A') {            
      fn_em_subscribe_email($user_data['email'], array(
            'name' => $user_data['firstname']
      ));
}

Please try

if (Registry::get('addons.email_marketing.status') == 'A') {            
      fn_em_subscribe_email($user_data['email'], array(
            'name' => $user_data['firstname']
      ));
}

Hi, Thanks , I tried this. Its working. Now one small help I don't want them to receive message that they have been subscribed after registering and while placing the order.

Hi, Thanks , I tried this. Its working. Now one small help I don't want them to receive message that they have been subscribed after registering and while placing the order.

app/addons/email_marketing/func.php

replace

fn_set_notification('I', __('email_marketing.subscription_confirmed'), $msg);

with.

//fn_set_notification('I', __('email_marketing.subscription_confirmed'), $msg);

app/addons/email_marketing/func.php

replace

fn_set_notification('I', __('email_marketing.subscription_confirmed'), $msg);

with.

//fn_set_notification('I', __('email_marketing.subscription_confirmed'), $msg);

Hi ecom,

Thanks on behalf of all members. You are doing a great job. I am using subscribe Popup Addon by HungryWeb. Now when Anyone subscribe from the popup should see the message, I just want people who are registering or ordering should not see that message. How can I do this??

I would like to donate 25$ for the free help you have been giving to us. Please share the link


Hi ecom,

Thanks on behalf of all members. You are doing a great job. I am using subscribe Popup Addon by HungryWeb. Now when Anyone subscribe from the popup should see the message, I just want people who are registering or ordering should not see that message. How can I do this??

I would like to donate 25$ for the free help you have been giving to us. Please share the link

Thank you very much. Please PM me for details. It is required to examine 3rd party module

Thank you very much. Please PM me for details. It is required to examine 3rd party module

PMed you. Expecting a quick revert back. Thanks.