Fix CodeIgniter Email & Pagination

Job ID: 40463860

Budget: $10 – $30 USD

I’m running a live CodeIgniter system that suddenly started to misbehave in two ways.

First, a payment-confirmation email sometimes goes out even when no order has been placed. I need the root cause identified, the offending logic repaired, and proof that only legitimate transactions now trigger the template.

Second, while the admin panel lists every invoice correctly, customers can only see the first eight. I need the customer view adjusted so all invoices appear, broken into regular paginated pages—standard “previous / next” navigation is fine.

Nothing in the core has been updated recently, so the fixes should sit cleanly on top of the current codebase. When you’re done I’ll verify that:
• A test purchase without payment does not create an email.
• A real purchase does.
• The customer invoice list shows every record and paginates as expected.

If you’re comfortable debugging CodeIgniter controllers, models, and email helpers, this should be quick work. Please keep the changes well-commented so I can merge them straight into production.