Thanks for providing the information in the comment above. Unfortunately I don't think there's a built-in way to programmatically do this. However, the exp_cartthrob_invoice_table
is pretty straightforward. You should consider an extension that fires after an order is placed (potentially via the "offline payments" or "Save Order" gateways) that takes their info and INSERT
s a row into exp_cartthrob_invoice_table
.
Here's the structure of that table:
CREATE TABLE `exp_cartthrob_invoice_table` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`inv_description` text,
`inv_title` text,
`inv_line_items` text,
`inv_cost` varchar(12) DEFAULT NULL,
`inv_total_hours` varchar(12) DEFAULT NULL,
`inv_status` varchar(20) DEFAULT NULL,
`inv_date` int(11) DEFAULT NULL,
`inv_paid_date` int(11) DEFAULT NULL,
`inv_email_address` varchar(255) DEFAULT NULL,
`inv_member_id` int(10) DEFAULT NULL,
`inv_order_id` int(10) DEFAULT NULL,
`inv_reference_number` varchar(1000) DEFAULT NULL,
`inv_first_name` varchar(255) DEFAULT NULL,
`inv_last_name` varchar(255) DEFAULT NULL,
`inv_company` varchar(255) DEFAULT NULL,
`inv_address` varchar(255) DEFAULT NULL,
`inv_address2` varchar(255) DEFAULT NULL,
`inv_city` varchar(255) DEFAULT NULL,
`inv_state` varchar(5) DEFAULT NULL,
`inv_zip` varchar(10) DEFAULT NULL,
`inv_country_code` varchar(3) DEFAULT NULL,
`inv_phone` varchar(15) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=103 DEFAULT CHARSET=utf8;
And here's a sample row. The inv_line_items
column is a base64_encode()
d JSON object.
INSERT INTO `exp_cartthrob_invoice_table` (`id`, `inv_description`, `inv_title`, `inv_line_items`, `inv_cost`, `inv_total_hours`, `inv_status`, `inv_date`, `inv_paid_date`, `inv_email_address`, `inv_member_id`, `inv_order_id`, `inv_reference_number`, `inv_first_name`, `inv_last_name`, `inv_company`, `inv_address`, `inv_address2`, `inv_city`, `inv_state`, `inv_zip`, `inv_country_code`, `inv_phone`)
VALUES
(1, 'Test Invoice', 'Test Invoice', 'YToxOntpOjA7YTo0OntzOjEwOiJpdGVtX3RpdGxlIjtzOjQ6InRlc3QiO3M6MTY6Iml0ZW1fZGVzY3JpcHRpb24iO3M6NDoidGVzdCI7czo1OiJob3VycyI7aToyO3M6OToiaXRlbV9jb3N0IjtpOjI1MDt9fQ==', '250', '2', 'pending', 1382031430, NULL, '[email protected]', 0, NULL, '', 'John', 'Smith', '', '', '', '', '', '', '', '');
Feel free to contact us at [email protected] if you'd like help implementing this!