Page 115 of 117 FirstFirst ... 1565105113114115116117 LastLast
Results 1,141 to 1,150 of 1165
  1. #1141
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Newsletter-Only Subscriptions for v1.5.1

    Quote Originally Posted by Nick1973 View Post
    I installed this on 1.5.4 but don't see any links to firstly upgrade the database and secondly no link Subscription Manager under the customers menu. Is this ready for 1.5.4?
    Nope, it was never updated for the Zen Cart v1.3 to v1.5 change in the admin-level interfaces. I'm guessing that the number of core files that the plugin carves up is one of the reasons that no one has picked up the plugin's "baton".

  2. #1142
    Join Date
    Jun 2006
    Posts
    403
    Plugin Contributions
    0

    Default Re: Newsletter-Only Subscriptions for v1.5.1

    I created a define_subscribe_confirm.php under /includes/languages/english/html_includes, but when i clicked the link in the email, I was brought back to Newsletter Subscription page, not Newsletter Subscription Confirmation page I added. How to fix it?

  3. #1143
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    806
    Plugin Contributions
    0

    Default Re: Newsletter-Only Subscriptions for v1.3x

    Hey All,
    Any chance this module works in 1.5.5?

    Thanks, John

  4. #1144
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Newsletter-Only Subscriptions for v1.3x

    unlikely to work on 1.5.5
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #1145
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    806
    Plugin Contributions
    0

    Default Re: Newsletter-Only Subscriptions for v1.3x

    well it took quite a bit of file merging, but it does work. Definitely not good to just upload into a 1.5.5 file set.

    John

  6. #1146
    Join Date
    Jun 2006
    Posts
    403
    Plugin Contributions
    0

    Default Re: Newsletter-Only Subscriptions for v1.3x

    I didn't click "yes" for Display on Menu button, so I cannot see the "Subscriber Manager" under "customers". How can I fix it? I am so upset with myself.....

  7. #1147
    Join Date
    Jan 2018
    Posts
    165
    Plugin Contributions
    4

    Default Re: Newsletter-Only Subscriptions for v1.3x

    I updated version waiting on approval. I added an admin page and made changes for it to work with 1.5.5.

  8. #1148
    Join Date
    Mar 2018
    Location
    Perth, WA
    Posts
    10
    Plugin Contributions
    1

    Default Re: Newsletter-Only Subscriptions for v1.3x

    Quote Originally Posted by kamelion0927 View Post
    In includes/modules/your_template/create_account.php, find the code between // BEGIN newsletter_subscribe mod 1/1 and // END newsletter_subscribe mod 1/1 and try replacing it with:

    PHP Code:
    // BEGIN newsletter_subscribe mod 1/1
    // If a newsletter only account exists we update the info,
    // but keep the subscription active, and give them a message that to
    // change they should do so on their account page (after creation).
        
    if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') && (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) {
          
    $check_subscribers_query "select count(*) as total from " TABLE_SUBSCRIBERS "
                        where email_address = '" 
    zen_db_input($email_address) . "' ";
          
    $check_subscribers $db->Execute($check_subscribers_query);
          if (
    $check_subscribers->fields['total'] > 0) {
            
    $sql "UPDATE " TABLE_SUBSCRIBERS " SET
                    customers_id = '" 
    . (int)$_SESSION['customer_id'] . "',
                    email_format = '" 
    zen_db_input($email_format) . "',
                    confirmed = '1' 
                    WHERE email_address = '" 
    zen_db_input($email_address) . "' ";
            
    $db->Execute($sql);
            
    $messageStack->add_session('login'SUBSCRIBE_MERGED_NEWSONLY_ACCT);
          } else {
            if (!empty(
    $newsletter)) {
              
    $sql "INSERT INTO " TABLE_SUBSCRIBERS 
                      (customers_id, email_address, email_format, confirmed, subscribed_date)
                      VALUES ('" 
    . (int)$_SESSION['customer_id'] . "', '" zen_db_input($email_address) . "', '" zen_db_input($email_format) . "', '1', now())";
              
    $db->Execute($sql);
            }
          }
        }
    // END newsletter_subscribe mod 1/1 
    I was having the same issue in getting the "1062 Duplicate entry" error when a newsletter subscriber then tried to create an account. This has resolved the issue for me. It does shorten the section of code a fair amount, so hopefully no side effects.

    Should this fix by @kamelion0927 be updated in the plugin release?

  9. #1149
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Newsletter-Only Subscriptions for v1.3x

    Quote Originally Posted by millsii View Post
    I was having the same issue in getting the "1062 Duplicate entry" error when a newsletter subscriber then tried to create an account. This has resolved the issue for me. It does shorten the section of code a fair amount, so hopefully no side effects.

    Should this fix by @kamelion0927 be updated in the plugin release?
    I've been using this mod for some time, but during one of my upgrades the create account side wasn't working to catch existing subscriptions. I tried adding your code and no luck on that ether. Going back to what I needed it to do, I came up with this change.
    Code:
    // BEGIN newsletter_subscribe mod 1/1 
    // If a newsletter only account exists we update the info, 
    // If not and the new user selected subscribe we add them to the list
     
       if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') && (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) { 
        
          $check_subscribers_sql = "select email_address from " . TABLE_SUBSCRIBERS . " where email_address = :email:";       
          $check_subscribers_query = $db->bindVars($check_subscribers_sql, ':email:', $email_address, 'string');       
          $check_subscribers = $db->Execute($check_subscribers_query); 
     
          if ($check_subscribers->fields['email_address'] != '') {
            // update Subscriber with new customer ID 
            $sql = "UPDATE " . TABLE_SUBSCRIBERS . " 
                     SET customers_id = :customer_id: 
                     WHERE email_address = :email_address:"; 
             $sql = $db->bindVars($sql, ':customer_id:', (int)$_SESSION['customer_id'], 'integer'); 
             $sql = $db->bindVars($sql, ':email_address:', $email_address, 'string'); 
            $db->Execute($sql); 
            // update the new customer with an active subscription
            $news_query = "UPDATE " . TABLE_CUSTOMERS . " 
                     SET customers_newsletter = 1 
                     WHERE customers_id = :customer_id:"; 
             $news_query = $db->bindVars($news_query, ':customer_id:', (int)$_SESSION['customer_id'], 'integer'); 
            $db->Execute($news_query);
             
          } else {
            if ($newsletter == 1) {
              // new customer subscription we need to add them to our subscription database too
              $sql = "INSERT INTO " . TABLE_SUBSCRIBERS . " (customers_id, email_address, email_format, confirmed, subscribed_date)
                      VALUES ('" . (int)$_SESSION['customer_id'] . "', '" . zen_db_input($email_address) . "', '" . zen_db_input($email_format) . "', '1', now())";
              $db->Execute($sql);
            }
          }  
        }
    /* END newsletter_subscribe mod 1/1 */
    I removed count for matching email address, should only be one and I'm not in a loop. Removed the empty test, it's never empty and I need to know if its a 1. Tested in ZC 1.5.5f and working.
    Dave
    Always forward thinking... Lost my mind!

  10. #1150
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Newsletter-Only Subscriptions for v1.3x

    Does anybody know how I can use Google Recaptcha with this please?

    Contribution found here:

    https://www.zen-cart.com/downloads.php?do=file&id=1455
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 

Similar Threads

  1. Newsletter-Only Subscriptions for v1.3x: reinstall problems
    By sharonmiranda in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 7 Nov 2011, 07:43 PM
  2. Newsletter subscriptions in the code
    By fgabrieli in forum General Questions
    Replies: 4
    Last Post: 19 Aug 2010, 03:30 PM
  3. help with newsletter subscriptions page
    By meesh in forum Customization from the Admin
    Replies: 8
    Last Post: 29 Mar 2009, 06:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR