• Resolved Dani

    (@danicasati)


    Hi.
    I configured a customized field in order to collect data on checkout.
    Data is saved correctly in database, but when I export, data contained on this field is not exported.
    How can I include?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Hi @danicasati,

    What tool/plugin are you using for export?

    I’ve just tried exporting it via WordPress standard Export tool (it’s in “Tools > Export > Orders”) and it seems to be working fine. I’ve tested it by creating two input fields “My field 1” and “My field 2” for the gateway and filling them with “a1” and “a2” on checkout. This is what I’ve got in exported XML file:

    
    ...
    <wp:postmeta>
        <wp:meta_key><![CDATA[_alg_wc_cpg_input_fields]]></wp:meta_key>
        <wp:meta_value><![CDATA[a:2:{s:10:"My field 1";s:2:"a1";s:10:"My field 2";s:2:"a2";}]]></wp:meta_value>
    </wp:postmeta>
    ...
    

    As you can see it’s all there, as a serialized value.

    In case if you are doing it manually via PHP – fields are saved in an array as order meta with _alg_wc_cpg_input_fields key. I’ve just added a small snippet to our site, please take a look – https://wpfactory.com/item/custom-payment-gateways-woocommerce/#tab-developers

    Thread Starter Dani

    (@danicasati)

    I’m using Advanced Order Export For WooCommerce.
    When I try to select _alg_wc_cpg_input_fields field, I get a message that is empty, but I’ve got a lot of orders with that data.

    @danicasati,

    I’ve just tried exporting it with “Advanced Order Export For WooCommerce” plugin and fields are still exported, as a serialized value though, i.e. like this:

    
    a:2:{s:10:"My field 1";s:2:"a1";s:10:"My field 2";s:2:"a2";}
    

    Anyway, we’ve just released new plugin v1.6.1, where I’ve added new Process in “Advanced Order Export For WooCommerce” plugin option to “WooCommerce > Settings > Custom Payment Gateways > Input Fields” section (it’s at the bottom of the settings page, in “General Options” subsection). Could you please try enabling it and checking if that fixes it?

    Thread Starter Dani

    (@danicasati)

    Sure.
    I’ll try now, stay tuned.

    @danicasati,

    Great, thanks.

    Thread Starter Dani

    (@danicasati)

    Can’t find new option.
    How can I need to add in order to include field to export?

    @danicasati,

    New option is in “WooCommerce > Settings > Custom Payment Gateways > Input Fields”. And please make sure you’ve updated the plugin to v1.6.1. After enabling the option, you can export it as usual, i.e. select (or type) _alg_wc_cpg_input_fields as “Meta key” in “Advanced Order Export For WooCommerce” interface.

    Thread Starter Dani

    (@danicasati)

    Updated, tried to export but same error:

    View post on imgur.com

    @danicasati,

    You need to fill in “Column name” option – I can see it on your screenshot, right above “Field format”. Try entering something like “Input Fields” there.

    Thread Starter Dani

    (@danicasati)

    Did it.
    Excel is exported but field includes some other data.
    Is it possible to filter for display only input field text?

    • This reply was modified 6 years, 4 months ago by Dani.

    @danicasati,

    After you add the field, you need to drag-n-drop it to the left, where all standard fields (like “Order Number”, “Order Status” etc.) are listed.

    @danicasati,

    Yes, you can format output in “WooCommerce > Settings > Custom Payment Gateways > Input Fields” – right below the Process in “Advanced Order Export For WooCommerce” plugin option, there is Template – change it from %title%: %value% to %value%.

    P.S. Don’t forget to enable Process in “Advanced Order Export For WooCommerce” plugin checkbox there.

    Thread Starter Dani

    (@danicasati)

    Yes, I did it.
    But input fields is displayed with other data, like this:

    a:1:{s:8:”MY_FIELD”;s:24:”MY_INPUT_TEXT”;}

    Is it possible to display only string text of the field?

    Hmm.. It looks like Process in “Advanced Order Export For WooCommerce” plugin is not affecting the output… Are you sure it’s enabled?

Viewing 15 replies - 1 through 15 (of 21 total)

The topic ‘Can’t export data’ is closed to new replies.