Brief description of project: To create a function in Virtuemart that will take key shipping information from a confirmed, paid order and write it to a CSV file accessible to the shipper.
The Virtuemart installation uses one shipping module and at present one payment method. Payment is via a credit/debit card payment via a merchant account with Secure Trading, but it is hoped to expand this to accept PayPal payments before the site goes live.
The store is based in the UK and sells only to UK addresses in pounds sterling.
Fulfilment is carried out by a distributor that packages the orders for collection by a courier service. The courier service requires all shipping information to be made available in a CSV file that the shipper’s system can poll regularly throughout the day.
Secure Trading provides its own VM payment module, and test transactions are successful. On completion of checkout, a confirmation email is sent to the store with all the details of the transaction, including the information required by the shipper.
However, this information cannot be used at this point to create a record for the CSV file as:
1. no payment has yet been submitted;
2. the confirmation email contains a link allowing the purchaser to amend the order.
Therefore the purchase has to be concluded before the shipping information is passed to the CSV file. This means that it either has to be passed through the Secure Trading system (it is possible to create user-defined fields) or picked up once the transaction is completed and the focus returns to the website. The Secure Trading process allows for a CGI script to be called at this point.