Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
  1. #21
    Join Date
    Dec 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: Create User account - Getting 500 Error

    Quote Originally Posted by beep View Post
    Hello, some friends gave me a hand...
    We isolated the issue to the create_account.php file. I commented out the section directly after sending the welcome email, about sending out additional emails that didn't seem essential in this case. The next line of code was the redirect to the create_account_success page. This now executed successfully and the user goes to the Account created successfully page.
    Congrats! This could be a good resource for people...

    Quote Originally Posted by beep View Post
    We're slightly concerned that this is a 'quick fix' and whether something else should be changed. I am now obviosly no longer cc'd into the new customer's welcome emails.
    Could you post the code, with the remmed out portion? Perhaps I or someone else could look over it...

    Quote Originally Posted by beep View Post
    I was unable to find a way to repair the mySQL database from the admin options so this is still outstanding.
    It seems if it ain't broke don't fix it... if everything's working now I wouldn't worry about repairing your db...

    matt

  2. #22
    Join Date
    Nov 2008
    Location
    London
    Posts
    94
    Plugin Contributions
    0

    Default Re: Create User account - Getting 500 Error

    Quote Originally Posted by zpyder View Post
    Congrats! This could be a good resource for people...

    Could you post the code, with the remmed out portion? Perhaps I or someone else could look over it...

    matt
    cool cool. Here are the relevent bits from the create_account files. These are the ony edits I have made to these files.

    PHP Code:
        // add in regular email welcome text
        
    $email_text .= "\n\n" EMAIL_TEXT EMAIL_CONTACT EMAIL_GV_CLOSURE;

        
    $html_msg['EMAIL_MESSAGE_HTML']  = str_replace('\n','',EMAIL_TEXT);
        
    $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\n','',EMAIL_CONTACT);
        
    $html_msg['EMAIL_CLOSURE']       = nl2br(EMAIL_GV_CLOSURE);

        
    // include create-account-specific disclaimer
        
    $email_text .= "\n\n" sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMERSTORE_OWNER_EMAIL_ADDRESS). "\n\n";
        
    $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER'<a href="mailto:' STORE_OWNER_EMAIL_ADDRESS '">'STORE_OWNER_EMAIL_ADDRESS .' </a>');

        
    // send welcome email
        
    zen_mail($name$email_addressEMAIL_SUBJECT$email_textSTORE_NAMEEMAIL_FROM$html_msg'welcome');

        
    // send additional emails
    //    if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO !='') {
    //      if ($_SESSION['customer_id']) {
    //        $account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
    //                            from " . TABLE_CUSTOMERS . "
    //                            where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

    //        $account = $db->Execute($account_query);
    //      }

    //      $extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
    //      $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
    //      zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT,
    //      $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
    //    } //endif send extra emails

        
    zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS'''SSL'));

      } 
    //endif !error


  3. #23
    Join Date
    Dec 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: Create User account - Getting 500 Error

    These alterations look totally valid to me and I see no reason why you should worry about them.

    If you want to have the system send you a simple message that says "Someone has placed on order" you could hardcode something like this in there:

    $email_text = "This order is to inform you that an order has been placed on www.something.com

    To view the order, please log in to www.something.com/admin.or.whatever/
    ";
    zen_mail('', '[Your email address]', 'Order placed', $email_text, STORE_NAME, EMAIL_FROM, '', '');

    I don't know what the last two variables for the zen_mail() function are supposed to be, so I just put them as '' - this may cause a problem, so if it doesn't work, mess around with it if you feel like.

    Best of luck!

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Create User account from Admin
    By niccol in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 17 Feb 2012, 05:46 PM
  2. Create Account PHP 500 error
    By karimm in forum General Questions
    Replies: 12
    Last Post: 30 Sep 2010, 06:48 PM
  3. HTTP 500 Error on Create An Account
    By Clue5377 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 18 Aug 2008, 02:06 AM
  4. User Cannot Create Account. HELP!
    By yxw168 in forum General Questions
    Replies: 3
    Last Post: 19 Feb 2007, 08:24 PM
  5. Create user account
    By yorkc in forum Managing Customers and Orders
    Replies: 8
    Last Post: 4 Feb 2007, 03:35 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