Skip to content

Order Settings

Configure order processing, fulfillment, and management settings for your Litekart store.

Order Number Generation

Custom Order Number Format

Configure how order numbers are generated:

json
{
  "orders": {
    "number_format": {
      "prefix": "ORD",
      "suffix": "",
      "length": 8,
      "pattern": "{prefix}-{date}-{sequence}",
      "date_format": "YYYYMMDD",
      "sequence_padding": true
    }
  }
}

Examples:

  • ORD-20240115-00001234
  • ORDER-001234
  • INV-2024-01234

Sequential Numbering

Configure sequential order numbering:

json
{
  "orders": {
    "sequential": {
      "enabled": true,
      "start_from": 1000,
      "increment_by": 1,
      "reset_yearly": false,
      "reset_monthly": false
    }
  }
}

Order Status Configuration

Default Order Statuses

Litekart comes with predefined order statuses:

json
{
  "orders": {
    "statuses": {
      "pending": { "label": "Pending", "color": "#FFA500" },
      "confirmed": { "label": "Confirmed", "color": "#0000FF" },
      "processing": { "label": "Processing", "color": "#FFFF00" },
      "shipped": { "label": "Shipped", "color": "#008000" },
      "delivered": { "label": "Delivered", "color": "#008000" },
      "cancelled": { "label": "Cancelled", "color": "#FF0000" },
      "refunded": { "label": "Refunded", "color": "#800080" }
    }
  }
}

Custom Order Statuses

Add custom order statuses for your workflow:

json
{
  "orders": {
    "custom_statuses": [
      {
        "code": "quality_check",
        "label": "Quality Check",
        "color": "#FF6347",
        "notify_customer": false,
        "allow_edit": true
      },
      {
        "code": "on_hold",
        "label": "On Hold",
        "color": "#FFD700",
        "notify_customer": true,
        "allow_edit": false
      }
    ]
  }
}

Order Processing Rules

Automatic Order Confirmation

Configure automatic order confirmation:

json
{
  "orders": {
    "auto_confirm": {
      "enabled": true,
      "delay_minutes": 5,
      "payment_methods": ["stripe", "paypal"],
      "min_order_value": 10.00
    }
  }
}

Inventory Reservation

Configure inventory reservation on order placement:

json
{
  "orders": {
    "inventory": {
      "reserve_on_order": true,
      "reserve_duration_hours": 24,
      "backorder_allowed": true,
      "low_stock_threshold": 5
    }
  }
}

Order Approval Workflow

Set up order approval for high-value orders:

json
{
  "orders": {
    "approval": {
      "enabled": false,
      "threshold_amount": 1000.00,
      "approver_roles": ["manager", "admin"],
      "auto_approve_below": 100.00
    }
  }
}

Payment Settings

Payment Method Configuration

Configure available payment methods:

json
{
  "orders": {
    "payment": {
      "methods": {
        "cod": {
          "enabled": true,
          "label": "Cash on Delivery",
          "fee": 0.00,
          "max_amount": 500.00
        },
        "stripe": {
          "enabled": true,
          "label": "Credit Card",
          "fee": 2.9,
          "test_mode": false
        }
      }
    }
  }
}

Payment Terms

Configure payment terms for B2B orders:

json
{
  "orders": {
    "payment_terms": {
      "enabled": false,
      "default_terms": "net_30",
      "available_terms": {
        "net_15": { "label": "Net 15 days", "days": 15 },
        "net_30": { "label": "Net 30 days", "days": 30 },
        "net_60": { "label": "Net 60 days", "days": 60 }
      }
    }
  }
}

Shipping Configuration

Shipping Zones

Define shipping zones and rates:

json
{
  "orders": {
    "shipping": {
      "zones": [
        {
          "name": "Domestic",
          "countries": ["US"],
          "methods": [
            {
              "name": "Standard Shipping",
              "carrier": "USPS",
              "rate": 5.99,
              "estimated_days": "3-5"
            },
            {
              "name": "Express Shipping",
              "carrier": "FedEx",
              "rate": 12.99,
              "estimated_days": "1-2"
            }
          ]
        }
      ]
    }
  }
}

Free Shipping Rules

Configure free shipping thresholds:

json
{
  "orders": {
    "free_shipping": {
      "enabled": true,
      "threshold": 50.00,
      "message": "Free shipping on orders over $50",
      "excluded_products": [],
      "excluded_categories": []
    }
  }
}

Tax Configuration

Tax Calculation

Configure tax calculation settings:

json
{
  "orders": {
    "tax": {
      "calculation": "inclusive", // or "exclusive"
      "based_on": "shipping_address", // or "billing_address" or "store_address"
      "rounding_mode": "round_half_up",
      "display_inclusive": true
    }
  }
}

Tax Rates

Configure tax rates by region:

json
{
  "orders": {
    "tax_rates": [
      {
        "country": "US",
        "state": "CA",
        "rate": 8.25,
        "name": "California Sales Tax"
      },
      {
        "country": "US",
        "state": "NY",
        "rate": 8.875,
        "name": "New York Sales Tax"
      }
    ]
  }
}

