Zen Cart Logo
Forums / Managing Customers and Orders / Adding an example on the New Account Console - please check my code

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

Locked

Views: 1,147

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 May 2010, 7:33 PM
#1
starksark avatar

starksark

New Zenner

Join Date:
Jul 2009
Posts:
16
Plugin Contributions:
0

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 https://www.starks-ark.com/shop/ - login, create account

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

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

Crystal

6 May 2010, 9:12 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

6 May 2010, 9:20 PM
#3
starksark avatar

starksark

New Zenner

Join Date:
Jul 2009
Posts:
16
Plugin Contributions:
0

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.

7 May 2010, 5:01 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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; ?>
7 May 2010, 6:04 PM
#5
starksark avatar

starksark

New Zenner

Join Date:
Jul 2009
Posts:
16
Plugin Contributions:
0

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.