Zen Cart Logo
Forums / All Other Contributions/Addons / Add Customers from admin addon

Add Customers from admin addon

Views: 42,164

Results 161 to 180 of 263
1 Jan 2010, 9:49 AM
#161
purelypoultry avatar

purelypoultry

New Zenner

Join Date:
Mar 2009
Location:
Fremont, Wisconsin, United States
Posts:
50
Plugin Contributions:
1

Add Customers from admin addon

This mod badly needs someone to implement many of the changes that are listed throughout this thread and make the updated version available for download. I just spent several hours trying to fix the broken parts. I have never done that so I don't know how but it definitely needs to be done.

1 Jan 2010, 1:44 PM
#162
carsal avatar

carsal

New Zenner

Join Date:
Dec 2009
Posts:
18
Plugin Contributions:
0

Re: Add Customers from admin addon

This is such a great mod but if I cannot upload va csv it is pretty pointless and I was really praying that someone would be able to help me with this...:dontgetit

4 Feb 2010, 6:03 PM
#163
tat2nu avatar

tat2nu

Zen Follower

Join Date:
Jan 2005
Posts:
178
Plugin Contributions:
0

Re: Add Customers from admin addon

I have read this post so many time that I could probably recite most of it flawlessly so please do not attack my question.

There is still no answer for those of us who want the State/Province dropdown that is on the create_account page to be the same State/Province method of selection that is on the add_customers page.

Could somebody smarter than me please figure this out. The way it sits now I can type in a state name but it does not seem to recognize the state in the customers address book so I need to go into the customers "my account" area to use the dropdown to select the state otherwise the cart does is not able to quote shipping.

HELP!!!!
Marc

8 Feb 2010, 11:41 PM
#164
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Add Customers from admin addon

tat2nu:

There is still no answer for those of us who want the State/Province dropdown that is on the create_account page to be the same State/Province method of selection that is on the add_customers page.

Could somebody smarter than me please figure this out. The way it sits now I can type in a state name but it does not seem to recognize the state in the customers address book so I need to go into the customers "my account" area to use the dropdown to select the state otherwise the cart does is not able to quote shipping.

I've been trying to figure this out for a while. Right now, what you type in the input field for the state gets put in the address_book table under the column entry_state, and the zone_id get filled in as zero. Problem is that the zone_id is where Zen looks for the taxes to be calculated from, hence everyone manually entered is not being charged taxes (and apparently the correct freight). The person in post # 119 changed the country to the drop down list using Zen's codes. I've tried following what they did, changing the names of the tables and columns according, but it doesn't work (big shock for me). I know it has to do with this section in the add_customers.php file:

    if (ACCOUNT_STATE == 'true') {

        echo '<tr>
            <td class="main">' . ENTRY_STATE . '</td>
            <td class="main">';

        $entry_state = zen_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);

        echo zen_draw_input_field('entry_state', zen_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)).'(Full Name)';
    }
