Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    16
    Plugin Contributions
    0

    Default Adding an example on the New Account Console - please check my code

    Okay, I've managed to figure most of what I needed out, thanks to you guys, but my CSS training just isn't where my HTML training was (out of school too long, I guess), and I'm missing something here, so if someone could tell me what character I've got backwards, please do so.

    Mission:
    to add an "eg. ____" to a field that doesn't have one at the moment

    I've found and reworded the renewal question and title the way I need it to read. If someone could tell me what the CSS code is to make my second line of the question format as a label instead of as a Header, that would be wonderful, but that will work the way it is.

    *the coding on that is here:
    Line #627 : define('TEXT_REFERRAL_DETAILS', 'Cash Affiliates or Animals for Education');
    Line #190 : <legend><?php echo TEXT_REFERRAL_DETAILS; ?></legend>

    I started trying to make it label instead of legend, but as i didn't have a field to connect it to, I went the cowardly way. At least it's there, even if it is larger than I want it to be.*

    What I need now is to add after the referral code entry box the following text:
    eg. Education Program - Cary Elementary K-205

    I defined a field according to the field definition of the DOB example on that module, namely:

    Line #227 : define('ENTRY_CUSTOMERS_REFERRAL_TEXT','eg. Education Program - Cary Elementary K-205');

    Now how do I code the template module create account page to show this field? I tried copying the DOB code for the example line, but as the code does not exactly correlate (DOB is required, other fields don't make sense to me, etc), I got a syntax error and the create accounts screen came up blank on my test.

    Anyone who needs to see the actual page, it's www.starks-ark.com/shop/ - login, create account

    If someone could give me the proper coding on this . . . it would make me sooooo

    Thanks ever so much for your patience! I promise to give back as soon as I figure this out myself.

    Crystal

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

    Default Re: Adding an example on the New Account Console - please check my code

    What I need now is to add after the referral code entry box the following text:
    eg. Education Program - Cary Elementary K-205
    Have you added a DB record to house this info?
    To display it seek thr create account form that is a combi html with php
    There might be other places where it might require to be displayed and their associated files
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2009
    Posts
    16
    Plugin Contributions
    0

    Default Re: Adding an example on the New Account Console - please check my code

    There's no new DB record needed, as I'm using the Referral type 2 record and I increased the field size. This is going in the currently existing referral box. I will be bugging somebody soon to help me add an additional box to the DB, but for now I'm just working with what's there.

    I know it's in the file templates/tpl_modules_create_account.php, I'm just not sure how to code/label the line so that it has a display for the defined field 'ENTRY_CUSTOMERS_REFERRAL_TEXT'. I've put the field into every record that has referral definitions, both default template and the template I'm using.

    I did the same coding in the same locations with the 'TEXT_REFERRAL_DETAILS' field, and as soon as the coding for "echo" was placed into the tpl_modules_create_account.php file, the field I had defined elsewhere was where I needed it to be. Should be the same thing with this field. I just need to know the right wording to place it either after the box on the right side of the screen or below the box. With the one I did successfully, I was copying a heading and that's an unconnected type. Unfortunately, labels ARE connected types and I don't know how to do them in CSS yet.

    Thanks.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Adding an example on the New Account Console - please check my code

    The way I understand what you've written is that you want the value you've defined for ENTRY_CUSTOMERS_REFERRAL_TEXT to show in your template.
    So, in your template file, simply add a PHP echo statement, just like all the others:

    <?php echo ENTRY_CUSTOMERS_REFERRAL_TEXT; ?>
    .

    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.

  5. #5
    Join Date
    Jul 2009
    Posts
    16
    Plugin Contributions
    0

    Default Re: Adding an example on the New Account Console - please check my code

    Thanks! I changed it up a little bit, but you definitely gave me the right direction to go in.

 

 

Similar Threads

  1. How do I get my new payment module to check the return code?
    By hasnut in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Jun 2010, 08:52 PM
  2. Please check that your Zip Code is entered correctly...
    By ksolito in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 17 Nov 2009, 12:18 AM
  3. Check this code please..error somewhere
    By strelitzia in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Oct 2008, 03:16 PM
  4. Can someone please check this code!
    By Vood in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2007, 02:04 AM
  5. Edit/Update Account Doesn't Work after Adding a new Account Field
    By webomat in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 19 Apr 2007, 04:51 AM

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