Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers extra fields


kit

Recommended Posts

Admin can add/edit/delete extra fields for customers and set up field name, field type (input field, textarea field) and field required status (true, false). Customers see extra fields when he create or edit own account.

 

If you have any queries, bug reports, praise or derision, don't hesitate.

Link to comment
Share on other sites

Thanks for an outstanding contribution. I picked up two errors though and have one question.

 

In admin/includes/languages/english/customers.php and also in admin/includes/filename.php there should be no breaks after the line of code. (<br><br> should be removed.)

 

My question is: where can I alter the length of the heading for the extra field. I would like to use the field for a question and need to give an example answer, but my heading gets truncated.

 

If you could point me in the right direction it would be much appreciated.

Link to comment
Share on other sites

My question is: where can I alter the length of the heading for the extra field. I would like to use the field for a question and need to give an example answer, but my heading gets truncated.

Please run sql query: "ALTER TABLE `extra_fields_info` CHANGE `fields_name` `fields_name` TEXT NOT NULL"

Link to comment
Share on other sites

hi

 

this sounds like a really important mod.. if it can do what i think it does, i'll use it and thank the authors

 

is there a working demo or website that i can click the create_account.php link and se for myself what it does?

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Hi There! I'm very excited to use this contribution!

 

..but of course i have an issue. i ran the install.sql, copied and changed all the files, and now in the admin side when i click on extra fields manager I see this:

 

----

 

Customers Extra fields

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select ce.fields_id, ce.fields_size, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type from extra_fields ce, extra_fields_info cei where cei.fields_id=ce.fields_id and cei.languages_id =1 limit -20, 20

 

[TEP STOP]

 

Fields Status Action

 

---

 

any ideas? not sure if it's a bug or an input error (read: typo). I've checked everything over, but then again...who knows...my eyes are starting to bug out a bit tonight.

 

Any and all help appreciated :)

 

-kellee

Link to comment
Share on other sites

Still not fixed, more info:

I figured out what's triggering the error, but I'm a mysql/php beginner so i'm not sure what needs fixin here.

 

from admin/extrafields.php line 119:

 

$fields_query_raw = "select ce.fields_id, ce.fields_size, 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 cei.fields_id=ce.fields_id and cei.languages_id =" . (int)$languages_id;

 

I'm sure at some point i will figure it out, but any advisement would be appreciated!

Link to comment
Share on other sites

Well I have a problem, or 3 of them. But I guess they are depending each other.

The first 2 problems occured when I installed this contrib. I couldn`t find

<tr>

<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>

</tr>

in the file catalog/create_acount.php an therefore wasn?t able to add the line

<?php echo tep_get_extra_fields($customer_id,$languages_id);?>
.

And in the file catalog/account_edit.php I couldn?t find

<tr>

<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>

<td class="main"><?php echo tep_draw_input_field('fax', $account['customers_fax']) . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

so i couldn?t enter this:
<?php echo tep_get_extra_fields($customer_id, $languages_id)?>
. Adding the other lines were no problem, also in this 2 files.

And I guess as a result of these 2 errors i can?t find anywhere in the admin panel of my shop anything to add customer fields.

I hope anyone can help me! Thanks alot!

Link to comment
Share on other sites

in "extra fields manager" getting following message/error

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

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]

 

any help greatly appreciated. would very much like to get this working...soon :rolleyes:

thanks kim

p.s. noob!!

Link to comment
Share on other sites

Well I have a problem, or 3 of them. But I guess they are depending each other.

The first 2 problems occured when I installed this contrib. I couldn`t find

 

in the file catalog/create_acount.php an therefore wasn?t able to add the line

.

And in the file catalog/account_edit.php I couldn?t find

so i couldn?t enter this:

. Adding the other lines were no problem, also in this 2 files.

And I guess as a result of these 2 errors i can?t find anywhere in the admin panel of my shop anything to add customer fields.

I hope anyone can help me! Thanks alot!

Hi!

I think that you miss point 6 from installation instruction:

6. In admin/includes/database_tables.php

Add the following lines:

define('TABLE_EXTRA_FIELDS','extra_fields');

define('TABLE_EXTRA_FIELDS_INFO','extra_fields_info');

define('TABLE_CUSTOMERS_TO_EXTRA_FIELDS','customers_to_extra_fields');

or you miss point 11:

11. In catalog/includes/database_tables.php

Add the following lines:

define('TABLE_EXTRA_FIELDS','extra_fields');

define('TABLE_EXTRA_FIELDS_INFO','extra_fields_info');

define('TABLE_CUSTOMERS_TO_EXTRA_FIELDS','customers_to_extra_fields');

Check pleas these points and tell me result. If you have any

questions, don't hesitate - ask me.

Regards.

Marat.

Link to comment
Share on other sites

:P dear kit,

 

thanks for the info. you were right...there was something missing in 6 & 11! thought i'd been careful, but i guess not. it's working now & i'm very excited.

 

thanks for the contrib. it is fer sure needed!

kim :thumbsup: :thumbsup: (2 thumbs up)

Link to comment
Share on other sites

Thanks for wrapping up your cross post - helped me solve an ongoing problem :) unrelated to the contrib

 

No problemo. I always hate it when I'm having the same problem as someone else posted on the forum and there is no response.

 

BTW, the dev team JUST put up an updated download osCommerce 2.2 Milestone 2 Update 051113 a week or two ago on the main downloads page that fixes a number of bugs, including this one. If you are having any other buggy problems you may want to have a look at least at the bug fixes they did (noted in a file in the package) to save you some heartache. :)

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

kit,

 

Great Contribution!

 

I managed to follow your instructions, even though some of the php looked quite dodgy to a php-novice, and it worked first time.

 

I'm new to OSC and Contributions, so apologies if this isn't the right place for suggestions, however

 

I think you should update the Contribution to:

- remove the errorenous <br><br> from the package

- include a link back to this topic for ease and support

 

And a couple of suggested future features (f you have the time):

- example of how to include it in Invoices, etc.

- extending data types

 

Keep up the good work, it's appreciated.

 

Regards,

Julian

Link to comment
Share on other sites

I have installed this contribution and love it. It is just what I am looking for. But I was wondering if I could get the results to land in admin/customers/edit just under the newsletter box? I have tried to accomplish this but with no success. I have been able to get the questions to appear there. But I need the answers. Is this a possible?

 

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

Great Contribution

 

I found a bug that when multiple new fields are created and the Required Status is activated, the system increments all values.

 

ie I have 3 new fields and activated each with Required Status then placed 1 in each Minimum value.

the result was that the user was forced to add

 

1 character in field 1

2 characters in field 2

3 characters in field 3

 

It seams that the system is adding all the values together?

 

Andrew

Link to comment
Share on other sites

oooops I ment 6 fields!!

 

Great Contribution

 

I found a bug that when multiple new fields are created and the Required Status is activated, the system increments all values.

 

ie I have 6 new fields and activated each with Required Status then placed 1 in each Minimum value.

the result was that the user was forced to add

 

1 characters in field 1

2 characters in field 1

3 characters in field 2

4 characters in field 3

5 characters in field 4

6 characters in field 5

 

It seams that the system is adding all the values together?

 

Andrew

Link to comment
Share on other sites

Awesome contribution. I've installed 80+ contribs on my site and this was hands down the easiest to install. Great documentation and code writing. I was really pleased with the fact that there NO code line modifications, only additions. Keep up the good work!

Link to comment
Share on other sites

  • 2 weeks later...

hi,

 

first of all..great contribution, helped me alot. i've used this contribution since last month. recently i realize the that when i add new field (with requirements). in the registration page, customer can actually submit the form without entering anything at the requirement field that i add.

 

can someone help me on this, where to look for the mistake. thanks.

Link to comment
Share on other sites

OK, please someone help, in desperate need here...

 

I need for this contrib to print the extra fields to the email confirmation that I and the user receive.

 

Can anyone assist by telling what I need to put in the checkout_process file to get the extra fields info to show up in there?

 

Thanks so much!

 

Jon

Link to comment
Share on other sites

Hi, I installed the contribution and its working great. What I wanted to do is add and extra field in the Company Details section under company name. What would I need to edit to add a field there?

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...