PrestaShop to QuickBooks Desktop import
A PHP script that turns PrestaShop orders into a QuickBooks Desktop IIF invoice file, with test orders you can run offline.
What's in it
ps2qb.php(PHP 8, curl only): one invoice per order, one line per product (QB item = PrestaShop SKU), plus shipping and discount lines- A checklist and a flag when an order total does not match
- Account and item names sit in a
$cfgblock so they can match a chart of accounts - Offline test:
php ps2qb.php --fixture=sample-orders.json --out=test.iif - Sample buyers are clearly fake (Example Boutique LLC, Pat Example, Sam Sample)
The output
!TRNS TRNSID TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO
!SPL SPLID TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO QNTY PRICE INVITEM
!ENDTRNS
TRNS INVOICE 11/12/2026 Accounts Receivable Example Boutique LLC 1245.00 PS-XKBKNABJK PrestaShop order 1041
SPL INVOICE 11/12/2026 Sales - Wholesale Example Boutique LLC -510.00 PS-XKBKNABJK Heavyweight Tee - Black, L -60 8.50 TEE-BLK-L
SPL INVOICE 11/12/2026 Sales - Wholesale Example Boutique LLC -690.00 PS-XKBKNABJK Fleece Hoodie - Grey, M -40 17.25 HOOD-GRY-M
SPL INVOICE 11/12/2026 Shipping Income Example Boutique LLC -45.00 PS-XKBKNABJK Shipping Shipping
ENDTRNS
TRNS INVOICE 11/13/2026 Accounts Receivable Sam Sample 612.00 PS-QOPLWZTRE PrestaShop order 1042
SPL INVOICE 11/13/2026 Sales - Wholesale Sam Sample -648.00 PS-QOPLWZTRE Twill Cap, Navy -120 5.40 CAP-NVY
SPL INVOICE 11/13/2026 Sales Discounts Sam Sample 36.00 PS-QOPLWZTRE Discount Discount
ENDTRNS