Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2019
    Location
    Holyoke, MA
    Posts
    7
    Plugin Contributions
    0

    Default Random Duplicate Orders

    Hello!

    We've been getting random sporadic duplicate orders since we switched to v1.5.6c earlier this year, not a lot, but enough to annoy our CSR. Here's our setup:

    Zen Cart Version 1.5.6c
    PHP Version 7.1.33
    PayPal Payments Standard

    I've made a point in not installing any mods which edit core files. Having said that, we do use third party mods but none which (to my understanding) should conflict with PayPal Payments Standard. Most are either admin-function- or price-discount-related.

    The only thing in our error log is this:

    Code:
    [21-Nov-2019 15:08:46 America/New_York] PHP Fatal error:  Cannot declare class order, because the name is already in use in /home2/xxxxxx/xxxxxxxx/xxxxxxx/includes/classes/order.php on line 1156
    Line 1156 in my includes/classes/order.php file is just a }.

    Any ideas?

    Thank you!

  2. #2
    Join Date
    Jan 2004
    Posts
    65,292
    Blog Entries
    7
    Plugin Contributions
    228

    Default Re: Random Duplicate Orders

    While I don't know the solution to your situation, I offer the following, in no particular priority:

    1. PayPal Payments Standard is known to occasionally create duplicates if the IPN process has difficulty in doing its complex handshake. Standard was designed for webstores of the 1990s and early 2000s where a "catalog/database" of products was only on the PayPal end, not on your own store. Its technical implementation relies on a bunch of patched-together-things needing to operate "just right" in a less than optimal context.
    That said, some stores use it because PayPal formerly didn't offer Express Checkout in all parts of the world where those stores want to sell.
    But nowadays Express Checkout is much more ubiquitous, and is certainly preferred over Standard. It's also typically much more reliable from a technology perspective.
    (That's the long-winded way of suggesting you switch from Standard to Express Checkout, both to deal with the duplicates issue, and also to hopefully avoid the PHP errors you mentioned. Even if it's just a "test".)

    2. "Cannot redeclare class" happens when parts of your PHP application try to re-load the same files again, or start their processing steps over from within other places. None of this is intended, and suggests that some files on your site are probably damaged, or duplicated, or tampered with, or incorrectly altered by out of date addons.
    Two parts to this:
    a) if you're in the habit of "making a backup of a php file by renaming it", then make sure when you rename it that you do NOT leave the ".php" on the end of it! Otherwise it'll be treated as a common PHP file, and could get loaded as a duplicate instead of being ignored because it's only a backup. So, if you're replacing files for some reason and want to keep a backup, feel free to do that, but either change the ".php" suffix to something else (maybe .php-bak), or move the file to your own PC instead of leaving it on the server.
    b) do a full compare of all the files on your server vs the clean backup you have on your PC of what "should" be on the server. Then you can spot anomalies. If you don't already have a "clean backup of all the files" on your PC, then start with a clean copy of your version of Zen Cart as the base to compare against.
    Comparison guidance is offered in this article: http://www.zen-cart.com/wiki/index.p...ing_From_Hacks
    .

    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. v151 Random orders not recording tax information
    By strelitzia in forum General Questions
    Replies: 0
    Last Post: 28 Mar 2013, 11:13 AM
  2. [duplicate post] Duplicate Orders
    By chris1974 in forum Bug Reports
    Replies: 2
    Last Post: 3 May 2011, 07:28 PM
  3. Replies: 10
    Last Post: 10 Feb 2011, 01:47 PM
  4. Orders page shows random purchase date
    By safeg in forum Managing Customers and Orders
    Replies: 1
    Last Post: 17 Mar 2010, 04:33 PM
  5. random line errors in confirmation email orders
    By rocketrod in forum General Questions
    Replies: 3
    Last Post: 30 Sep 2006, 09:46 AM

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