Session expiration Your session is going to expireClick here to extend


Small project <800

Posted on

7/1/14 2:11 PM



This project has expired

Why don't you register anyway? We are sure that you will find many similar projects out of the thousands waiting for you!

Post similar project now


Dear Sirs, I need a plugin for Virtuemart 2 to export at the end of check out process each order in a custom csv format.

The csv file has to be saved in a folder of web server and sent by email.

In previous version of Virtuemart (1.1.9) I included a class in ps_checkout.php ...

require_once(CLASSPATH.'ps_ordercsv.php'); save_and_send_order_csv($order_id);

 ... ps_ordercsv.php is a script that save and send the csv file.   In the new version with Virtuemart 2 I prefer to have a plugin or a override, but also a little hack as previous version will be fine.

We need some configurable parameters:

- CSV_SEPARATOR         - default "^" - CSV_TEXT_DELIMITER    - default "" (NONE) - CSV_NEWLINE"          - default "\n" - CSV_FILE_PATH"        - default "csvi/orders") // Where to save the CSV 001 file on the host. This is an absolute path! - CSV_FILE_PREFIX       - default "O" // Prefix of the CSV file, can be left empty. - INCLUDE_HEADERS       - default false);    // Whether to include a header line in the CSV or not

- FROM_EMAIL - FROM_EMAIL_NAME - EMAIL_SUBJECT  {order_id}    // Subject will replace {order_id} with the order id _ TO_EMAIL

Each row in csv file shall have these fields:

Order Number       => order_id User name            => username Company              => company Ship to              => address_1, address_2, city, state, country, zip, Notes                  => customer_note, SKU                    => product_sku, Quantity            => product_quantity, Price                  => product_item_price,

For example when user test_username press botton "Confirm order" a file O5421.csv is saved and sent with the following rows inside:

5421^test_username^test_company^Via IX Luglio, 254b, Pordenone, PN, ITA, 33054^test_note^24093^1,00^7,70 5421^test_username^test_company^Via IX Luglio, 254b, Pordenone, PN, ITA, 33054^test_note^34916^10,00^0,71 5421^test_username^test_company^Via IX Luglio, 254b, Pordenone, PN, ITA, 33054^test_note^12937^1,00^23,41

Delivery time 1 week, contact me for further details.