Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Add Customers from Admin

    I've just installed this conrib and have a problem.

    Installed, working fine except when I click 'insert' I get this error:
    Fatal error: Call to undefined function zen_create_coupon_code() in /home/PATH/TO/ADMIN/add_customers.php on line 325

    Line 325 is:
    $coupon_code = zen_create_coupon_code();

    Which is in:
    if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
    $coupon_code = zen_create_coupon_code();
    $insert_query = $db->Execute("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
    $insert_id = $db->Insert_ID();
    $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" . $email_address . "', now() )");

    This occurs whether I enter a code or not.

    Also, if I make a mistake when entering details, an error displays (which is good) but when I correct the error and click 'insert again' it says that the email address already exists. I am then stuck on the same page but the customer has been created.

    Any way to get this sorted?

    I am using 1.3.8a and the error is with both versions whether I enter a voucher code or not.
    Last edited by bigbadboy; 13 Apr 2008 at 02:16 AM.

  2. #2
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: Add Customers from Admin

    An update on this.

    I commented out the lines:
    if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
    $coupon_code = zen_create_coupon_code();
    $insert_query = $db->Execute("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
    $insert_id = $db->Insert_ID();
    $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" . $email_address . "', now() )");

    and the } on line 374

    And it now seems to work fine.
    The email is created and sent.

    Obviously I need to adjust the email but it mentions a gift voucher. I have created a test coupon (which is the same as mentioned) but didn't include it when I signed up the new customer. Worryingly the URL for the gift voucher is a link to admin which is actually a 404.

    Well .. at least it works now!


 

 

Similar Threads

  1. v150 Add customers from Admin
    By logic1 in forum Customization from the Admin
    Replies: 9
    Last Post: 28 Aug 2015, 07:08 AM
  2. v150 Add Customers from Admin
    By elepepe in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Jul 2012, 08:59 AM
  3. add customers from admin
    By stevebrett in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 15 May 2009, 02:24 AM
  4. Add Customers from Admin
    By stevebrett in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 16 Mar 2009, 05:39 PM
  5. Add Customers from admin
    By Astarkley in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 4 Sep 2008, 11:37 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