Jump to content
Latest News: (loading..)

Recommended Posts

This addon provides a way to merge two customer accounts. It will move all orders from one account to the another and add the account details of the From account into the address book of the To account. Once the changes have been made, the From account is deleted.

It is compatible with all versions of oscommerce.

 

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Jack does this need to move the account details from the old account to the new or more recent account?  Can that be optional?   I can see this being useful to merge old accounts with newer ones but I wouldn't want to carry old address information forward.

Dan

Share this post


Link to post
Share on other sites

It isn't coded as an option but that can be added. I'll add to the next version. To remove it for now, remove this code from the admin/merge_accounts.php file

array('table' => 'address_book', 'field' => 'customers_id'),

 

Share this post


Link to post
Share on other sites

Hi Jack,

I installed the Merge Accounts add on and am getting the following error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/admin/web/mydomain.com/public_html/catalog/admin/includes/functions/database.php on line 103

Any suggestions for a fix?

Thanks for any help.

Ken

Share this post


Link to post
Share on other sites

That usually happens when the data being read in is too large for the server to allow. The script is trying to load in customers and then populate three lists and if the number of customers you have is huge, then this could happen. You can see how many customers you have in the Customers section of admin (down at the bottom). I have this installed in a shop that has 8,000 customers and it is working fine so yours would have to be considerably larger if this is the problem.

It could also be that your host has the memory limit for your account controlled in some way that is stopping it. From the error, the script used 132 MB which is about standard in todays hosting. But there might be local settings overriding that. You could ask your host to check the memory setting and ask why you are running out of it. They will most likely say it is the script, which it may be, but since it works in other shops that seems unlikely.

Share this post


Link to post
Share on other sites

Thanks Jack.  Yes, I have more customers than 8K.  I'll check in to this further and see if there's something I can change with my server configuration.

Share this post


Link to post
Share on other sites

I was able to increase the php memory and this fixed this error.  With the number of customers I have it takes a very long time to build the lists and actually causes the browser to stop responding to build them.  In fact, the browser never did compete the build of the customer selection menus.  I would imagine once built it would not easy to find the accounts you want to merge.   If I might venture an enhancement/change would be to provide Merge From and To fields for searching for the customer accounts to merge rather than build selection menus.   You could still have the option to click for menu selection based on one of the three criteria you offer for those who want to select them using that method.  For me I would know the email addresses of the accounts I want to merge so this would be quick and assured to get the correct two accounts.

Thank you for your efforts with this excellent addition!

Ken

Share this post


Link to post
Share on other sites

You are correct. When I first added the lists I thought there might be a problem with sites that had a large number of customers or were on servers with low memory settings. I intended to go back and change that but ran out of time. I will change it in the next version.

Share this post


Link to post
Share on other sites

A new version has been updated with these changes:

  • Moved database code to an ajax file for speed.
  • Added an option to email the customer about the merge.
  • Changed the code to remove the results when a new search is started.

 

Share this post


Link to post
Share on other sites

Performed install. However, Merge Accounts page shows nothing, just blank. with no errors. See attached.

Capture.PNG

Share this post


Link to post
Share on other sites

Please down and install the Version Checker addon. The installation is just uploading files. I should have included it in this package.

Share this post


Link to post
Share on other sites
13 hours ago, Jack_mcs said:

Please down and install the Version Checker addon. The installation is just uploading files. I should have included it in this package.

OK- did that. (see result attached)...  Yes it is the latest version. All files uploaded and files modified. no errors that I see.  What's next?

 

Capture1.PNG

Share this post


Link to post
Share on other sites

You can see the difference between your two images is the text on the right. So in the first image, that wasn't displaying because the file wasn't present and the code was giving an error. Now that you have installed that addon, the code is getting past that and failing on the next item, which is the loading of the merge_accounts_ajax.php file. Please check that that is present in your admin directory.

If it is, then also see if there is a file named error_log present. If there is, open it and look for any entries having to do with this addon and post them here if they don't provide the reason for you.

Share this post


Link to post
Share on other sites
Posted (edited)

Sorry, it WAS displaying, I just didn't include it in the first snip image.  Yes, both files exist in the folder.

There is no error log file created. Still nothing displayng.

Thanks for your help.

Capture2.PNG

Edited by Gadget

Share this post


Link to post
Share on other sites

Sorry, but you've lost me. You said, "it WAS displaying" and then "Still nothing displaying".

Share this post


Link to post
Share on other sites

As I posted above-  below is all I see.  After I installed the version checker I now get the Merge accounts V 1.1 that shows up now.  But still nothing shows up on the Merge accounts page to do.  

Capture1.PNG.18ee21652317fcd0b0894a961eba464d.PNG

Share this post


Link to post
Share on other sites

I can tell you that this addon has been tested in RC2, 2.3.4 and 2.3.4 BS versions of oscommerce so the problem you are seeing is almost certainly an installation issue.

So you need to find out what the error is. If an error_log file is in the admin directory, look at it. If not, look at the errors in your control panel, if that option exists. If not, see if your host will provide the error. If not, you will need to pay for someone to look at it.

 

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

×