Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Code showing in welcome email after installing Captcha v. 2.9 11.08.2008

    Hi All,

    I have just noticed in our welcome emails for new customer there is some code showing up where it tells the new customer they have a 10% discount coupon for signing up it shows up either just before or just after the code word and its TEXT_COUPON_HELP_DATE This shows up in html and plain text emails.

    I have done a site wide search and found all the files this code appears in but can not for the life of me see anything missing or added ! just wondering if anyone had any suggestions I could try to solve this please

    Kind Regards

    Paul

    If someone wants to look / sign up to see this happening our site is http://www.pandtaromaticcandles.com.au/candles

    We are using Zen Cart 1.3.7

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Code showing in welcome email

    .

    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.

  3. #3
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email

    Thanks DrByte have looked at that and will re-check all files when I find the solution I will post here for others

    Kind Regards

    Paul

  4. #4
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email

    Hi all Again!

    I am sorry to be so dumb at the moment but I have looked and looked and looked through every file to try and spot the problem with our welcome/new customer emails and can not find anything wrong! i can not find any white space, extra lines, wrong code and so on (well not that I can see anyway) I think it needs someone with a brain to take a look at cause my brain is frazzled

    The emails had been coming through to the customer and the admin copy just fine this started after installing Captcha v. 2.9 11.08.2008 I have also checked through all these files and could not find anything wrong. Not that I am an expert at all with php I know the bare basic's only anyway this is what is showing up in the welcome emails. The text in red is the problem and i dont know where else to go from here. So if anyone has an idea as to what i need to that would be fabulous

    --------HTML Emails--------------
    Congratulations! To make your next visit to our online shop a more rewarding experience, listed below are details for a Discount Coupon created just for you!

    As a new customer to P and T Aromatic Candles, we would like to offer you 10% off your first purchase. Simply type in the word WELCOME and this amount will be automatically deducted from your order.
    To use the Discount Coupon, enter the Redemption Code code during checkout: WELCOMETEXT_COUPON_HELP_DATE

    ------------Plain Text Email---------------

    We wish to welcome you to P & T Aromatic Candles.
    Congratulations! To make your next visit to our online shop a more rewarding
    experience, listed below are details for a Discount Coupon created just for
    you!

    As a new customer to P and T Aromatic Candles, we would like to offer you
    10% off your first purchase. Simply type in the word WELCOME and this
    amount will be automatically deducted from your order.

    TEXT_COUPON_HELP_DATE

    To use the Discount Coupon, enter the Redemption Code code during checkout:
    WELCOME

  5. #5
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email

    Hi All,

    Just wondering the 2nd last line where the code . $text_coupon_help; is should that read like this . =$text_coupon_help;

    This is in the module/custom/create_account php file


    PHP Code:
    if (NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
          
    $coupon_id NEW_SIGNUP_DISCOUNT_COUPON;
          
    $coupon $db->Execute("select * from " TABLE_COUPONS " where coupon_id = '" $coupon_id "'");
          
    $coupon_desc $db->Execute("select coupon_description from " TABLE_COUPONS_DESCRIPTION " where coupon_id = '" $coupon_id "' and language_id = '" $_SESSION['languages_id'] . "'");
          
    $db->Execute("insert into " TABLE_COUPON_EMAIL_TRACK " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" $coupon_id ."', '0', 'Admin', '" $email_address "', now() )");

          
    $text_coupon_help .= sprintf(TEXT_COUPON_HELP_DATEzen_date_short($coupon->fields['coupon_start_date']),zen_date_short($coupon->fields['coupon_expire_date']));

          
    // if on, add in Discount Coupon explanation
          //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
          
    $email_text .= "\n" EMAIL_COUPON_INCENTIVE_HEADER .
          (!empty(
    $coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" '') . $text_coupon_help  "\n\n" .
          
    strip_tags(sprintf(EMAIL_COUPON_REDEEM' ' $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;

          
    $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER ;
          
    $html_msg['COUPON_DESCRIPTION']     = (!empty($coupon_desc->fields['coupon_description']) ? '<strong>' $coupon_desc->fields['coupon_description'] . '</strong>' '');
          
    $html_msg['COUPON_TEXT_TO_REDEEM']  = str_replace("\n"''sprintf(EMAIL_COUPON_REDEEM''));
          
    $html_msg['COUPON_CODE']  = $coupon->fields['coupon_code'] . $text_coupon_help;
        } 
    //endif coupon 
    Last edited by P&T Aromatic Candles; 25 Aug 2008 at 10:51 AM. Reason: left something out

  6. #6
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email

    P.s. I just noticed that at the bottom of the original modules/create_account php there are 2 lines that are not included in the modules/custom/create_account php these are.

    PHP Code:
    if (!isset($email_format)) $email_format = (ACCOUNT_EMAIL_PREFERENCE == '1' 'HTML' 'TEXT');
      if (!isset(
    $newsletter))   $newsletter = (ACCOUNT_NEWSLETTER_STATUS == '1' false true); 
    Would they affect what comes out in the welcome emails ? maybe someone who knows a bit about Captcha may be able to tell me why this is not in the custom file ? and does it need to be ?

  7. #7
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email after installing Captcha v. 2.9 11.08.2008

    Sorry to keep adding to this but I keep forgetting to add extra info and while I am still trying to work out this problem i remember what I should have said !

    The only email this code is showing in is the welcome email for new customers. I have gone into admin and sent a discount coupon from there and the code does not show in the email but does have the "welcome" code for the customer to use, all other emails sent from the site are fine.

    everything else on our website works fine this is the last and only thing to fix does anyone know what file in the Captcha add on this may be coming from ? I have checked them all but with my very limited knowledge I can not seem to see anything wrong ANY help would be greatly appreciated

    Kind Regards

    Paul

  8. #8
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email after installing Captcha v. 2.9 11.08.2008

    Hi All,

    Well i went into admin and turned off Captcha on the sign up to see if that was actually causing the problem and it looks like it is Not Captcha as I am still getting the code in emails Ho Hum! back to checking the code for mistakes sorry for all the useless posts before hand I will however post back here once I have fixed it just in case anyone else ends up with the same prob

  9. #9
    Join Date
    Jan 2008
    Location
    Brisbane Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Code showing in welcome email after installing Captcha v. 2.9 11.08.2008 (FIXED)

    OK!! I finally found the problem it was with a change made in the \includes\modules\YOUR_TEMPLATE\create_account php from the Captcha installation

    Original create_account php from Captcha v. 2.9 11.08.2008
    PHP Code:
    // initial welcome
        
    $email_text .=  EMAIL_WELCOME;
        
    $html_msg['EMAIL_WELCOME'] = str_replace('\n','',EMAIL_WELCOME);

        if (
    NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
          
    $coupon_id NEW_SIGNUP_DISCOUNT_COUPON;
          
    $coupon $db->Execute("select * from " TABLE_COUPONS " where coupon_id = '" $coupon_id "'");
          
    $coupon_desc $db->Execute("select coupon_description from " TABLE_COUPONS_DESCRIPTION " where coupon_id = '" $coupon_id "' and language_id = '" $_SESSION['languages_id'] . "'");
          
    $db->Execute("insert into " TABLE_COUPON_EMAIL_TRACK " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" $coupon_id ."', '0', 'Admin', '" $email_address "', now() )");

          
    $text_coupon_help sprintf(TEXT_COUPON_HELP_DATEzen_date_short($coupon->fields['coupon_start_date']),zen_date_short($coupon->fields['coupon_expire_date']));

          
    // if on, add in Discount Coupon explanation
          //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
          
    $email_text .= "\n" EMAIL_COUPON_INCENTIVE_HEADER .
          (!empty(
    $coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" '') . $text_coupon_help  "\n\n" .
          
    strip_tags(sprintf(EMAIL_COUPON_REDEEM' ' $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;

          
    $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER ;
          
    $html_msg['COUPON_DESCRIPTION']     = (!empty($coupon_desc->fields['coupon_description']) ? '<strong>' $coupon_desc->fields['coupon_description'] . '</strong>' '');
          
    $html_msg['COUPON_TEXT_TO_REDEEM']  = str_replace("\n"''sprintf(EMAIL_COUPON_REDEEM''));
          
    $html_msg['COUPON_CODE']  = $coupon->fields['coupon_code'] . $text_coupon_help;
        } 
    //endif coupon 
    Edited create_account php
    PHP Code:
    // initial welcome
        
    $email_text .=  EMAIL_WELCOME;
        
    $html_msg['EMAIL_WELCOME'] = str_replace('\n','',EMAIL_WELCOME);

        if (
    NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
          
    $coupon_id NEW_SIGNUP_DISCOUNT_COUPON;
          
    $coupon $db->Execute("select * from " TABLE_COUPONS " where coupon_id = '" $coupon_id "'");
          
    $coupon_desc $db->Execute("select coupon_description from " TABLE_COUPONS_DESCRIPTION " where coupon_id = '" $coupon_id "' and language_id = '" $_SESSION['languages_id'] . "'");
          
    $db->Execute("insert into " TABLE_COUPON_EMAIL_TRACK " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" $coupon_id ."', '0', 'Admin', '" $email_address "', now() )");

    // if on, add in Discount Coupon explanation
          //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
          
    $email_text .= "\n" EMAIL_COUPON_INCENTIVE_HEADER .
          (!empty(
    $coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" '') .
          
    strip_tags(sprintf(EMAIL_COUPON_REDEEM' ' $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;

          
    $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER ;
          
    $html_msg['COUPON_DESCRIPTION']     = (!empty($coupon_desc->fields['coupon_description']) ? '<strong>' $coupon_desc->fields['coupon_description'] . '</strong>' '');
          
    $html_msg['COUPON_TEXT_TO_REDEEM']  = str_replace("\n"''sprintf(EMAIL_COUPON_REDEEM''));
          
    $html_msg['COUPON_CODE']  = $coupon->fields['coupon_code'];
        } 
    //endif coupon 
    These are the lines I removed as this is what was making it show up in email.

    Starting from top down:

    PHP Code:
     $text_coupon_help  "\n\n" .


    $text_coupon_help sprintf(TEXT_COUPON_HELP_DATEzen_date_short($coupon->fields['coupon_start_date']),zen_date_short($coupon->fields['coupon_expire_date']));


     . 
    $text_coupon_help
    I hope everyone can understand what I did and that it may help someone else if they have the problem after installing Captcha which by the way is a fantastic add-on

    Kind Regards

    Paul

  10. #10
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Code showing in welcome email after installing Captcha v. 2.9 11.08.2008 (FIXED)

    Further to the FAQ mentioned earlier, it would be more appropriate to add the missing define to your language file, rather than deleting functionality.
    Granted, if you never use coupons, then feel free to hack out anything you want related to them. Just be aware that you're making upgrades more difficult later.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. This is an excellent time to panic... - can't login after installing captcha
    By szarin in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 2 Jun 2011, 09:20 PM
  2. welcome email giving expired coupon code
    By engine411 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 20 Oct 2009, 06:02 PM
  3. Sending welcome email after activation
    By tapsilog in forum Customization from the Admin
    Replies: 3
    Last Post: 23 Mar 2009, 04:57 PM
  4. Errors after installing Captcha & email problems
    By gretzlertech in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 14 Apr 2007, 04:53 PM

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