PrestaShop Order Workflow Mastery: Custom Statuses, Email Control & Admin Filters
Streamlining PrestaShop Order Preparation: Custom Statuses, Email Control, and Admin Filters
As an e-commerce migration expert at Migrate My Shop, we frequently encounter growing businesses struggling with inefficient order fulfillment. The journey from 'Payment accepted' to 'Shipped' is rarely a straight line, especially for stores processing dozens of orders daily. Introducing intermediate order statuses is a common and effective strategy to enhance internal workflows, but it often comes with its own set of challenges. This guide, inspired by a recent PrestaShop forum discussion, delves into two critical issues: unwanted email notifications from custom statuses and the inability to save custom filtered views in the PrestaShop admin panel.
Consider a scenario faced by a merchant running PrestaShop 8.1.7 (PHP 8.1) with a daily volume of 30-40 orders. To better organize their two-person order preparation team, they wisely decided to introduce a new custom status: 'En préparation' (In Preparation). This status was configured with:
- 'Considérer la commande comme validée' (Consider order validated): Checked
- 'Envoyer un e-mail au client' (Send email to customer): Unchecked
- 'Afficher la facture PDF' (Display PDF invoice): Unchecked
- An orange color for easy identification in the order list.
Despite explicitly unchecking the 'Send email to customer' option, some customers unexpectedly received emails when their orders transitioned to this new status. The merchant suspected the order_conf template or a third-party module but found debugging difficult as 'Advanced parameters > Logs' offered no clear insights. The second challenge was the inability to save a default filtered view of orders for each preparer in the admin list, necessitating manual filtering every time. Let's break down how to tackle these common PrestaShop hurdles.
Debugging Unwanted Email Notifications: A Deep Dive
The persistent email issue, even after disabling the 'Send email to customer' option, is a classic PrestaShop puzzle. Here's a systematic approach to diagnose and resolve it:
1. Verify Status Configuration (Revisited)
First, double-check the email template associated with your 'En préparation' status. Navigate to Orders > Order Statuses, edit your custom status, and ensure that the email template field is either empty or points to a non-existent/disabled template. Sometimes, a default template might be inadvertently linked, or a module might override this setting.
2. Leverage PrestaShop's Email Logging – Your Best Friend
This is the most critical step. PrestaShop has a dedicated email logging section, distinct from the general system logs. Go to Advanced parameters > E-mail. Ensure that email logging is activated. This section will show you:
- Which email template was sent.
- To which customer.
- At what exact time.
By cross-referencing the timestamp of an unwanted email with this log, you can precisely identify the template (e.g., order_conf, order_changed, or a module-specific template) that was triggered. This insight is invaluable for pinpointing the source.
3. Investigate Hooks and Third-Party Modules
If the email log points to a template other than the one explicitly linked to your custom status, or if it's the order_conf template (which is typically triggered upon initial order validation by payment modules via PaymentModule::validateOrder()), then a module or a custom hook is likely overriding the default behavior. Here's how to investigate:
- Debug Mode: Enable debug mode in Advanced parameters > Performance. This can sometimes reveal warnings or errors related to hooks being called.
- Module Review: Scrutinize payment, shipping, or order management modules. Many modules use hooks (like
actionOrderStatusUpdateoractionOrderStatusPostUpdate) to perform actions, including sending emails, when an order status changes. Temporarily disabling suspicious modules (in a staging environment first!) can help isolate the culprit. - Theme Overrides: Less common for email sending, but custom theme files or overrides could potentially interfere.
4. Clear PrestaShop Cache
While not directly related to email sending logic, always clear your PrestaShop cache (Advanced parameters > Performance > Clear cache) after making any changes to order statuses, modules, or employee permissions. Stale cache can sometimes lead to unexpected behavior.
Streamlining Workflow: Mastering Order List Filters
The second challenge – saving default filtered views for preparers – highlights a common need for enhanced admin usability. While PrestaShop 8.1.7 natively remembers the last applied filter per employee account and per shop, it doesn't offer a feature to save and load custom, named filter presets by default.
1. The Native Behavior & Its Limitations
As noted in the forum, PrestaShop 8.1.7 should remember the last filter applied by an employee. This means if a preparer filters for 'En préparation' orders, closes the browser, and reopens it, that filter should ideally persist for their account. However, this isn't a 'saved view' but rather a 'last used filter.' If another preparer logs in or the same preparer needs a different view, they must re-apply filters.
2. Workaround: Direct Filtered URLs
A simple, no-module workaround is to construct and share direct URLs with pre-applied filters. For example, if your 'En préparation' status has an ID of X (you can find this in the URL when editing the status), you can create a link like:
your-admin-domain.com/admin-folder/index.php?c>Each preparer can bookmark this link. You'll need to replace YOUR_TOKEN with a valid token from their session (which changes for security, making this less robust for long-term sharing but useful for quick access).
3. Dedicated Modules for Advanced Filtering
For a more robust and user-friendly solution, especially in a multi-preparer environment, investing in a dedicated module is often the best path. Modules like 'Advanced Order List' or 'Custom Order Views' (or similar offerings on the PrestaShop Addons marketplace) provide functionalities such as:
- Saving and loading custom filter presets.
- Assigning specific views to different employee profiles.
- Adding custom columns or actions to the order list.
These modules significantly enhance the efficiency of order management, allowing each preparer to quickly access their specific workload without manual filtering.
Beyond Statuses: Advanced Order Preparation Strategies
While custom statuses and filtered views are excellent starting points, consider these additional strategies for optimizing your order preparation:
- Status per Preparer: If you have distinct roles, create statuses like 'Preparation by John' and 'Preparation by Jane'.
- Custom Tags: Use PrestaShop's order messages or a module to add internal tags (e.g., 'Fragile', 'Gift Wrap', 'Urgent').
- Carrier-Based Sorting: Filter orders by shipping carrier for efficient batch processing.
- Time-Slot Allocation: For high-volume operations, assign orders to specific preparation time slots.
Efficient order management is crucial for customer satisfaction and operational profitability. By mastering PrestaShop's custom statuses, understanding email notification triggers, and leveraging advanced filtering techniques, you can transform your order preparation process from a bottleneck into a streamlined operation.
At Migrate My Shop, we specialize in optimizing PrestaShop environments, from complex migrations to fine-tuning your daily operations. If you're facing persistent challenges or looking to scale your e-commerce business, don't hesitate to reach out to our experts for tailored solutions.