Support » Plugin: Custom Payment Gateways for WooCommerce » Can’t export data

  • Resolved danicasati

    (@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)
  • Plugin Author Algoritmika Ltd

    (@algoritmika)

    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

    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.

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @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?

    Sure.
    I’ll try now, stay tuned.

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @danicasati,

    Great, thanks.

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

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @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.

    Updated, tried to export but same error:
    https://imgur.com/a/7DP4rM6

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @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.

    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 1 month, 2 weeks ago by danicasati.
    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @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.

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    @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%.

    Plugin Author Algoritmika Ltd

    (@algoritmika)

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

    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?

    Plugin Author Algoritmika Ltd

    (@algoritmika)

    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)
  • You must be logged in to reply to this topic.