Order Notifications

Email Notifications

Configure order-related email notifications:

json
{
  "orders": {
    "notifications": {
      "email": {
        "order_confirmation": {
          "enabled": true,
          "template": "order-confirmation",
          "recipients": ["customer", "admin"]
        },
        "order_shipped": {
          "enabled": true,
          "template": "order-shipped",
          "tracking_info": true
        },
        "order_delivered": {
          "enabled": true,
          "template": "order-delivered",
          "review_request": true
        }
      }
    }
  }
}

SMS Notifications

Configure SMS notifications for orders:

json
{
  "orders": {
    "notifications": {
      "sms": {
        "order_shipped": {
          "enabled": false,
          "template": "Order {{order_number}} has been shipped",
          "tracking_link": true
        }
      }
    }
  }
}

Order Fulfillment

Automatic Fulfillment

Configure automatic order fulfillment:

json
{
  "orders": {
    "fulfillment": {
      "auto_fulfill": {
        "enabled": false,
        "digital_products": true,
        "physical_products": false,
        "delay_hours": 1
      }
    }
  }
}

Fulfillment Workflow

Define custom fulfillment workflows:

json
{
  "orders": {
    "fulfillment": {
      "workflows": [
        {
          "name": "Standard Fulfillment",
          "steps": [
            "pick",
            "pack",
            "ship"
          ],
          "auto_advance": true
        },
        {
          "name": "Digital Products",
          "steps": [
            "generate_license",
            "send_download_link"
          ],
          "auto_advance": true
        }
      ]
    }
  }
}

Order Returns & Refunds

Return Policy

Configure return and refund policies:

json
{
  "orders": {
    "returns": {
      "enabled": true,
      "return_window_days": 30,
      "refund_window_days": 7,
      "auto_approve_returns": false,
      "return_reasons": [
        "defective",
        "wrong_item",
        "not_as_described",
        "changed_mind"
      ]
    }
  }
}

Refund Processing

Configure automatic refund processing:

json
{
  "orders": {
    "refunds": {
      "auto_process": {
        "enabled": false,
        "max_amount": 100.00,
        "require_approval": true
      },
      "refund_methods": {
        "original_payment": true,
        "store_credit": true,
        "bank_transfer": false
      }
    }
  }
}

Order Export & Reporting

Order Export

Configure order export settings:

json
{
  "orders": {
    "export": {
      "formats": ["csv", "xlsx", "pdf"],
      "fields": [
        "order_number",
        "customer_name",
        "order_date",
        "total_amount",
        "status"
      ],
      "date_range_limit": 90, // days
      "max_records": 10000
    }
  }
}

Order Analytics

Configure order reporting and analytics:

json
{
  "orders": {
    "analytics": {
      "enabled": true,
      "retention_days": 365,
      "metrics": {
        "average_order_value": true,
        "conversion_rate": true,
        "return_rate": true,
        "fulfillment_time": true
      }
    }
  }
}

Order Archiving

Automatic Archiving

Configure automatic order archiving:

json
{
  "orders": {
    "archiving": {
      "enabled": true,
      "archive_after_days": 365,
      "archive_statuses": ["delivered", "cancelled"],
      "compress_archives": true,
      "retention_years": 7
    }
  }
}

Performance Optimization

Order Processing Limits

Configure processing limits to prevent overload:

json
{
  "orders": {
    "limits": {
      "max_orders_per_minute": 60,
      "max_items_per_order": 50,
      "max_order_value": 10000.00,
      "rate_limiting": {
        "enabled": true,
        "requests_per_minute": 30
      }
    }
  }
}

Database Optimization

Optimize database queries for order operations:

json
{
  "orders": {
    "database": {
      "index_orders": true,
      "partition_by_month": false,
      "cache_order_summaries": true,
      "query_timeout_seconds": 30
    }
  }
}

Order Data Retention

Configure data retention policies:

json
{
  "orders": {
    "compliance": {
      "data_retention": {
        "order_data_years": 7,
        "payment_data_years": 7,
        "audit_logs_years": 7
      },
      "gdpr_compliance": true,
      "ccpa_compliance": true
    }
  }
}

Troubleshooting

Common Order Issues

Orders Not Processing

  • Check payment gateway configuration
  • Verify inventory levels
  • Review order validation rules

Shipping Rate Errors

  • Validate shipping zone configuration
  • Check carrier API credentials
  • Review weight/dimension calculations

Tax Calculation Issues

  • Verify tax rate configuration
  • Check address validation
  • Review tax exemption rules

Debug Mode

Enable order processing debugging:

bash
# Environment variable
DEBUG_ORDERS=true

# Check order processing logs
tail -f logs/orders.log

Order Recovery

Recover Failed Orders

sql
-- Find failed orders
SELECT * FROM orders
WHERE status = 'failed'
AND created_at > NOW() - INTERVAL '24 hours';

-- Retry order processing
UPDATE orders
SET status = 'pending', retry_count = retry_count + 1
WHERE id = 'order_id';