Adriano Faria Posted September 26, 2017 Author Posted September 26, 2017 14 minutes ago, Vermith said: You are aware that the support thread here links to the one i am replying in right now? Right NOW yes. Before you bought another resource (Export PAYOUTS) and was asking support in this topic (Export INVOICES). Anyway, it is right now after you buy this. Will test the plugin in a couple of hours and will reply here with a fix or asking for more information if can’t reproduce it.
Adriano Faria Posted September 26, 2017 Author Posted September 26, 2017 13 hours ago, Vermith said: You are aware that the support thread here links to the one i am replying in right now? Anyway trying to export like 2 months running in this error: (not working) OutOfRangeException: (0) #0 /var/www/xxx/forum/init.php(448) : eval()'d code(153): IPS\Patterns\_ActiveRecord::load(5) #1 /var/www/xxx/forum/system/Dispatcher/Controller.php(85): IPS\nexus\modules\admin\payments\hook181->exportInvoices() #2 /var/www/xxx/forum/applications/nexus/modules/admin/payments/invoices.php(35): IPS\Dispatcher\_Controller->execute() #3 /var/www/xxx/forum/system/Dispatcher/Dispatcher.php(146): IPS\nexus\modules\admin\payments\_invoices->execute() #4 /var/www/xxx/forum/yyyy/index.php(13): IPS\_Dispatcher->run() #5 {main} Beside that download appears as: Please, send a PM with ACP credentials. It is running fine on my install. Need to see what’s different in yours.
Sammy Nicole Posted November 14, 2017 Posted November 14, 2017 Hi! Can you able to export custom fields in each invoice too? This is missing from the invoices list, and it'll be great if you can filter custom fields as well.
Dennis_87 Posted June 12, 2018 Posted June 12, 2018 Can you create a plugin for exporting Transactions to? ? need to export all successfull Transactions including payment type. If Paypal, Card etc
SJ77 Posted September 17, 2018 Posted September 17, 2018 Hi can file contributor name be added to this please? thank you
Adriano Faria Posted September 18, 2018 Author Posted September 18, 2018 12 hours ago, SJ77 said: can file contributor name be added to this please? I can but this isn't used only in Downloads so that info would be "blank" in all the rest of the exported file. Not sure I'll add this.
SJ77 Posted September 18, 2018 Posted September 18, 2018 2 hours ago, Adriano Faria said: I can but this isn't used only in Downloads so that info would be "blank" in all the rest of the exported file. Not sure I'll add this. So how am I supposed to get totals for each file contributor? Or research when a contributor asks about their history. Find each file name 1 by 1? Its okay if there are blanks just handle it in sql with a “case when “ in your select statement. Something like SELECT The_other_fields, file_contrib_nameCASE WHEN file_contrib_name IS NULL THEN "N/A" ELSE file_contrib_nameEND Without this it’s impossible to do research per file contributor
Adriano Faria Posted September 18, 2018 Author Posted September 18, 2018 I don't have a SQL statement. I load the invoice. try { $invoice = \IPS\nexus\Invoice::load( \IPS\Request::i()->id ); } catch( \UnderflowException $e ) { \IPS\Output::i()->error( 'node_error', 'EXPORT-INVOICE/1', 404, '' ); } Again, this is NOT exclusive to downloads. Any other app that uses Commerce, will generate invoices.
Adriano Faria Posted September 18, 2018 Author Posted September 18, 2018 @SJ77, I’ll post ina few hours what you have to do in your install, then you download, edit and update your install.
SJ77 Posted September 18, 2018 Posted September 18, 2018 8 hours ago, Adriano Faria said: @SJ77, I’ll post ina few hours what you have to do in your install, then you download, edit and update your install. Just to be clear, are you asking me to do anything or just wait?
Adriano Faria Posted September 18, 2018 Author Posted September 18, 2018 Wait, sorry. Bad evening at work. Couldn’t make it. I’ll post tomorrow in the morning.
Adriano Faria Posted September 19, 2018 Author Posted September 19, 2018 2 hours ago, SJ77 said: Just to be clear, are you asking me to do anything or just wait? Ok, I've made it now, from home: Download the plugin. Open the XML with any HTML/PHP editor and find in the exportInvoice() function: $toPut[11] = $invoice->billcountry; Add below: foreach ( $invoice->items as $item ) { if ( $item instanceof \IPS\downloads\extensions\nexus\Item\File ) { $contributor = \IPS\downloads\File::load( $item->id )->author(); } } $toPut[12] = $contributor ? $contributor->member_id : '---'; $toPut[13] = $contributor ? $contributor->name : '---'; Find in exportInvoices() function: if ( $item instanceof \IPS\nexus\extensions\nexus\Item\CouponDiscount ) { $coupon = \IPS\nexus\Coupon::load( $item->id ); $couponId = $coupon->code; } else { $couponId = '---'; } Add below: if ( $item instanceof \IPS\downloads\extensions\nexus\Item\File ) { $contributor = \IPS\downloads\File::load( $item->id )->author(); } Find: $toPut[11] = $invoice->billcountry; Add below: $toPut[12] = $contributor ? $contributor->member_id : '---'; $toPut[13] = $contributor ? $contributor->name : '---'; Then find, IN BOTH FUNCTIONS: $headers = array( 'Invoice ID', 'Status', 'Title', 'Member ID', 'Member Name', 'Total', 'Date', 'Coupon', 'Paid On', 'Discount', 'Currency', 'Bill Country' ); Change to: $headers = array( 'Invoice ID', 'Status', 'Title', 'Member ID', 'Member Name', 'Total', 'Date', 'Coupon', 'Paid On', 'Discount', 'Currency', 'Bill Country', 'Member ID', 'Member Name' ); Results: Then save and reinstall the plugin.
SJ77 Posted September 20, 2018 Posted September 20, 2018 did the updates and now I don't see the download button
Adriano Faria Posted September 20, 2018 Author Posted September 20, 2018 You did something wrong, probably, which cause the hook to be ignored. I’ll send a PM with it attached tomorrow in the morning.
SJ77 Posted September 20, 2018 Posted September 20, 2018 11 minutes ago, Adriano Faria said: You did something wrong, probably, which cause the hook to be ignored. I’ll send a PM with it attached tomorrow in the morning. Im sure I did not make any mistakes. Pretty easy instructions. Thank you for the help, let me know
SJ77 Posted September 21, 2018 Posted September 21, 2018 Awesome, It works and now I have the columns I want. This will be such a huge help when it comes to taxes, or accounting of any kind. I finally can see easily who my top contributors are and rank them all. Thank you !!!!!!!!!!!!!!! I think something is going on with my data tho. When I export ALL (by not picking any dates) I get garbled junk and a very small file.
SJ77 Posted September 21, 2018 Posted September 21, 2018 I figured out that anything before Jan 8 2018 has issues. IF I start with Jan 7 I get an exception error and If I include Jan 6 I get the gooble garbage as in the above example. So I think something is wrong in my data Jan 7, Do you have any tips? What table I should check?
CP_User Posted September 21, 2018 Posted September 21, 2018 On 8/14/2017 at 11:29 PM, JiigSaaw said: So great ! Could you add some things to your mod ? We need to have such infos for export : SHIPPING ADDRESS PHONE NUMBER ITEMS WITH CUSTOM FIELDS And actual infos of your mod Because we sell clothes (custom) and we need an CSV with these infos to send for our manufacturer. Thank you ! Was this ever included @Adriano Faria ? Could the name of the item be included too?
Adriano Faria Posted September 21, 2018 Author Posted September 21, 2018 No, not yet. 1 hour ago, SJ77 said: So I think something is wrong in my data Jan 7, Probably. You better browse that table (nexus_invoices) in the SQL Toolbox to see if you notice something weird in its record.
Adriano Faria Posted September 30, 2018 Author Posted September 30, 2018 What's New in Version 1.0.1: Script optimization to avoid exception when exporting data
Recommended Posts
Archived
This topic is now archived and is closed to further replies.