Jump to content
Sign in to follow this  
kit

Customers extra fields

Recommended Posts

Well... I'm slightly closer to adding the extra fields into the Customer Orders area. I think once we figure out how to do this... we can add it to other areas as well...

 

Here's what I have done:

 

added the following code to the orders.php file:

 

<td class="main"></td><?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?>

 

I created a new table after the code for payment method and credit cards...it begins on line 206 and looks like this

 

<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

 

<tr>

<td colspan="3"><?php echo tep_draw_separator(); ?></td>

</tr>

<tr>

<td class="main" valign="top"><b>Order Details</b></td>

<td class="main"></td><?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?>

</tr>

</table></td>

 

This produces all of the extra fields... but sadly, without the text input from the customer.

 

I thought maybe this could help someone more experienced than myself figure out a way to make this happen....

 

...Aaron

Share this post


Link to post
Share on other sites

Has anyone figured out how to add the extra field onto the invoice? Thank you, for the Great Contrib.

If noone has done it yet, anyone have a starting point?

 

Todd

Share this post


Link to post
Share on other sites

Hello

 

I would like to add the extra field in my checkout_process.php file, in " lets start with the email confirmation " part, for the confirmation order email.

 

Thank for help

 

;-)

Share this post


Link to post
Share on other sites

Is there anyone on this support thread that actually knows anything about this contribution? I haven't seen a working solution posted in more than 3 months!

Share this post


Link to post
Share on other sites

I'm getting the same error and I found no solution:

 

1146 - Table 'kmberly_kmberly333.TABLE_EXTRA_FIELDS' doesn't exist

select count(*) as total from TABLE_EXTRA_FIELDS ce, TABLE_EXTRA_FIELDS_INFO cei where cei.fields_id=ce.fields_id and cei.languages_id =1

[TEP STOP]

 

Does anyone know the solution to this?


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

I redone steps 3-6 and now it's working. Now I can finally say that this is a great contrib. Congratulations!


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

New "little" problem:

 

The new fields I add from Admin don't show up when I receive an order (in Show Order Details), not even if I enter Customer Details.

 

What should I do?


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

In your admin go to Administrator - file access and add the php modules that you installed. They are sorted by directory..

 

 

Hi All,

Very nice contribution Kit! Thanks a lot.

 

I installed the extra fields contribution over an Admin contribution. when in the admin screen and i click on the extra fields manager link I get this error

"Access Denied

 

No Right Permission Access

Please contact your Web Administrator to request

more access or if you found any problem. "

 

even though i have all the rights. I am not sure how to bypass this.

 

Any help would be appreciated.

 

Thanks in advance

-Tman

Share this post


Link to post
Share on other sites

I'm not sure I understand what you're telling me to do. Can u be more explicit please?


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

No one knows the answer to this problem?! :(


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Curious to know.

 

I was looking to add a "How'd you find the site" field. and I wanted to do soemthing nifty like like have a lsit of viable options for the user. IS that possible? btw I successfully installed the mod, your instructions were excellent. Great mod. trying to find other ways to sue the mod... but drawing blanks... maybe i need more coffee. any light that youc an shed on the topic would be rgeatly appreciated.

 

~J


We must be the change we wish to see in the world.

------------------------------------------------------------

p.s. BACKUP!

Share this post


Link to post
Share on other sites

hello, it is a nice contrib. thanks but it only creat field each other: i mean..

when i creat a field it creat like that:

 

name

full name

 

And i want one after the adress:

company owner: _____

 

 

and one the after newsletter

newsletter: X

extra field: _____

 

How can i do that? thanks!

Share this post


Link to post
Share on other sites

Very easy installation. Thanks for writing this.

 

Has anyone in this forum modified this contribution to include these handy features?

 

1) Other field types besides INPUT TEXT and TEXTAREA. I'm especially interested in radio buttons.

2) Comments after the fields (such as "enter to initials to approve automatic annual renewal").

 

Thanks. I can definitely come up with workarounds or even code this myself, but I'd rather not reinvent the wheel.

 

Bruce

Share this post


Link to post
Share on other sites

Dear Kit.

Wanted to let you know that you did a great job with this contribution. One thing though. If there is any link in admin to use this contribution i can't see it. Maybe my admin is kinda messed up and I do beliebe that it's so cause it only works on specific browsers :blush: So if the contrib does contain a link in admin, please specify for the novices that might go through the same trouble, that they can access the contrib via navbar.

ex: http://mysite/admin/extra_fields.php.

Took a while till i found that out :D

Share this post


Link to post
Share on other sites

I have followed all the steps and there no errors when I run the admin panel.

 

 

 

But I do not see any way to use this Contibution exter fields. I go to the customer area

 

and there is no controls for the addon / where are they located?

 

 

 

Lost Again

 

Thanks

Share this post


Link to post
Share on other sites
New "little" problem:

 

The new fields I add from Admin don't show up when I receive an order (in Show Order Details), not even if I enter Customer Details.

 

What should I do?

 

Has anyone found a fix for this problem?


Sorry for my bad english language!

