Removing Lingering Mondial Relay Labels in PrestaShop: A Database Dive

The Case of the Persistent Mondial Relay Label

A PrestaShop merchant, Munifrance, encountered a peculiar issue: an old, ungenerated Mondial Relay label stubbornly remained in the "Generate Labels" list within the PrestaShop back office, even after the associated order had been deleted. This phantom label, accessible via a specific URL (/index.php?c>), couldn't be removed through the standard back-office interface.

The merchant's Mondial Relay module was version v3.7.0, developed by ScaleDEV. Unable to find a corresponding entry in the database through conventional searches, Munifrance sought help on the PrestaShop forums.

The Database Deep Dive: Solution Found

Eolia, a helpful forum user, pinpointed the relevant database table: ps_mondialrelay_selected_relay. The suggestion was to either fill the columns tracking_url, label_url, expedition_num, and date_label_generation with dummy values or, if the order no longer existed, to directly delete the corresponding row from the table using PHPMyAdmin or a similar database management tool.

Implementation and Outcome

Munifrance located the problematic entry in the ps_mondialrelay_selected_relay table. Following Eolia's advice, the merchant opted to delete the entire row, thereby resolving the issue and removing the persistent Mondial Relay label from the back-office list.

Key Takeaway: When dealing with module-related data persistence in PrestaShop, directly accessing and manipulating the database might be necessary, especially when standard back-office functionalities fail to address the problem. Always back up your database before making any changes.

Code Snippets & Table Information

The solution involved directly interacting with the ps_mondialrelay_selected_relay table. While no specific code was shared, the following SQL query (for informational purposes only, adapt to your specific needs and ALWAYS BACKUP FIRST) illustrates how one might identify and delete the relevant row:

-- WARNING: This is an example.  Adapt to your specific needs and BACKUP YOUR DATABASE FIRST!
SELECT * FROM ps_mondialrelay_selected_relay WHERE /* your conditions to identify the row */; 

-- After verifying the correct row, you can delete it:
DELETE FROM ps_mondialrelay_selected_relay WHERE /* your conditions to identify the row */;

Important Considerations:

  • Always back up your PrestaShop database before making any manual changes.
  • Ensure you accurately identify the correct row in the ps_mondialrelay_selected_relay table to avoid unintended data loss.
  • If the order still exists, consider filling the specified columns with dummy data instead of deleting the row, as suggested by Eolia.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools