• Resolved mf_iii

    (@mf_iii)


    Hello!

    I want to create a new field to have First name and Last name together.

    Thanks

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    You should open section “Shipping Address” and drag field “Full Name” to export.
    thanks, Alex

    Thread Starter mf_iii

    (@mf_iii)

    Oh thank you very much! I didnt notice it!

    But if i want to connect 2 separate fields. For example Full name + city?

    Is there any way to add 2 meta keys when creating a new field?

    • This reply was modified 5 years, 1 month ago by mf_iii.
    Plugin Author algol.plus

    (@algolplus)

    Hello

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

    inside function use code
    return $order->get_shipping_first_name()." ".$order->get_shipping_last_name()." ".$order->get_shipping_city();

    thanks, Alex

    Thread Starter mf_iii

    (@mf_iii)

    I put this in text function area (because i want the billing fields):

    return $order->get_billing_first_name().” “.$order->get_billing_last_name().” “.$order->get_billing_city();

    but i got this error:

    Uncaught Error: Call to a member function get_billing_first_name() on null in /home/boogaboogr/webapps/fyl/new/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-engine.php(323) : eval()’d code:1 Stack trace: #0 /home/boogaboogr/webapps/fyl/new/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-engine.php(323): eval() #1 /home/boogaboogr/webapps/fyl/new/wp-content/plugins/woo-order-export-lite/classes/core/class-wc-order-export-engine.php(383): WC_Order_Export_Engine::validate_defaults(Array) #2 /home/boogaboogr/webapps/fyl/new/wp-content/plugins/woo-order-export-lite/classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php(18): WC_Order_Export_Engine::build_file(Array, ‘estimate_previe…’, ‘file’, 0, 0, ‘test’) #3 /home/boogaboogr/webapps/fyl/new/wp-content/plugins/woo-order-export-lite/classes/class-wc-order-export-admin.php(438): WC_Order_Export_Admin_Tab_Abstract->ajax_preview() #4 /home/boogaboogr/webapps/fyl/new/wp-includes/class

    Plugin Author algol.plus

    (@algolplus)

    Hello

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

    use meta key “fullname_city” and this PHP code.
    thanks, Alex

    add_filter('woe_get_order_value_fullname_city',function ($value, $order,$fieldname) {
      return $order->get_billing_first_name()." ".$order->get_billing_last_name()." ".$order->get_billing_city();
    },10,3);
    Thread Starter mf_iii

    (@mf_iii)

    Oh thank you very much!!! How can i put a text between the fields?

    Example: First Name Last Name (City)

    Plugin Author algol.plus

    (@algolplus)

    try this version

    add_filter('woe_get_order_value_fullname_city',function ($value, $order,$fieldname) {
      return $order->get_billing_first_name()." ".$order->get_billing_last_name()." (".$order->get_billing_city().")";
    },10,3);
    Thread Starter mf_iii

    (@mf_iii)

    Thank you !!!

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome

    Thread Starter mf_iii

    (@mf_iii)

    Hello again! How can i make it so if the billing_city is empty to NOT show the ()

    Thanks

    Plugin Author algol.plus

    (@algolplus)

    I suggest to hire PHP programmer
    ??

    add_filter('woe_get_order_value_fullname_city',function ($value, $order,$fieldname) {
     if( $order->get_billing_city() )
      return $order->get_billing_first_name()." ".$order->get_billing_last_name()." (".$order->get_billing_city().")";
     else
      return $order->get_billing_first_name()." ".$order->get_billing_last_name();
    },10,3);
    Thread Starter mf_iii

    (@mf_iii)

    Hahaha i have but i dont want anything else and i think is easy task so i asked you ??

    Thank you again in advance!

    Plugin Author algol.plus

    (@algolplus)

    ok, but I’m at different timezone and don’t work in the evenings or weekends

    • This reply was modified 5 years, 1 month ago by algol.plus.
    Thread Starter mf_iii

    (@mf_iii)

    How can i show near the Item name the quantity for each item? It not show it from default ??

    For example Item1 x1, Item2 x2

    Thanks

    Plugin Author algol.plus

    (@algolplus)

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘How can i combine 2 fields as one?’ is closed to new replies.