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

webuser

  • Jr. Member
  • **
  • Posts: 72
Re: [HACK] Export Orders and Batch update of Status
« Reply #60 on: October 27, 2009, 04:30:38 am »
Has anyone else noticed that the format of the exported CSV when you choose eParcel is nothing like the format required by Australia Post? Does anyone know whether they have changed the format or whether this was never the right format. Has anyone worked on a fix?
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #61 on: October 29, 2009, 21:59:37 pm »
Here's how to update the menu to show export orders if you already have another hack installed.  Please remove <!--START EXPORT ORDERS MENU MOD--> and <!--END EXPORT ORDERS MENU MOD--> before saving your files.

FILE: administrator/components/com_virtuemart/header.php
Code: [Select]
case 'order':
?>
<h3 class="title-smenu" title="order" onclick="SwitchMenu('<?php echo $modCount ?>')">
<?php echo $VM_LANG->_('PHPSHOP_ORDER_MOD')
?>

</h3>
<div class="section-smenu">
<ul>
<li class="item-smenu vmicon vmicon-16-content">
<a href="<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&amp;page=order.order_list"?>"><?php echo $VM_LANG->_('PHPSHOP_ORDER_LIST_MNU'?></a>
</li>
<!--START EXPORT HEADER MENU MOD-->
<li class="item-smenu vmicon vmicon-16-content">
<a href="<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&amp;page=order.orders_export"?>">Export</a>
<hr />
</li>
<!--END EXPORT HEADER MENU MOD-->
<li class="item-smenu vmicon vmicon-16-content">
<a href="<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&amp;page=order.order_status_list"?>"><?php echo $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_MNU'?></a>
</li>
<li class="item-smenu vmicon vmicon-16-editadd">
<a href="<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&amp;page=order.order_status_form"?>"><?php echo $VM_LANG->_('PHPSHOP_ORDER_STATUS_FORM_MNU'?></a>
</li>

</ul>
</div>

FILE: components/com_virtuemart/js/extlayout.js

Code: [Select]
case 'order':
$modules[$module]['title'] = $VM_LANG->_('PHPSHOP_ORDER_MOD');
$modules[$module]['links'][] = array('iconCls' => 'vmicon vmicon-16-content', 'href' => 'page=order.order_list', 'text' => $VM_LANG->_('PHPSHOP_ORDER_LIST_MNU'));
<!--START EXPORT ORDERS MENU MOD-->
$modules[$module]['links'][] = array('iconCls' => 'vmicon vmicon-16-content', 'href' => 'page=order.orders_export',  'text' => 'Export Orders' );
<!--END EXPORT ORDERS MENU MOD-->
$modules[$module]['links'][] = array('iconCls' => 'vmicon vmicon-16-content', 'href' => 'page=order.order_status_list', 'text' => $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_MNU'));
$modules[$module]['links'][] = array('iconCls' => 'vmicon vmicon-16-editadd', 'href' => 'page=order.order_status_form', 'text' => $VM_LANG->_('PHPSHOP_ORDER_STATUS_FORM_MNU'));


In response to the 'Australia Post' issue, this was generated for a client who provided a sample file. I have no idea on the correct format or whether it has changed, but can only assume it has done as the customer was happy at the time.

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 ;-)

webuser

  • Jr. Member
  • **
  • Posts: 72
Re: [HACK] Export Orders and Batch update of Status
« Reply #62 on: October 29, 2009, 23:36:07 pm »
cool I think our client is going to ask us to re-do the export script so its the same format as the latest Australia Post eParcel system so if that happens I'll post back here with whatever we come up with.
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

fluidfusion

  • Beginner
  • *
  • Posts: 29
Re: [HACK] Export Orders and Batch update of Status
« Reply #63 on: November 04, 2009, 17:54:47 pm »
Just having a look at this and I like it!

Will it allow me to export credit card info?

Also, can I manipulate the order that the fields are exported in so they match a CSV template I have been supplied by my fulfilment house?

webuser

  • Jr. Member
  • **
  • Posts: 72
Re: [HACK] Export Orders and Batch update of Status
« Reply #64 on: November 10, 2009, 06:46:22 am »
Hi Chris, I've sent you a PM. We have hacked your hack so that it fits in with the latest eParcel structure soo the PM. Talk soon.
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

EmYia

  • Beginner
  • *
  • Posts: 3
Re: [HACK] Export Orders and Batch update of Status
« Reply #65 on: November 10, 2009, 17:20:35 pm »
Hi everybody. First of all thanks for this hack it's exactly what i needed.

But i have a problem :

When i try to export with xls format i got the following error

Fatal error: Cannot redeclare class ole_pps in /usr/local/lib/php/OLE/PPS.php on line 33

it work for every format ( csv,xml,txt )

anyone can help me?

