ipekarik
Forum Replies Created
-
I don’t know where you live, but even if you’re on the other side of the planet I’d be surprised if you didn’t hear the sound of me facepalming right now.
It’s a problem with Ultimate Addons for Visual Composer. Deactivating that plugin solves the issue. I’ll post a ticket on that plugin’s page.
Thank you for reading what I should’ve. ??
Forum: Plugins
In reply to: [WooCommerce] Problem with customer registration and discount coupon.Bump for the coupon issue, there’s an error with all Enhanced Select elements introduced in 3.0. Here’s what the console shows:
Error: Option ‘ajax’ is not allowed for Select2 when attached to a <select> element.
at String.<anonymous> (ultimate-woocomposer-backend.min.js:1)
at Function.each (load-scripts.php:2)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:1)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:2)
at d.init (ultimate-woocomposer-backend.min.js:1)
at HTMLSelectElement.<anonymous> (ultimate-woocomposer-backend.min.js:2)
at Function.each (load-scripts.php:2)
at a.fn.init.each (load-scripts.php:2)
at a.fn.init.a.fn.select2 (ultimate-woocomposer-backend.min.js:2)
at HTMLSelectElement.<anonymous> (wc-enhanced-select.min.js:1)Forum: Plugins
In reply to: [Font Organizer] Character wordsHi. I’d like to chime in… most fonts nowadays support extended characters – the issue is that the font needs to be loaded with the Latin Extended subset for this to work. I don’t see any support for additional subsets in your plugin, which would be a welcome added feature.
In this particular instance, the only thing that needs to be changed is to add &subset=latin-ext,latin to the end of the import URL for a font, for example:
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,800,400italic&subset=latin-ext,latin);
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Custom order metadata data no longer worksHi, Ankit… I just wanted to thank you once again for your great support here on the WP support forums as well, you deserve the karma. ?? The plugin is working great now and the ticket at your forum helped me a lot!
Hi Ewout… Thanks, that solved it!
The link you provided is broken, though, but you gave me enough information to solve the issue. Thanks!
P.
I’ll work without product data for now, the accountant will simply have more work manually cross-referencing your CSV with invoices. It is what it is.
Sure, but I also need the product data (in one row). ?? It’s not a huge issue, but still. An option would be nicer than forcing a change, because that change forces other changes down the line, all the way to my accounting office. ??
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Custom order metadata data no longer worksHi, Ankit.
Update 1.2.5 did not solve the issue. Adding custom fields both through method 1 (csv_write function) or method 2 (wsoe_addon_wsoe_hooks function) still results in empty columns like in the screenshot.
Best,
IvanForum: Plugins
In reply to: [WooCommerce Simply Order Export] Custom order metadata data no longer worksIt’s important to note that this is happening with update 1.2.4 of your plugin. Haven’t tested with version 1.2.3.
Edit: Just tested, CSV output in version 1.2.3 is the same, that’s not the issue.
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Update 1.2.4 failsI have the same error in my PHP logs, but the plugin works with all standard fields included in the plugin, except the custom fields functionality from my other support thread, but that’s another story.
In any case – same error, but in my case the plugin (sorta) works.
Hi Ankit…
Why did you remove the functionality to export all products within an order in a single row? This change you made should be an option, and not forced, because it’s a major change. I prefer my CSV to output one order per row (with all products in one row), not multiple rows per order, and I’ve set up a post-processing routine Excel that works with single rows.
Because of this change now I have to change how I post-process the CSV your code outputs, and you’ve given me hours of extra work to do. It’s bad practice for your users, because your CSV output should stay as constant as possible between updates, with new features added as options that can be turned on if needed/wanted.
Best,
IvanForum: Plugins
In reply to: [WooCommerce Simply Order Export] Custom order metadata data no longer worksHi, Ankit…
I purchased the add-on. I tried the second method (from your link on the support forum). For example, this code:
function wsoe_addon_wsoe_hooks() { add_filter( 'wsoe_filter_fields', 'wsoe_addon_add_fields' ); } add_action( 'init', 'wsoe_addon_wsoe_hooks', 8 ); function wsoe_addon_add_fields( $fields ) { $fields['wc_settings_tab__VAT_total'] = __('Total in HRK', 'woocommerce-simply-order-export'); return $fields; }
This adds a “Total in HRK” checkbox I can select, but the CSV doesn’t really export those fields, it’s just an empty column titled “Total in HRK” once exported.
After that I tried the first method you posted (with the switch statement) and that basically does the same.
Here’s the code:
// 4.2. Add columns to WooCommerce Simply Order Export - Add to CSV // ----------------------------------------------------------------------------- function pex_woo_export_csv_write( &$csv, $od, $fields ) { switch( $key ){ case 'wc_settings_tab_VAT_total': $VAT_total = get_post_meta( $od->id, 'Total in HRK', true ); array_push( $csv, $VAT_total ); break; case 'wc_settings_tab_VAT_amount': $VAT_amount = get_post_meta( $od->id, 'VAT amount in HRK', true ); array_push( $csv, $VAT_amount ); break; case 'wc_settings_tab_VAT_base': $VAT_base = get_post_meta( $od->id, 'VAT base in HRK', true ); array_push( $csv, $VAT_base ); break; case 'wc_settings_tab_invoice_number': if ( !empty( get_post_meta( $od->id, '_wcpdf_invoice_number', true ) ) ) { $invoice_number = get_post_meta( $od->id, '_wcpdf_invoice_number', true ); $invoice_number = sprintf('%06d', $invoice_number); $invoice_number = 'R-' . $invoice_number . '-PP1-W'; } array_push( $csv, $invoice_number ); break; case 'wc_settings_tab_proforma_number': if ( !empty( get_post_meta( $od->id, '_wcpdf_proforma_number', true ) ) ) { $invoice_number = get_post_meta( $od->id, '_wcpdf_proforma_number', true ); $invoice_number = sprintf('%06d', $invoice_number); $invoice_number = 'P-' . $invoice_number . '-PP1-W'; } array_push( $csv, $invoice_number ); break; default: break; } } add_action('wpg_add_values_to_csv', 'pex_woo_export_csv_write', 10, 3); // -----------------------------------------------------------------------------
And here’s the result (screenshot: https://www.dropbox.com/s/2rxb3upnud68wtj/Screenshot%202015-07-20%2000.14.10.png?dl=0). The CSV file has all the headers for the data I want, but no actual entries, just empty columns.
Any ideas?
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Custom order metadata data no longer worksHi, thanks for your reply. The fields are part of the order metadata, so they’re stored with the order. Have a look at my code:
// 4.2. Add columns to WooCommerce Simply Order Export - Add to CSV // ----------------------------------------------------------------------------- function pex_woo_export_csv_write( &$csv, $od, $fields ) { if( !empty( $fields['wc_settings_tab_billing_currency'] ) && $fields['wc_settings_tab_billing_currency'] === true ){ $billing_currency = $od->get_order_currency(); array_push( $csv, $billing_currency ); }; if( !empty( $fields['wc_settings_tab_billing_country'] ) && $fields['wc_settings_tab_billing_country'] === true ){ $billing_country = get_post_meta( $od->id, '_billing_country', true ); array_push( $csv, $billing_country ); }; if( !empty( $fields['wc_settings_tab_VAT_total'] ) && $fields['wc_settings_tab_VAT_total'] === true ){ $VAT_total = get_post_meta( $od->id, 'Total in HRK', true ); array_push( $csv, $VAT_total ); } if( !empty( $fields['wc_settings_tab_VAT_amount'] ) && $fields['wc_settings_tab_VAT_amount'] === true ){ $VAT_amount = get_post_meta( $od->id, 'VAT amount in HRK', true ); array_push( $csv, $VAT_amount ); } if( !empty( $fields['wc_settings_tab_VAT_base'] ) && $fields['wc_settings_tab_VAT_base'] === true ){ $VAT_base = get_post_meta( $od->id, 'VAT base in HRK', true ); array_push( $csv, $VAT_base ); } if( !empty( $fields['wc_settings_tab_payment_method'] ) && $fields['wc_settings_tab_payment_method'] === true ){ $payment_method = get_post_meta( $od->id, '_payment_method_title', true ); array_push( $csv, $payment_method ); } if( !empty( $fields['wc_settings_tab_invoice_number'] ) && $fields['wc_settings_tab_invoice_number'] === true ){ if ( !empty( get_post_meta( $od->id, '_wcpdf_invoice_number', true ) ) ) { $invoice_number = get_post_meta( $od->id, '_wcpdf_invoice_number', true ); $invoice_number = sprintf('%06d', $invoice_number); $invoice_number = 'R-' . $invoice_number . '-PP1-W'; } array_push( $csv, $invoice_number ); } if( !empty( $fields['wc_settings_tab_proforma_number'] ) && $fields['wc_settings_tab_proforma_number'] === true ){ if ( !empty( get_post_meta( $od->id, '_wcpdf_proforma_number', true ) ) ) { $invoice_number = get_post_meta( $od->id, '_wcpdf_proforma_number', true ); $invoice_number = sprintf('%06d', $invoice_number); $invoice_number = 'P-' . $invoice_number . '-PP1-W'; } array_push( $csv, $invoice_number ); } if( !empty( $fields['wc_settings_tab_order_id'] ) && $fields['wc_settings_tab_order_id'] === true ){ array_push( $csv, $od->id ); }; } add_action('wpg_before_csv_write', 'pex_woo_export_csv_write', 10, 3); // -----------------------------------------------------------------------------
Of course, many of these fields can now be added with your paid add-on, but my custom metadata fields relating to VAT and invoice numbers can’t.
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Simply Order Export Add-onYes, I’m interested, let me know when it’s available. ??
Forum: Plugins
In reply to: [WooCommerce Simply Order Export] Adding fieldsAh, nevermind I solved it in the meantime. This did the trick:
$customer_address = $od->get_formatted_billing_address();
Nice plugin, btw!