Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    v1.3.0 / v1.3.0.1 How to send test newsletter to self

    IF YOU ARE USING v1.3.0.0, or v1.3.0.1, the following may be of benefit.
    Versions v1.3.0.2 and higher have this ALREADY built-in.


    A few code changes will help you send a test newsletter to the email address of your current Admin account:

    1. via phpMyAdmin or Install SQL Patches, run the following SQL statement:
    Code:
    INSERT INTO query_builder ( query_id , query_category , query_name , query_description , query_string ) VALUES ( NULL, 'email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select \'ADMIN\' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id');
    2. edit /includes/functions/audience.php. Around line 99 you find the following block:
    PHP Code:
    function parsed_query_string($read_string) {
       
    // extract table names from sql strings, so that prefixes are supported.
       // this will also in the future be used to reconstruct queries from query_keys_list field in query_builder table.

      
    $allwords explode" "$read_string );
      
    reset$allwords );
      while( list( 
    $key$val ) = each$allwords ) ) {
        
    // find "{TABLE_" and extract that tablename
        
    if( substr$val07) == "{TABLE_"  && substr$val, -1) == "}" ) { //check for leading and trailing {} braces
        
    $val substr$val2strlen($val)-2);  // strip off braces.  Could also use str_replace(array('{','}'),'',$val);
        //now return the value of the CONSTANT with the name that $val has.  ie: TABLE_CUSTOMERS = zen_customers
        
    $val constant($val);
        } elseif ( 
    substr$val06) == "TABLE_" ) {
        
    //return the value of the CONSTANT with the name that $val has.  ie: TABLE_CUSTOMERS = zen_customers
        
    $val constant($val);
        }
        
    $good_string .= $val.' ';
       }
       return 
    $good_string;

    replace that with this:
    PHP Code:
    function parsed_query_string($read_string) {
      
    // extract table names from sql strings, so that prefixes are supported.
      // this will also in the future be used to reconstruct queries from query_keys_list field in query_builder table.

      
    $allwords explode" "$read_string );
      
    reset$allwords );
      while( list( 
    $key$val ) = each$allwords ) ) {
        
    // find "{TABLE_" and extract that tablename
        
    if( substr$val07) == "{TABLE_"  && substr$val, -1) == "}" ) { //check for leading and trailing {} braces
          
    $val substr$val2strlen($val)-2);  // strip off braces.  Could also use str_replace(array('{','}'),'',$val);
          //now return the value of the CONSTANT with the name that $val has.  ie: TABLE_CUSTOMERS = zen_customers
          
    $val constant($val);
        } elseif ( 
    substr$val06) == "TABLE_" ) {
        
    //return the value of the CONSTANT with the name that $val has.  ie: TABLE_CUSTOMERS = zen_customers
          
    $val constant($val);
        } elseif ( 
    substr$val09) == '$SESSION:' ) {
          
    //return the value of the SESSION var indicated
          
    $param str_replace('$SESSION:'''$val);
          
    $val $_SESSION[$param];
        }
        
    $good_string .= $val.' ';
       }
       return 
    $good_string;

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Mar 2006
    Posts
    117
    Plugin Contributions
    0

    Default Re: v1.3.0 / v1.3.0.1 How to send test newsletter to self

    Works Great! Thx Doc B.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: v1.3.0 / v1.3.0.1 How to send test newsletter to self

    NOTE: This is ALREADY BUILT-IN to Zen Cart v1.3.0.2 and higher.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Feb 2004
    Posts
    49
    Plugin Contributions
    0

    Re: v1.3.0 / v1.3.0.1 How to send test newsletter to self

    Hi

    i followed the above instructions > still selects whole mailing list rather than just administrator

    can you offer any help?

    thanks

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: v1.3.0 / v1.3.0.1 How to send test newsletter to self

    What options do you have in the audience pull-down list?
    What version of Zen Cart are you using?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Feb 2004
    Posts
    49
    Plugin Contributions
    0

    Default Re: v1.3.0 / v1.3.0.1 How to send test newsletter to self

    hi version 1.3.0.1

    and the options are

    all newsletter subscribers
    dormant customers > 3 months
    acitve customers in past 3 months (subscribers)
    acitve customers in past 3 months (regardless of subscription status)
    administrator


    any ideas

    thanks

 

 

Similar Threads

  1. v151 How to send Newsletter to groups of customers
    By jodean in forum General Questions
    Replies: 3
    Last Post: 8 Sep 2015, 01:56 AM
  2. how to create test group for newsletter
    By kristad in forum General Questions
    Replies: 0
    Last Post: 23 Dec 2010, 02:17 AM
  3. How to send newsletter in HTML?
    By lina0962 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 16 Nov 2010, 08:56 PM
  4. Self Test Order Emails
    By GottaGoMedia in forum Managing Customers and Orders
    Replies: 1
    Last Post: 29 Oct 2010, 06:14 PM
  5. How to send newsletter to all please?
    By snowy2007 in forum General Questions
    Replies: 5
    Last Post: 23 Dec 2008, 03:38 PM

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