Import into custom order fields

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #6910
      Anonymous
      Inactive

      Hi XAdapter,

      Good plugin so far!

      I am already using the ‘custom order fields’ plugin on my site and wish to import data into those fields as well as the standard ones using your plugin.

      Is there a way to do so?

      Thanks,
      James

    • #6911
      Anonymous
      Inactive

      Hi James,

      Please send us the “custom order fields” plugin zip to support@xadapter.com

      We will check and get back to you.

    • #8411
      Anonymous
      Inactive

      Hi Mark,

      I am trying to export to the fields to custom header names (as is the reason for the purchase of this plugin), however after navigate away form the order page all the fields are being cleared and returning to the original values. The intent of this purchase, as the plugin explains online, these field should be saving so we can re-use the same custom headers to export information.

      I export the fields they are being updated when i return to do another export at a later time. Can you please provide a workaround for this or a solution to update to internal file to make permanent changes.

      Regards,
      David

    • #8416
      Anonymous
      Inactive

      Hi David,

      There is hooks in our premium version to completely alter CSV column and data just before writing into CSV. Please put the code snippet in your theme’s functions.php

      Please make necessary changes , if anything needed.

      add_filter(‘hf_alter_csv_header’, ‘hf_csv_order_add_more_columns’, 10, 1);
      function hf_csv_order_add_more_columns($csv_columns) {
      $alterd_columns = array();
      $alterd_columns[‘order_id’] = ‘order_id’;
      $alterd_columns[‘shipping_first_name’] = ‘shipping_first_name’;
      $alterd_columns[‘shipping_company’] = ‘shipping_company’;
      $alterd_columns[‘shipping_address_1’] = ‘shipping_address_1’;
      $alterd_columns[‘shipping_address_2’] = ‘shipping_address_2’;
      $alterd_columns[‘shipping_city’] = ‘shipping_city’;
      $alterd_columns[‘shipping_state’] = ‘shipping_state’;
      $alterd_columns[‘shipping_postcode’] = ‘shipping_postcode’;
      $alterd_columns[‘shipping_country’] = ‘shipping_country’;
      $alterd_columns[‘billing_phone’] = ‘billing_phone’;
      $alterd_columns[‘billing_email’] = ‘billing_email’;
      $alterd_columns[‘customer_note’] = ‘customer_note’;
      return $alterd_columns;
      }

      add_filter(‘hf_alter_csv_order_data’, ‘hf_csv_order_add_more_data’, 10, 1);
      function hf_csv_order_add_more_data($order_data) {
      $alterd_data = array();
      $alterd_data[‘order_id’] = $order_data[‘order_id’];
      $alterd_data[‘shipping_first_name’] = $order_data[‘shipping_first_name’];
      $alterd_data[‘shipping_company’] = $order_data[‘shipping_company’];
      $alterd_data[‘shipping_address_1’] = $order_data[‘shipping_address_1’];
      $alterd_data[‘shipping_address_2’] = $order_data[‘shipping_address_2’];
      $alterd_data[‘shipping_city’] = $order_data[‘shipping_city’];
      $alterd_data[‘shipping_state’] = $order_data[‘shipping_state’];
      $alterd_data[‘shipping_postcode’] = $order_data[‘shipping_postcode’];
      $alterd_data[‘shipping_country’] = $order_data[‘shipping_country’];
      $alterd_data[‘billing_phone’] = $order_data[‘billing_phone’];
      $alterd_data[‘billing_email’] = $order_data[‘billing_email’];
      $alterd_data[‘customer_note’] = $order_data[‘customer_note’];
      return $alterd_data;

      }

      This will keep exporting permanently only these fields.

      Let us know if any help needed , also see our support E-mail: support@xadapter.com

    • #51551
      Anonymous
      Inactive

      Hi,

      I purchased the premium version as your support staff said it supported custom fields. Can you explain how to do it?

      Charlie

    • #51559
      Anonymous
      Inactive

      Hello Charles,

      Thanks for reaching us.
      Please do create an order manually which includes all your custom fields in your order list.
      Try exporting that order to CSV file. You will get respective columns of custom fields you are expecting.
      Please refer those fields for importing back with more orders.

      Hope it works! if you face any issues, Please raise a request HERE
      We will help you.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.