Share this post


Link to post
Share on other sites
I have followed all the steps and there no errors when I run the admin panel.

But I do not see any way to use this Contibution exter fields. I go to the customer area

and there is no controls for the addon / where are they located?

 

OK I located the Page / not in the menu http://mysite/admin/extra_fields.php. / need to fix that.

 

Now that I have located the right page. Why does all the headers look like this

 

 

 

HEADING_TITLE

 

TABLE_HEADING_FIELDSTABLE_HEADING_STATUSTABLE_HEADING_ACTION]

Share this post


Link to post
Share on other sites

So, my problem is:

 

When a customer enters his/her's social security number it doesn't show in Admin/Customers nor in invoice. If I enter that customer's account and modify myself that social security number it's not remembered by the Admin, it turns blank i f I re-enter customer's account after the operation.

 

Any one know what's the problem??


Sorry for my bad english language!

Share this post


Link to post
Share on other sites

Hello all.

 

Quick question about this contribution.

 

Does this allow to manipulate only the new fields? Or will I be able to add/edit/delte and set the required status on teh default osC Customer Fields?

 

Thank you,

 

Arkady


People dont change, people realize.

Share this post


Link to post
Share on other sites

To make it clear: your suposed to enter you site address /admin then /extra_fields.php and click enter.

 

 

The right link for using the contribution is http://mysite/admin/extra_fields.php

IMPORTANT: Replace mysite with the name of your site (for ex: www.george.com, www.hereiam.ro, nowww.eu)

ITS NOT extra fields.php its extra_fields.php !!remember to put the underscore

Edited by Vantalk

Share this post


Link to post
Share on other sites

I seem to found out a solution (at least for desperate guys :blush: ) to make extra_fields contrib show in e-mail confirmation and almost anywhere you want it.

 

Here is what i did:

 

1. In file english.php add:

 

define('SHOW_EXTRA_FIELDS', tep_get_extra_fields($customer_id, $languages_id));

 

Do this in any other language file.

 

2. In checkout_process.php find the line:

 

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

3. After add (you can add it anywhere else in the file between the two comments: // lets start with the email confirmation; // send emails to other people):

 

$email_order.="\n". SHOW_EXTRA_FIELDS . "\n";

 

Downsize of this: It makes kinda of a big space before it shows the fields, has a small i dono what that is and can be edited as normal fields.. at least you can't save changes.

 

You can add the constant SHOW_EXTRA_FIELDS in almost anywhere where you want to make the completed fields show up.

Share this post


Link to post
Share on other sites

What can i say.. it kinda looks ugly but it shows up the completed fields.. So if there is anyone with more knoledge to tell me how can i make the confirmation e-mail show the extra_fields only to me and not the customer?

Also i believe the big space and the small thingy at the finish is caused by the fact that the fields where put in a box (as in create account).. How can i get rid of the borders of that box in create account?

 

Any help would be hugely apreciated. :blush:

Share this post


Link to post
Share on other sites

Ok. So i diged some more.. to make everything look better in create account and in the email confirmation you have to modify general.php found in /includes/functions/general.php.

I simply removed the table tags.. So this is how it looks now for me:

function tep_get_extra_fields($customer_id,$languages_id){
	  $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
	  $extra_fields_string ='';
	  if(tep_db_num_rows($extra_fields_query)>0){
		  $extra_fields_string .= '<td>
								 <tr class="infoBoxContents"><td>';
		 while($extra_fields = tep_db_fetch_array($extra_fields_query)){
			  $value='';
			  if(isset($customer_id)){
					  $value_query = tep_db_query("select value from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id . " and fields_id=" . $extra_fields['fields_id']);
					  $value_info = tep_db_fetch_array($value_query);
					  $value = $value_info['value'];
			  }
			  $extra_fields_string .='<tr>
									<td class="main" valign="top">' . $extra_fields['fields_name'] . ': </td>
									<td class="main" valign="top">' . (($extra_fields['fields_input_type']==0) ? tep_draw_input_field('fields_' . $extra_fields['fields_id'],$value) : tep_draw_textarea_field('fields_' . $extra_fields['fields_id'], 'soft', 50, 6,$value,'style="width:400px;"')) . ' ' . (($extra_fields['fields_required_status']==1) ? '<span class="inputRequirement">*</span>': '') .'</td>
									</tr>';
		 }
		 $extra_fields_string .= '</td></tr></td></tr>';
		 $extra_fields_string .= '<tr><td></td></tr>';
	  }
	  return $extra_fields_string;
 }

 

 

Now it looks better in you confirmation email and even in the customers email. Maybe i should call this my little contrib? :D

Edited by Vantalk

Share this post


Link to post
Share on other sites

I just upgraded to OSC 2.2.4 and it blew all my extra fields mods. Argh.

 

I had to go in and create a new test account and I found Fatal error: Call to undefined function: tep_get_extra_fields() in /home/u3/mydomain/html/osc/create_account.php on line 495

 

Anyone else have this problem? Can I upload the older local files, or would that be a bad idea?

Edited by delirium

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×