Author Topic: [HACK] Export Orders and Batch update of Status  (Read 87482 times)

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
[HACK] Export Orders and Batch update of Status
« on: February 25, 2009, 22:27:48 pm »
Features

Multiple export formats (tab delimited text, csv, native Microsoft Excel, eParcel)
Multiple Invoice production direct to Microsoft Excel,, then straight to printer!
Batch update order status to a new state, and notify customer
Limit orders by date or number
Export multiple order states
Export orderlines
Export customer details only
Column headers as defined by your Virtuemart installation
Multilingual(ish)
Javascript enable/disable option fields for usability

Compatibility

Only works with VM 1.1.X

Preview Images
This is what you are getting!




This was originally http://forum.virtuemart.net/index.php?topic=36274.0 but support for VM1.0 is no longer, therefore this new post and thread.

export-1.1-0.2: Fixed export company logo to Excel
export-1.1-0.3: Fixed missing update for Text/CSV export types
export-1.1-0.4: Dropped Installer, Zip Windows Unzip Unix problems
export-1.1-0.5: 2009.04.17: Bug fix, removed reference to undefined function
export-1.1-0.6: Support for áéíóú (UTF-8)
export-1.1-0.7: WAMP Image insert Support, XML export added
export-1.1-0.8: Fixed non-update bug introduced in 0.7. Fixed MS Excel Status Update

[attachment cleanup by admin]
Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

purestore

  • Beginner
  • *
  • Posts: 13
Re: [HACK] Export Orders and Batch update of Status
« Reply #1 on: March 13, 2009, 08:25:54 am »
Hi,

Just what I was looking for. However, I can't get it to work. Very new at this sort of thing and could need some more help please.
Using ftp client and placed the .zip file in the www directory, and the install_export.php to /www/administrator/components/com_virtuemart/html
Get the error message: You do not have permission to access the requested module, when using the other url suggested in vm config admin.= not working.
Also, why are there two .zip files to choose from in the first place to download. Difference? What do I do with the admin.install_export.php file?
It would be easier for someone like myself who just want things to work to have this excellent little thing upploadable via the Extention Manager Install in Joomla.

Please help,

J-E

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: [HACK] Export Orders and Batch update of Status
« Reply #2 on: March 13, 2009, 15:54:29 pm »
It looks like you have added two features only one of which I am presently interested in (bulk order status updates).  I also see you have two zip files.  Is the second one an update of the first or are these two feastures contained separately in the two files?

I only partially agree with the last post.  I try to minimize my use of hacks because I have to constantly reinstall them with every VM (or Joomla) update.  However, a module is not the answer.  If this works well, it should be added to the VM core.  Even with my very smal business it is quite tedious to update the orders status one at a time.  I think someone on the dev team offered to add it to the core if a good implemtaion is developed.  Are you out here listening to this?

Bruce
www.pepper-passion.com

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #3 on: March 15, 2009, 21:22:37 pm »
Hi all and thanks for the interest.

Firstly, purestore you have read the instructions incorrectly, install_export.php needs to go in your www folder, then navigate to http://yourserver/install_export.php

Sometimes install_export.php will fail, the unzip class fails to find another support class, it is Joomla code so rather than mess with this I included admin.install_export.php for the Medium install.

admin.install_export.php goes to /www/administrator/components/com_virtuemart/html/

Basically this patch uses the same code to install that Virtuemart does to run it's update.  I have tried to make this as simple as possible to install for the end-user (There is also some hidden code that registers the export function, ps_install.php).

There are plans afoot for a VM module installer (I think full implementation is slated for VM2) but at the moment this option doesn't exist but VM1.2(Alpha) does show some foundations for this.  The Joomla Installer would be like using a hammer for a nut for what this hack does.

export-1.1-0.2.zip is an update to export-1.1-0.1.  I've removed it now to avoid future confusion.  I am trying to get this included in VM1.2.




Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: [HACK] Export Orders and Batch update of Status
« Reply #4 on: March 15, 2009, 22:17:27 pm »
I installed your program and tired the easy method.  It indicated a successful installation but it was not working.  I then uploaded the admin.install_expot.php to the inidcated directory as it was not shwing as being present and it still did not work.  I finally just extracted the files and uploaded them all at once.  This was actually the easiest way of all and I was able to get the menu for the export of orders.  However, what I was really looking for was the ability to update order status in bulk.  Where is this little gem hidden?  I tried checking multiple orders and changing the status and then clicked on one of the update buttons.  The only order updasted was the one for wehich I checked the update button.  Am I missing something here?

Bruce

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #5 on: March 16, 2009, 21:33:24 pm »
Hi Bruce,

The hidden gem is in the pink.

After the easy install was there the option of 'Orders' -> 'Export Orders'? It has been tested on WAMP and LAMP.

Chris,
Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: [HACK] Export Orders and Batch update of Status
« Reply #6 on: March 16, 2009, 22:10:22 pm »
I think I misunderstood.  I have one unshipped order received today so I tried doing an export over the range of the orders received today and checked them for bulk update to "shipped".  The export worked fine but when I when I checked the orders list within VM, the status of the most recent order was unchanged showing as "confirmed".

