About Club osCommerce

Showcasing osCommerce…the good, the bad and the ugly!

Follow osc_pro on Twitter

CSV Manifest Import to update Orders

Written By Gary on Aug 12 2011 · Comments (8) Follow osc_pro on Twitter

Completed this past week a CSV (Comma Separated Values file) import facility which scans through a CSV line by line and updates the order_status_history to add the postage tracking number and sends an email to the buyer to let them know their order has been shipped. The CSV is produced by the dropshipper, so I had to;

1. add in an upload facility to grab the Manifest CSV (for this I used uploadify)
2. bespoke code to scan through each line of the CSV to see if the order ID has 3 letters attached to it (these 3 letters are the dropship code to say "shipped").
3. if any line with those 3 letters are found, then grab the contents of another cell (tracking number) and insert into the order_history.
4. send email to the customer to let him know his package is on the way and his tracking number

The CSV could contain many shipped items and many not-yet-shipped orders. So all this had to be done on a multiple basis. This meant a foreach loop to update the DB and send the email.

My client now can update ALL the new shipped orders in one shot, rather than have to manually scan each Manifest, find the order, edit it, copy/paste the tracking number and so on. This takes the workload down from perhaps 30 to 60 minutes per day to just a few seconds!

Conclusion

All in all, a very interesting project, and one which will be of immense value to the site owner long term. By saving a minimum of 30 minutes per day, that's 3 working weeks over the course of a year – 3 weeks in which the site owner can concentrate on other important things such as customer service, SEO, finding new products or whatever.


Buy Gary A Beer?
Buying me a "beer" helps me to keep my contributions updated and keep this blog alive - and you get a link from my homepage to your site. Cheers!


8 Comments

  1. Can I upload Products Through Csv FIles in oscommerce? If yes then how?

    Comment by yuvraj jain — October 17, 2011 @ 10:51 am


  2. Easy populate. It is not working with 231.

    Comment by Gary — November 7, 2011 @ 11:08 pm


  3. hi Gary,

    Is this available as a contribution ?
    If not, could it be made available ?

    I'd rather not reinvent the wheel, or as they say here "I prefer to be lazy rather than tired :D "

    Comment by Carine B — November 26, 2011 @ 3:10 pm


  4. Hello!

    where i can download this mod?

    Thanks
    Art

    Comment by Arthur — November 27, 2011 @ 2:00 pm


  5. It is not publically available – as it was made for a particular client.
    I can remake it on a client by client basis.

    Comment by Gary — November 28, 2011 @ 11:03 am


  6. Hi Carine – it wouldn't be made available by me as a contribution, but can be made again on a customer by customer basis.

    Comment by Gary — November 28, 2011 @ 11:04 am


  7. a quick heads up that our custom version is up-and-running for about 10 days now, and everything is going smoothly and saving tons of time to send the tracking numbers automagically.
    we still also use the order comments toolbar with some rather long texts which we personalize to keep the human touch announcing when approximately the package can be expected (transit/delivery times may vary between countries).

    Comment by Carine — December 14, 2011 @ 7:38 pm


  8. Thanks for letting me know Carine :)

    Comment by Gary — January 19, 2012 @ 12:53 pm


Leave a comment

RSS feed for comments on this post

Hot 100 osCommerce Shops

View the osCommerce HOT 100These are the best looking, most exceptional osCommerce Stores as voted for by you.

New to osCommerce - get inspiration from these beautiful shops. Reckon your site has what it takes to become a member of the HOT 100? Submit it!