Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Nov 2008
    Posts
    192
    Plugin Contributions
    0

    Default array_merge error on ported OSC database

    Hi,

    I've now been working with ZenCart for a couple of days and am very happy with everything so far. I'm porting my store over from a 2002 version of OSCommerce and things are progressing nicely.

    However, I'm getting an error when viewing the customer list and could use some help resolving the error.

    Error Messages:

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/.hadrondryer/afterhrs/zencart.mainlyminis.net/admin/customers.php on line 1099

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/.hadrondryer/afterhrs/zencart.mainlyminis.net/admin/customers.php on line 1101

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/.hadrondryer/afterhrs/zencart.mainlyminis.net/admin/includes/classes/object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in /home/.hadrondryer/afterhrs/zencart.mainlyminis.net/admin/includes/classes/object_info.php on line 30


    The first 2 errors are generated from these 2 lines in admin/customers.php

    $customer_info = array_merge($country->fields, $info->fields, $reviews->fields);

    $cInfo_array = array_merge($customers->fields, $customer_info);


    The customer list displays ok beneath the errors, but I can't select a customer for editing.

    Can someone tell me what these statements are looking for that must be missing in my imported database?

    Also, I'd just like to say thanks to the developers for creating such an excellent product, it's far superior to my old version. Most of the mods I made in OSC are now standard features so rebuilding my store in ZenCart hasn't been too difficult so far.

    In the last 2 days I've ported the database, re-created the look and feel of my old store by creating a custom template, and managed to import over 6,000 products and 6,000 customers without too many major issues so far.

    It's really refreshing to be able to make so many modifications without having to touch the core code, which means version upgrades will be possible for me now. This was a huge problem in the past and now it won't even be an issue.

    Thanks in advance for any assistance.

    Ed

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: array_merge error on ported OSC database

    Quote Originally Posted by edadk View Post
    Can someone tell me what these statements are looking for that must be missing in my imported database?
    It's looking for data in the "customers", "customers_info", "address_book", and "reviews" tables, based on the customers_id of the selected customer.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: array_merge error on ported OSC database

    Thanks, that helps a lot.

    But it means I still have a lot of work to do!

    Ed

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: array_merge error on ported OSC database

    There is also an module in the free addon to help you porting database from osc to zen, just in case you dont know about it.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Nov 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: array_merge error on ported OSC database

    Quote Originally Posted by yellow1912 View Post
    There is also an module in the free addon to help you porting database from osc to zen, just in case you dont know about it.
    Yes, that's what I used to get this far. Without it I couldn't even start this project.

    Ed

  6. #6
    Join Date
    Nov 2008
    Posts
    16
    Plugin Contributions
    0

    Default array_merge error

    Quote Originally Posted by DrByte View Post
    It's looking for data in the "customers", "customers_info", "address_book", and "reviews" tables, based on the customers_id of the selected customer.

    i'm experiencing this problem currently but because of different causes.

    today, i uploaded a series of customers from a software my client had in their "shop." about 5200.

    do all the fields need to be completely filled in for the database to operate properly? that is, is it possible that the lack of data in the "customers_info" will be filled out when users access and update their accounts? do the country_id and zone_id need to be filled out?

    why is the system querying "reviews" in such a way that reviews seem (to me) to be required? that is, wouldn't the customer_id fill into the reviews once a review is actually created?

    i wrote a few quick scripts for imputing most of the data that was missing (such as selecting HTML for the newsletter rather than text); is this the best way to fix the missing data in my client's zencart db? if so, can you provide any direction on what information needs to be in there so i don't miss anything?

    thank you so much in advance!!

  7. #7
    Join Date
    Nov 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: array_merge error on ported OSC database

    Just add a new customer and you'll see how ZenCart fills in the fields. That helped me a lot.

    The field that gave me the most trouble was customers default address id, if the right value isn't in the record, you'll have problems later.

    You could also set up another ZenCart and load the sample data that will help illustrate how things are stored and linked.

    Hope this helps a little.

    Ed

  8. #8
    Join Date
    Nov 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: array_merge error on ported OSC database

    i'll see what i can figure out; thanks. :)

  9. #9
    Join Date
    Nov 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: array_merge error on ported OSC database

    so i'm not seeing anything that's crucial here.

    nothing loads to the reviews. only thing my db is missing is the customer_info_id (which is only marginally useful, imho) and the zones...pretty simple fixes.

    any idea if this is "business critical"? i'd rather prioritize this lower if it's not that important for the functioning of the shopping cart...

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: array_merge error on ported OSC database

    What version of Zen Cart are you using?
    A bandage was added in 1.3.8 to auto-generate the customers_info record when people did incorrect imports of data.

    It would be best to generate the customers_info record while building customer data. The system does expect it to be intact.

    In terms of your comment about "marginally useful", you're marginally correct. Without that record, you'll probably get errors during login, or at least the login stats for your customer will be lost.

    The upcoming v1.4 version of Zen Cart expects the customers_info data to be intact during the upgrade while it merges the 2 tables into one, essentially minimizing the problem you're complaining about.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Problem with new shipping module ported from osc
    By blood2 in forum Addon Shipping Modules
    Replies: 5
    Last Post: 28 Jan 2011, 03:28 PM
  2. Database Error in Admin... HELP... array_merge
    By limelites in forum General Questions
    Replies: 5
    Last Post: 14 Jul 2009, 11:09 AM
  3. PP Express Error: array_merge()
    By Stobe in forum PayPal Express Checkout support
    Replies: 8
    Last Post: 26 Feb 2007, 06:59 AM
  4. OSC database: what's 'OSC'?
    By gnotapipe in forum General Questions
    Replies: 3
    Last Post: 26 May 2006, 08:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR