Standalone administrative desktop interface for the Etsy store (store_id = 6).
Guides the operator through downloading an Etsy “orders awaiting shipment” CSV,
uploading that file, and importing each unique Order_ID into OpenCart. New
receipts are staged in pd_etsy_orders, then mirrored as oc_order
headers (status 15 on create, status 5 after line items), oc_order_product
rows, and oc_order_total sub-total / shipping / fee / grand-total lines.
Inventory is decremented on oc_product with an audit row in
pd_product_log. Duplicate Etsy order IDs that already have a linked
oc_order_id are skipped; additional CSV lines with the same
Order_ID append products and recalculate totals. When OpenCart already holds
a tracking number that pd_etsy_orders does not, the script applies the
three-point handshake in one transaction: keep oc_order.tracking canonical,
append an idempotent oc_order_history comment
(Shipped via [CARRIER]. Tracking: [TRACKING_NUMBER]), and copy the token
onto pd_etsy_orders.tracking so the operator can mark the Etsy shipment complete.
pd_etsy_orders
and create matching OpenCart orders.oc_order.tracking onto pd_etsy_orders.tracking. On Etsy,
click the checkmark to the right of the shipping method and select Completed.