config : joomla 1.5.14 VirtueMart 1.1.3

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #66 on: November 11, 2009, 21:11:54 pm »
Probably a conflict with administator/components/com_virtuemart/classes/PEAR/OLE/PPS.php, they should be the same file.  (Files included in case PEAR is not installed)

Try renaming the file above(PPS.bak), should, hopefully, force it to use the installed PEAR file.
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 ;-)

EmYia

  • Beginner
  • *
  • Posts: 3
Re: [HACK] Export Orders and Batch update of Status
« Reply #67 on: November 12, 2009, 09:49:53 am »
Thanks for answering. I tried rename the file and I've now the following message :

Fatal error: main() [function.require]: Failed opening required '[pathtojoomla]/administrator/components/com_virtuemart/classes//PEAR/OLE/PPS.php' (include_path='.:/usr/local/lib/php') in [pathtojoomla]/administrator/components/com_virtuemart/classes/PEAR/OLE/PPS/Root.php on line 24

What should I do?

astridv

  • Beginner
  • *
  • Posts: 3
Re: [HACK] Export Orders and Batch update of Status
« Reply #68 on: November 16, 2009, 13:45:29 pm »
Hi all,
I have another quite odd problem: new orders no longer get added to the database (quite detrimental...) AND I export only gibberish, so no legible address..
any ideas? I use VM 1.1.4 and the latest hack.



   Specificatie lijst   
6   2009-11-13 16:05   "  "      ", US"         ", US"         astrid@email.com   Joopy BV   Ä117,92   Ä2,20   Ä7,08   Ä127,20   Ä0,00   Ä0,00   EUR   Shipped   Vooraf per bank   ""   83.163.188.112   sa1   Schip Ahoy!   10   Ä11,79   Ä117,92   Ä12,50   Ä125,00      

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #69 on: November 17, 2009, 21:13:52 pm »
New orders not being added to the database would not be the result of this hack as we don't change any of the core files except for the admin menu pages.

What currency are you using? Was it working before you upgraded to VM1.1.4, I have not actually tested yet with 1.1.4, not that there should be a problem, except maybe the menu options disappearing, see previous posts to fix this.

It would be best to post a file or PM me one.

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 ;-)

chris.t.uk

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 98
Re: [HACK] Export Orders and Batch update of Status
« Reply #70 on: November 17, 2009, 21:19:13 pm »
EmYia,

Could you rename PPS.bak back to PPS.php and check the permissions on the files in the PEAR ([pathtojoomla]/administrator/components/com_virtuemart/classes/PEAR/) folder, 644 should be ok?
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 ;-)

DaisyEE8

  • Beginner
  • *
  • Posts: 16
Re: [HACK] Export Orders and Batch update of Status
« Reply #71 on: December 31, 2009, 10:07:31 am »
Hi there, it's me again. ;)

I found a bug(?) on the very last day of this year.
Export Orders 1.1.0.8
J!1.5.14 VM 1.1.3 stable

No problems for a while. But in nower days I cannot export if I choose XLS format.
Works fine for csv or xml but not for xls. The sheet is empty.
Error: Wrong extension for this file - could be corrupted.
Tried around a bit and recognised that if I disable the "show order item?" option the xls is generated with no problems.

we have about 2500 orders using office 2000 and 2007


Thanks in advance and a happy new year!

Daisy



rgbartist

  • Beginner
  • *
  • Posts: 4
Credit Card Info
« Reply #72 on: January 14, 2010, 18:26:08 pm »
Can we get details for the code and SQL instructions to export Credit Card numbers, expiration and CSV???

this is too vague:

To export credit card details you will need to modify the query in get_query() in ps_orders_export.php (I think you'll need to join in table jos_vm_order_payment)

Then just find the function that relates to the type of export you want and add in the fields, also in ps_orders_export.php

If you can do the SQL then it is very easy.

Chris.

anax

  • Beginner
  • *
  • Posts: 5
Re: [HACK] Export Orders and Batch update of Status
« Reply #73 on: February 01, 2010, 18:03:44 pm »
Works fine for csv or xml but not for xls. The sheet is empty.
Error: Wrong extension for this file - could be corrupted.
Hia, I just installed the Hack and as with Daisy all is fine for csv and xml. But when I try to export a .xls file I get a page of errors beginning with...
Quote
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/lib/php:/PEAR.php) is not within the allowed path(s): (/home/barbara:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/barbara/public_html/administrator/components/com_virtuemart/classes/PEAR/PEAR_Include.php on line 70

Any help much appreciated.

dstein

  • Beginner
  • *
  • Posts: 4
Re: [HACK] Export Orders and Batch update of Status
« Reply #74 on: February 24, 2010, 22:11:52 pm »
Hello,
I'd like to start using the Invoices export, but I noticed that product attributes do not show up on this export. Any suggestions for the quickest way for me to add this in?
Thanks!