```Can anyone work this out?  I'm sure it's a super speedy fix, but it would make my life so much easier since orders keep going through without taxes, so I am either loosing money cause I've missed it or having to manually adjust things.
11 Feb 2010, 2:24 PM
#165
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Add Customers from admin addon

Had the same problems with email not being sent to "new customer". Applied the bug fix in post #114 and bingo!

With reference to post #130:

Okay, I think I got it. In the add_customers_backend.php file in the admin folder at line #695 comment out the "$errors = false". So change this:

if (count($errors)) {
$cInfo = new objectInfo($_POST);
$processed = true;
} else {
$errors = false;
}

to this:

if (count($errors)) {
$cInfo = new objectInfo($_POST);
$processed = true;
} else {
//$errors = false;
}

So you suffer from constant headaches or migraines and to get rid of them, you just pop a few painkillers a day. Problem fixed - the headaches are gone! Or is the problem fixed?

Pains and error messages are of the same nature: they are telling you that there is a problem! Symptoms are good, they are telling us a story! Don't just suppress the symptoms, instead look for the underlying reason and fix it. Usual result: symptoms gone.......no more error, no more pain.

I am a natural therapist and not a php savvy programmer, so I leave it to the experts to fix the underlying problem of the symptom of this error message:

Warning: Invalid argument supplied for foreach() in /zencart_folder/admin/add_customers.php on line 71

Great mod, just installed it on both of my stores but will tread with caution until it's 100%

25 Feb 2010, 5:17 AM
#166
wendyandmilo avatar

wendyandmilo

New Zenner

Join Date:
Jan 2010
Posts:
34
Plugin Contributions:
0

Re: Add Customers from admin addon

fernzys:

Thank you very much .. works fine..
but still having error with the date.. zen cart doesnt accept the date in yyyy/mm/dd or yyyymmdd or yyyy-mm-dd . changes it to a weird date..
also the addon does accept it as mmddyyyy

Here's what I did to make it accept MM/DD/YYYY dates (like every other mod for the US :)

In add_customer_backend.php, around line #601 there are the following lines:

			$month = (int)substr($customers_dob, 4, 2);
			$day = (int)substr($customers_dob, 6, 2);
			$year = (int)substr($customers_dob, 0, 4);

...delete them. You can also delete the error message that follows, if it annoys you:

if (!checkdate($year, $month, $day)) {
				$errors[] = 'DOB is invalid (Must be YYYYMMDD, YYYY/MM/DD or YYYY-MM-DD)';
			}

Do a search in the file for "dob" and change any references of 0001-01-01 to 01-01-0001. I think only 1 of them stays changed because the other one seems to be called from the database. If you wanted to, you could go into your db and change that as well. I did not.

That is what I did and it takes (and keeps!) MM/DD/YYYY just fine.

** I am not guaranteeing anything. Just saying what works for me :)

16 Apr 2010, 5:37 PM
#167
donaldo01 avatar

donaldo01

New Zenner

Join Date:
Apr 2010
Posts:
5
Plugin Contributions:
0

Re: Add Customers from admin addon

I'm using the most up to date ZC 1.38a and the most recent version of the add-on. I have got the add on to the stage where I can add customers one-by-one but cannot get the bulk add using CSV to work. I am in Ireland and all my current customers are there also so I need to input Ireland in the "Country" field. However the upload keeps failing with the message

" Errors on line X of the imported file

  • Country is a required field"

Where X is every line in the datalist except the column headers. I have tried changing the Country to uk and UK for all but to no avail - I'm now baffled and would welcome some help.

19 Apr 2010, 11:15 AM
#168
donaldo01 avatar

donaldo01

New Zenner

Join Date:
Apr 2010
Posts:
5
Plugin Contributions:
0

Re: Add Customers from admin addon

Bump. Anyone? :lookaroun

19 Apr 2010, 11:23 AM
#169
carsal avatar

carsal

New Zenner

Join Date:
Dec 2009
Posts:
18
Plugin Contributions:
0

Re: Add Customers from admin addon

:( I have the same problem and no one has yet been able to assist me with fixing it. I had to load 180 clients manually and have another 100 to load in the next week and will have to do them manually as well. :no: so I doubt you will get any response either. :frusty:

19 Apr 2010, 1:35 PM
#170
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Add Customers from admin addon

I don't do massive uploads so never had any need to change this, but here where your problem is...

in ADMIN\add_customers_backend.php find this set of code and add your country....

if ($country == 'uk') {
    $country_id = 222;
    } else if ($country == 'us') {
         $country_id = 223;
    } else if ($country == 'Ireland') {
         $country_id = 223;
    }
```Of course, doing it this way means you will need to use phpmyadmin to look up and use the right country code for your database.  mine for the US is actually 241, I added the red.... you'll have to figure out what it is for you.... the ID is not the same for each install!
19 Apr 2010, 2:23 PM
#171
donaldo01 avatar

donaldo01

New Zenner

Join Date:
Apr 2010
Posts:
5
Plugin Contributions:
0

Re: Add Customers from admin addon

:clap: and :bigups:

That's done the job nicely! Thank you very much davewest.

D

23 Apr 2010, 3:59 PM
#172
ooba_scott avatar

ooba_scott

Zen Follower

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

Re: Add Customers from admin addon

Im having the same isssues, with regards to uploading bulk data via csv

Sadly daveWests fix of changing the add_customers_backend.php file doesnt work for the latest download of this mod as that code doesnt exist in that file .. .... or if it does im being completly blind and missing it!

any help would be greatly appreciated!

Scott

23 Apr 2010, 4:33 PM
#173
donaldo01 avatar

donaldo01

New Zenner

Join Date:
Apr 2010
Posts:
5
Plugin Contributions:
0

Re: Add Customers from admin addon

The code is around line 44 in the version I downloaded (1-07).

I also found that the module was very sensitive to the type application that created the CSV. For example no version of Excel for Mac would create a working CSV but Numbers did so no problem with the same data.

Hope this helps.

23 Apr 2010, 4:37 PM
#174
ooba_scott avatar

ooba_scott

Zen Follower

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

