Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Manitou Beach, Michigan
    Posts
    357
    Plugin Contributions
    0

    Default 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    Hi, I am upgrading all my carts and it has been going well I guess. wish there was a way to test if everything was done correctly and no critical files were over written.

    I am running into a strange error. I backed up my old cart. Installed a new copy of 139d. When I went to restored my backup I found it was damaged some how and I could not use it. I found a backup that was from a 137 cart and database. I restored from it ok said of course that the DB needed to be patched. When I run the DB update I get this error:

    1062 Duplicate entry 'Customers who have never completed a purchase' for key 2
    in:
    [INSERT INTO gallquery_builder (query_category, query_name, query_description , query_string) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL');]

    Anything I can do or am I toast?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    That's happening because you're trying to do an upgrade step that's already been done once.
    I share some ideas on this thread for getting around that particular problem: http://www.zen-cart.com/forum/showthread.php?t=82998
    .

    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
    Aug 2007
    Location
    Manitou Beach, Michigan
    Posts
    357
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    Hi Doc,
    I ran the sql query and it appears to correct the problem for that then I got this;

    1253 COLLATION 'latin1_general_ci' is not valid for CHARACTER SET 'utf8'
    in:
    [CREATE TABLE gallcounter_history_clean as SELECT * FROM gallcounter_history WHERE 1 GROUP BY startdate COLLATE latin1_general_ci;]


    ---------------

    I looked through the entire DB and changed the collation any where I found latin1_general_ci which was in a few places but I still get the error. ????

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    Evidently your database is set to utf8, not latin1 which is assumed by default.
    Change the DB_CHARSET in zc_install/includes/installer_params from 'latin1' to 'utf8'
    .

    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.

  5. #5
    Join Date
    Aug 2007
    Location
    Manitou Beach, Michigan
    Posts
    357
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    Hi Doc, That took care of it. Is it OK or a problem if it skips an entry because something already exists?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2

    The system normally intelligently skips things that have already been done, and simply displays a note about it. For the most part it's safe to ignore those.
    Carry on.
    .

    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.

 

 

Similar Threads

  1. Purchase orders 3.12 -- Problem: 1062 Duplicate entry '0' for key 1
    By Renz in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 14 Nov 2010, 10:01 PM
  2. 1062 Duplicate entry '0' for key 1
    By FredZ in forum General Questions
    Replies: 4
    Last Post: 3 May 2010, 02:32 AM
  3. Customers who have never completed an order?
    By MagicMan in forum General Questions
    Replies: 1
    Last Post: 24 Jul 2008, 06:44 PM
  4. 1062 Duplicate entry 'Customers who have never completed a purchase' for key 2
    By elliesupport in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 2 Jul 2008, 09:04 PM
  5. 1062 Duplicate entry 'Customers who have never...
    By LostSheep in forum Upgrading from 1.3.x to 1.3.9
    Replies: 15
    Last Post: 17 Apr 2008, 06:53 AM

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