Jump to content



Latest News: (loading..)

* * * - - 2 votes

Customers extra fields


  • Please log in to reply
268 replies to this topic

#1   kit

kit
  • Members
  • 27 posts
  • Real Name:Marat

Posted 07 November 2005 - 10:24 AM

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.


#2   Viviennes

Viviennes
  • Members
  • 110 posts
  • Real Name:Vivienne

Posted 08 November 2005 - 11:26 PM

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.

#3   kit

kit
  • Members
  • 27 posts
  • Real Name:Marat

Posted 09 November 2005 - 09:23 AM

View PostViviennes, on Nov 8 2005, 11:26 PM, said:

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"

#4   chooch

chooch
  • Members
  • 1,981 posts
  • Real Name:AA
  • Gender:Male
  • Location:London, UK

Posted 13 November 2005 - 01:26 AM

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

#5   Viviennes

Viviennes
  • Members
  • 110 posts
  • Real Name:Vivienne

Posted 14 November 2005 - 05:53 AM

View Postkit, on Nov 9 2005, 11:23 AM, said:

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

Hi Kit

Thank you. That fixed it perfectly.  :thumbsup:

#6   queenkellee

queenkellee
  • Members
  • 8 posts
  • Real Name:Kellee

Posted 15 November 2005 - 10:00 AM

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

#7   queenkellee

queenkellee
  • Members
  • 8 posts
  • Real Name:Kellee

Posted 15 November 2005 - 10:05 PM

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!

#8   queenkellee

queenkellee
  • Members
  • 8 posts
  • Real Name:Kellee

Posted 15 November 2005 - 10:40 PM

I found the problem: nothing to do with this contrib per say. Fix found here:

http://forums.oscommerce.com/index.php?s=&...ndpost&p=740617

#9   finrod

finrod
  • Members
  • 1 posts
  • Real Name:Sven

Posted 17 November 2005 - 08:29 AM

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

Quote

<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

Quote

<?php echo tep_get_extra_fields($customer_id,$languages_id);?>
.
And in the file catalog/account_edit.php I couldnīt find

Quote

<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:

Quote

<?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!

#10   kim333

kim333
  • Members
  • 19 posts
  • Real Name:kim

Posted 17 November 2005 - 02:59 PM

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!!

#11   kit

kit
  • Members
  • 27 posts
  • Real Name:Marat

Posted 18 November 2005 - 01:42 PM

View Postfinrod, on Nov 17 2005, 08:29 AM, said:

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.

#12   kim333

kim333
  • Members
  • 19 posts
  • Real Name:kim

Posted 18 November 2005 - 11:57 PM

: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)

#13   amhazing

amhazing
  • Members
  • 20 posts
  • Real Name:Amazing H
  • Location:Australia

Posted 24 November 2005 - 12:37 PM

View Postqueenkellee, on Nov 16 2005, 08:40 AM, said:

I found the problem: nothing to do with this contrib per say. Fix found here:

http://forums.oscommerce.com/index.php?s=&...ndpost&p=740617

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

GREAT CONTRIB BY THE WAY KIT!!! Any plans for adding extra data types :)

regards,

HL

#14   queenkellee

queenkellee
  • Members
  • 8 posts
  • Real Name:Kellee

Posted 26 November 2005 - 10:51 PM

View Postamhazing, on Nov 24 2005, 04:37 AM, said:

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. :)

#15   khynezu

khynezu
  • Members
  • 1 posts
  • Real Name:khynezu

Posted 12 December 2005 - 05:57 AM

Hi,
Could someone pllease help me to insert this new fields in invoice ?

Thank's

#16   tman00

tman00
  • Members
  • 3 posts
  • Real Name:Tarek

Posted 12 December 2005 - 04:52 PM

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

#17   kdeleon

kdeleon
  • Members
  • 11 posts
  • Real Name:Kevin deLeon

Posted 14 December 2005 - 07:59 PM

View Postkhynezu, on Dec 12 2005, 12:57 AM, said:

Hi,
Could someone pllease help me to insert this new fields in invoice ?

Thank's

I am with this person here.  Is there a way to make the added fields show up in the invoice and order screen?  Thanks!

#18   JSA

JSA
  • Members
  • 28 posts
  • Real Name:Julian Self
  • Location:UK

Posted 14 December 2005 - 10:51 PM

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

#19   lupole

lupole
  • Members
  • 83 posts
  • Real Name:Larry Lupole

Posted 18 December 2005 - 05:02 PM

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

#20   Andyy

Andyy
  • Members
  • 81 posts
  • Real Name:Andrew
  • Gender:Male
  • Location:UK

Posted 04 January 2006 - 11:23 AM

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