Re: Add Customers from admin addon

Thanks for the quick reply .... yeah i just downloaded 1.07 (latest one in the downloads section) and that file doenst have it in at all

the code that is around line 44 is now :

if ($country == 'uk') {
$country_query = $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . "
WHERE countries_iso_code_2 = 'GB'");

										$country_id = $country_query->fields['countries_id'];
									} else if ($country == 'us') {
										$country_query =  $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . " 
										                  WHERE countries_iso_code_2 = 'US'");
										 
										$country_id = $country_query->fields['countries_id'];
									}

So sadly its slightly different! .....thanks anwyway!

Scott

23 Apr 2010, 4:58 PM
#175
donaldo01 avatar

donaldo01

New Zenner

Join Date:
Apr 2010
Posts:
5
Plugin Contributions:
0

Re: Add Customers from admin addon

Sorry - mine is the same. this is what I inserted for Ireland (IE is the ISO code for Ireland) and in the CSV I added a column "Country" and filled it with "ie" for each entry.

$country_id = $country_query->fields['countries_id'];
} else if ($country == 'ie') {
$country_query = $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . "
WHERE countries_iso_code_2 = 'IE'");

24 Apr 2010, 2:55 AM
#176
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Add Customers from admin addon

Donaldo01:

I also found that the module was very sensitive to the type application that created the CSV. For example no version of Excel for Mac would create a working CSV but Numbers did so no problem with the same data.

OpenOffice works, MS office works, never had a Mac, so not sure on that one.... even phpmyadmin will create a CSV.. I've even used notepad to create small CSV's...

Ooba_Scott:

Thanks for the quick reply .... yeah i just downloaded 1.07 (latest one in the downloads section) and that file doenst have it in at all

the code that is around line 44 is now :

1.07 has the file, but your right, the code is different, but the same... written different, but does the same as before.

So.... just copy the last elseif as before...

else if ($country == 'us') {
     $country_query =  $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . " 
       WHERE countries_iso_code_2 = 'US'");
                                             
       $country_id = $country_query->fields['countries_id'];
         }
```and paste and change....

if ($country == 'uk') {
$country_query = $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . "
WHERE countries_iso_code_2 = 'GB'");

   $country_id = $country_query->fields['countries_id'];
     } else if ($country == 'us') {
     $country_query =  $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . " 
    WHERE countries_iso_code_2 = 'US'");
                                         
    $country_id = $country_query->fields['countries_id'];
     }else if ($country == 'us') {
     $country_query =  $db->Execute("SELECT countries_id FROM " . TABLE_COUNTRIES . " 
      WHERE countries_iso_code_2 = 'US'");
                                         
      $country_id = $country_query->fields['countries_id'];
      }
27 Apr 2010, 10:25 AM
#177
ooba_scott avatar

ooba_scott

Zen Follower

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

Re: Add Customers from admin addon

Thanks for the reply dave..... sadly that didnt fix it and still has the same issue with regards to 'country is a required field'

hmmm i guess i wont use this mod :(

Cheers for all the help

Scott

27 Apr 2010, 7:21 PM
#178
apsona avatar

apsona

Zen Follower

Join Date:
Jan 2010
Posts:
190
Plugin Contributions:
1

Re: Add Customers from admin addon

"How about trying Apsona ShopAdmin? It's free, and it will probably work for you.

13 May 2010, 6:29 PM
#179
alexsmith2709 avatar

alexsmith2709

New Zenner

Join Date:
May 2010
Posts:
36
Plugin Contributions:
0

Re: Add Customers from admin addon

Hi,
Thanks for this mod, its working great.
One thing i would like to know is using the custom field i created for my registration page.
I've managed to get the field to show in the add_customer.php file but when the customer is added and i go to edit the customer in the admin panel the custom field shows up blank and the data has not been added to the database.
I followed the instructions for adding the custom field to the registration page (by exchanging customers.php for add_customers_backend.php). From what i can understand the code to add to the database is the same but there are a few differences between the files.

Any help will be much appreciated.

Thanks

27 May 2010, 2:13 PM
#180
stringplayer avatar

stringplayer

New Zenner

Join Date:
Dec 2007
Location:
Hertfordshire UK
Posts:
14
Plugin Contributions:
0

Re: Add Customers from admin addon

Installed this module and all is fine except the following which I need help:
If you try to amend anything in options in admin/customers it will only remember the original that was setup in your module.
So for example if there is a group discount of 10% when customer is setup and you want to change this you can't without deleting the customer first and then re-enter all his details again with the new discount.