Back Orders

This guide explains how to enable and implement back orders functionality in your e-commerce system. Back orders allow customers to purchase products even when inventory levels are at or below zero, helping you manage out-of-stock situations more effectively.

Overview

The back orders feature enables administrators to accept orders for products with zero or negative inventory levels. When enabled, customers can complete checkout for out-of-stock items, and the system will automatically notify administrators of these orders.

Enabling Back Orders

  1. Navigate to the Catalogues module
  2. Select Configure
  3. Open Manage Configuration
  4. Locate and enable the "Allow Back Orders" switch
Compatibility Note: Back orders functionality is not compatible with the 'stock-active' centre option. If you receive the error " is out of stock", you must remove the 'stock-active' centre option.

Implementation Guide

To implement back orders in your templates, the system provides the $allow_back_orders variable:

<{$allow_back_orders}>

Template Integration Example

Here's a complete implementation example for handling back orders in your product templates:

<{if !$allow_back_orders && $product->getQty() <= 0}>
    // deny add to cart view partial
<{else}>
    <{if $product->getQty() <= 0 && $product->getRestockDate('U') > $smarty.now}>
        // Show message about when product will be back in stock
    <{/if}>
    // allow add to cart view partial
<{/if}>
Code Explanation:
  • First condition checks if back orders are disabled and product quantity is zero or less
  • Second condition handles displaying restock information when appropriate
  • The template adjusts the add-to-cart functionality based on these conditions

Notification System

When back orders are enabled, the system automatically manages several notifications:

Best Practices

Troubleshooting

Common issues and solutions:

  • Stock Active Conflicts: Remove 'stock-active' centre option if receiving out-of-stock errors
  • Email Notifications: Verify email configuration if admin notifications aren't being received
  • Template Issues: Ensure all template variables are properly implemented
Important: Always test back order functionality thoroughly after implementation or updates to ensure proper order processing and inventory management.