• The table field I am using is in my WOOCOMMERCE Orders, it is not being printed on frontend, but is strictly for admin use only.

    The field will get updated by customers from their dashboard and admin would want to see how the order was defined in a table format.

    I am using an ORDER EXPORT plugin that allows me to add TABLE field as a column. But when I export the excel generated shows the following in the column of table field.

    a:5:{s:5:”acftf”;a:1:{s:1:”v”;s:5:”1.3.5″;}s:1:”p”;a:2:{s:1:”o”;a:1:{s:2:”uh”;i:0;}s:2:”ca”;s:0:””;}s:1:”c”;a:3:{i:0;a:1:{s:1:”p”;s:0:””;}i:1;a:1:{s:1:”p”;s:0:””;}i:2;a:1:{s:1:”p”;s:0:””;}}s:1:”h”;a:3:{i:0;a:1:{s:1:”c”;s:0:””;}i:1;a:1:{s:1:”c”;s:0:””;}i:2;a:1:{s:1:”c”;s:0:””;}}s:1:”b”;a:2:{i:0;a:3:{i:0;a:1:{s:1:”c”;s:9:”asdasdasd”;}i:1;a:1:{s:1:”c”;s:12:”asdasdasdasd”;}i:2;a:1:{s:1:”c”;s:12:”asdasdasdasd”;}}i:1;a:3:{i:0;a:1:{s:1:”c”;s:12:”asdasdasdasd”;}i:1;a:1:{s:1:”c”;s:12:”asdasdasdasd”;}i:2;a:1:{s:1:”c”;s:17:”sadadasdasdasdasd”;}}}}

    How do I make this export readable for my client? Any suggestions ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Johann Heyne

    (@jonua)

    Hi,

    the ORDER EXPORT plugin simply shows the table data, which are a serialized array of data. If the plugin has a WordPress filter for the data before building the excel, there is a chance to convert the table data into a more visual appearance in the excel document.

    If you like, I can have a look at this plugin. Whats the name of the plugin?

    Cheers,
    Johann

    Thread Starter djalbani

    (@djalbani)

    Hey

    Thank you for prompt response

    Its Advanced Order Export For WooCommerce by AlgolPlus

    I will be really grateful if you can come up with a tweak in it.

    Thanks

    Plugin Author Johann Heyne

    (@jonua)

    There is an AlgolPlus example how to tweak a fields value. You could try this way to take the table data from $value, and build and return a HTML table from it. I do not know, what kind of data can returned by this filter. Just try.

    https://algolplus.freshdesk.com/support/solutions/articles/25000016635-add-calculated-field-for-order-

    add_filter( 'woe_get_order_value_{your_meta_key}', function($value, $order, $fieldname) {
    
        $table_data = unserialize( $value ); // see: https://www.php.net/manual/en/function.unserialize.php
    
        $table = ''; // build a html table from $table_data
    
        // $table_data['p']['o']['uh'] = wether to use the table header or not
        // $table_data['h'] = array of the table header row and cells
        // $table_data['b'] = array of the table body rows and cells
    
        return $table;
    });
    • This reply was modified 5 years, 7 months ago by Johann Heyne.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ACF Table Field in Order Exports’ is closed to new replies.