Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Location
    Altamont, NY USA
    Posts
    25
    Plugin Contributions
    3

    Default How can I increase the 32 character limit in the Checkout Referral Box?

    Can anyone tell me how to increase the amount of text a customer can type into the referral box on the checkout page? It appears to be limited to 32 characters.

    I am using the referral code box simply as a place for customers to leave their comments. It is titled: "OPTIONAL: How did you hear about us?".

    A customer recently wrote "website @ bot. of pic @ work". They meant to say, "I saw your web address printed on the bottom of a poster at work", but couldn't write all that, given the 32 character limit.

    I wonder if I need to increase some field length in my database, however I can find no field labeled "referral ..." , nor would I know how to change the length anyway.

    Can anyone help?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Toronto, Ontario, Canada
    Posts
    183
    Plugin Contributions
    3

    Default Re: How can I increase the 32 character limit in the Checkout Referral Box?

    umm... i'm sure there is a field in the db for it... but without looking for that... why not use: http://www.zen-cart.com/index.php?ma...roducts_id=186 ?
    Ahmad Rahman
    TRUST IT | web site design and development
    mobile: 416.828.0224 | email: [email protected]
    www.trustit.ca

    For IT solutions how you want IT, when you want IT, TRUST IT.

  3. #3
    Join Date
    Jan 2007
    Location
    Altamont, NY USA
    Posts
    25
    Plugin Contributions
    3

    Default Re: How can I increase the 32 character limit in the Checkout Referral Box?

    Thanks, but I have looked at that module in the past and it involves a drop-down box listing choices.

    I want a comment box similar to the one on the shipping instructions page, where a customer can write unlimited text. Is there a way to duplicate the shipping comments box and place it on the first checkout page?

  4. #4

    Default Re: How can I increase the 32 character limit in the Checkout Referral Box?

    postergame,

    I think the simplest way to do this would be to create a new field in create account, and then include that entry in the e-mail you receive from create account success.

    So, first you'd create a form in tpl_modules_create_account.php with something like this:
    Code:
    <?php echo zen_draw_textarea_field('ourReferralBox', '45', '3'); ?>
    I'm not terribly familiar with the inputs of the draw textarea field function, you'll have to change the parameters to fit your needs.

    Then in /includes/modules/yourtemplate/create_account.php, towards the end where it's adding on extra info you'd want to modify:

    Code:
          $extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'] , $account->fields['customers_email_address']);
    
          $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
    such that:
    Code:
          $extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'] , $account->fields['customers_email_address']);
    
          $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 . $_POST['ourReferalBox'] . "\n" . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
        } //endif send extra emails
    For this to work, you have to receive the account creation e-mails, and read them. If you like this and need help tweaking it or such, let me know.

    --Joe
    Last edited by J_Schilz; 18 Mar 2007 at 01:16 AM.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How can I increase the 32 character limit in the Checkout Referral Box?

    Second poster is correct - this is a DB driven field size and to be capable of storing this info you need to increase the var for it in the DB. Zen Cart will auto size the box based on the value in the DB

  6. #6
    Join Date
    Jan 2007
    Location
    Altamont, NY USA
    Posts
    25
    Plugin Contributions
    3

    Default Re: How can I increase the 32 character limit in the Checkout Referral Box?

    J_Schilz

    Thanks for your hard work.

    kobra

    Thanks for confirming the field limitation in the php database. I searched harder and found customers > customers_referral and was able to change the field length there. Much better!

    Zencart does not automatically resize the field on my form. I changed the form length in the tpl create account module, under zen_set_field_length.

    Do you know the code to make the display box several lines taller? Can I add a set_field_height or something? I couldn't manage to find the code description for the shipping comments box, to copy it.

    Thanks!

 

 

Similar Threads

  1. v150 How can I increase the width of the display so my text area has more width.
    By westdh in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Aug 2012, 12:50 PM
  2. Increase Products Model character limit when adding a new product.
    By gloerick in forum Customization from the Admin
    Replies: 3
    Last Post: 27 Feb 2012, 06:54 PM
  3. How can I hide the Special instructions box on checkout?
    By benn600 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 26 Feb 2010, 01:08 PM
  4. How can I get rid of the spaces between the banners in the side box?
    By cgardner in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Oct 2007, 03:05 AM
  5. How do i increase the hight of the produkt box
    By mgrefsrud in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Sep 2007, 09:57 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