If the order download procedure fails or generates duplicate orders, it is usually possible to understand the reason based on the error released by Prestashop or intercepted by the module itself.
The creation of an order on the website is rather complex as it involves three phases:
1. Customer generation
2. Cart generation (including product addition and product association)
3. Order validation in which Prestashop performs checks to ensure the correctness of the data.
Although the module is capable of anticipating a series of recurring errors (e.g., products deleted by Prestashop, customers with invalid addresses, unassociated carriers, etc.), displaying them on-screen during manual download, it is possible to encounter unforeseen or unmanageable errors and receive a system error “Fatal error” during both manual search and cron execution.
Since the error will occur in one of the three phases mentioned above, interrupting its execution, it could result in incomplete or duplicate orders, as the module cannot determine the successful creation of the order. Therefore, you might detect the creation of an incomplete customer (sometimes with the email NOSEND-EBAY, a stratagem used by the module to avoid sending communications from the site) or a cart/order without products.
In such a case, it is always advisable to deactivate the cron (to avoid duplicate orders during error diagnosis), attempt the manual order download, checking for any messages or errors that may help understand the issue. During this phase, it may be helpful to temporarily activate Prestashop’s debug mode (from the “Advanced Parameters” menu), as it will highlight any PHP errors on the screen.
Below are the most common reasons for this type of error, which should be checked first:
- The system is trying to download an eBay order for a product that has been deactivated on Prestashop. In this case, it is necessary to reactivate it to download the order correctly.
- The system is trying to download an order containing a product that is not “Available for order” on Prestashop (check the appropriate flag on the product page) or has a minimum order quantity greater than what was ordered on eBay.
- The system is trying to download an order from a customer whose country is disabled/deleted on Prestashop.
- The order download procedure was initiated with the store deactivated/in maintenance mode.
- The system is trying to download an order containing products with Prestashop validation problems (e.g., containing non-numeric EANs or invalid characters in the title like < >).
- The system is trying to download an order with a minimum order quantity lower than the stock received from eBay (in this case, an option is available in the module to allow this mode).
- Your server was unable to complete the order generation due to a PHP timeout (investigate by checking the error_log in your hosting environment).
- A third-party module, integrated into one of the order validation hooks, is generating a blocking error during the order validation phase. If you have an error related to a module other than Fastbay, temporarily deactivate it and retry the procedure.
If the issue appeared after installing a new module, check if it interacts with the order creation procedure (validateOrder hook), in which case you may want to try downloading while disabling the execution of that hook (a feature available in the module’s “DEBUG” tab). If it succeeds, contact the developer of the “problematic” module to investigate the cause of the error.
If the issue appeared after a site update/migration to a new server or a PHP version update, make sure that there are no two crons running simultaneously. Also, verify that the compatibility between the server/Prestashop version and Fastbay version is maintained.