Frankly, I have no need to export order but I do have a need to update the status of multiple orders with a single click of the update button.  There was another hack that did exactly this for the older versions of Virtuemart.  I imagine there are many reasons why people would want to be able to export their orders as CSV files but why would you allow this to happen and change the status on the export file but not also update this within VM?  Sound like a bad idea to me unless I made mistake during my trial export.  Any comments?

Bruce

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #7 on: March 16, 2009, 22:15:02 pm »
In my tests it did upate the VM, if it is not updating in VM then there is a problem, obviously.

The update code goes straight back to core VM code.

The image at the top shows exactly what you are getting in this hack
Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: [HACK] Export Orders and Batch update of Status
« Reply #8 on: March 16, 2009, 22:26:00 pm »
My install was a little funky.  I started with the easy install but not all of the files were written so I completed it with manual upload of files.  Not an ideal situation.  I should also mention that when I exported the three orders, two of them were already shipped and one was not.  If I tried to do this the conventional way one at a time I would get an error message if I tired to update without a change in status.  I would prefer to be abe to do this within the VM order list view.  Many times I am not updating a continuous list of order so I go through and check mark the orders and change their status.  In the other hack there was a bulk update staus button on the upper menu bar that would do this for all of the checkmarked orders.

I understand that you primary interest may be the export function but do you not also sometimes wish to export a number of order that do not form a continuous number sequence?

Bruce

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #9 on: March 16, 2009, 22:40:18 pm »
Hi Bruce,

The manual upload is never ideal, thats why I made the install files, with the fall back to the least favourable option.

The way I'd like to work with my orders is export all outstanding orders for import into external system/invoice printing. If I discovered an item was out of stock, prefer then to go back in, and update these.  All orders that are in a state that is not for export would not be showing in my (filtered) to-do lists.

But then, we all work differently.

P.S Using CSV or Text export would not have updated or shown as shipped the confirmed order in the export file, the code is not there for this format. I will post updated file tomorrow in export-1.1-0.3.outer.zip

Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

purestore

  • Beginner
  • *
  • Posts: 13
Re: [HACK] Export Orders and Batch update of Status
« Reply #10 on: March 17, 2009, 06:26:55 am »
Hi everyone,
And thank you Chris for clarifying for a newbe like me! I managed to install and it works fine in extended mode in vm but is not visible in Simple mode. I deleted the export.zip and the admin.install_export.php as requested from the screen upon completion of the installation.

Thank you,

Jan-Erik


creagenzia

  • Beginner
  • *
  • Posts: 3
Re: [HACK] Export Orders and Batch update of Status
« Reply #11 on: March 31, 2009, 20:04:03 pm »
This is an interesting piece and will do what I needed...thank you Chris for your work!

Installation observations:

- easy install does not perform due to a mistake in the filename in install-export.php (it requests still export-1.1-0.2.zip instead of export-1.1-0.3.zip).

- if you adjust install-export.php or rename export-1.1-0.3.zip you will get a "installation succesfull" screen but the installation writes all files as paths (separated with backslash "\") into the root directory instead of into the actual folders.

so the installer needs some more work. I worked my way around by manually deplyoing the files in their relevant places.

If you have VM-Affiliate installed, it will overwrite some files (i.e. header.php and extlayout.js.php) what makes the affiliate admin menu disappear. So this files will have to be adjusted - chris might want to take this into consideration for future releases.
 
don't forget to back up first, if you implement any hack in a life site... ;)

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #12 on: April 01, 2009, 21:22:40 pm »
Yes, the installer has been more problematic, (WinZip, File Perms, etc), than I think it is worth and is distracting from the core purpose of this hack.

Therefore the installer is gone and the download is now a basic unzip and ftp to the server.

As creagenzia notes, this does update the header.php and extlayout.js so modification will be needed to these files if you are using other hacks  (Please backup these two files before installation). I will put this in the docs for 1.1-0.5 please PM me in the meantime if you need guidance on this.

Hopefully we can concentrate now on any problems that occur with the actual export hack!  :P
Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)

Robroille

  • Beginner
  • *
  • Posts: 1
Re: [HACK] Export Orders and Batch update of Status
« Reply #13 on: April 06, 2009, 19:21:08 pm »
the zip file isn't available for download. Whare can i download it ?

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #14 on: April 06, 2009, 21:36:54 pm »
It's at the bottom of the first post? Don't know if you have to be logged in though?
Hacks
Export Orders & Batch Update -> http://forum.virtuemart.net/index.php?topic=52215.0
UK Counties -> http://forum.virtuemart.net/index.php?topic=33968.0
Sites running Virtuemart
http://www.ladders247.co.uk http://www.tools247.co.uk http://www.mackay.co.uk
Synchronization
Synchronized with our instore system via PrePrepSQL and missing Image Remote Retrieval system ;-)