Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Merge Accounts


Jack_mcs

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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'),

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 4 weeks later...

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.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 months later...

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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