• Hello,

    I’m a using the WooCommerce Local Pickup plugin by thedotstore.

    My goal is to export order data to Excel, including the customer’s chosen pickup location details. I reached out to the Local Pickup support team who provided the following meta fields for this purpose:

    _dslpfw_pickup_location_id
    _dslpfw_pickup_location_name
    _dslpfw_pickup_location_address
    _dslpfw_pickup_location_phone
    _dslpfw_pickup_location_items

    However, when I tried to enter these fields in the custom field mapping section (screenshot attached: [https://prnt.sc/v5I9woBTVvtX]), the information remains blank in the exported Excel (screenshot attached: [https://prnt.sc/neJR07UaJwOw]).

    Could you please advise on how to correctly map these fields to ensure the pickup location details are included in the export?

Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter zaoyao

    (@zaoyao)

    I have added the code here: https://prnt.sc/OVyr1SUETVkn

    What I want is for the _dslpfw_pickup_location_name field to display the full_address_billing information if it is empty. However, I’m not sure what the correct meta field for full_address_billing is, so for now, I’m using billing_address_1 as a placeholder for testing.

    I have added the _dslpfw_pickup_location_name to the meta field, but when I export the data, it doesn’t get replaced with the billing address if it’s empty.

    https://prnt.sc/XKHyIjfWCFfp

    Anything wrong with me?

    Plugin Author algol.plus

    (@algolplus)

    Try replace 
    $data['_dslpfw_pickup_location_name'] = $ds_local_pickup->get_dslpfw_orders_object()->get_dslpfw_order_items_object()->get_order_item_pickup_location_name( $item_id );

    WITH
    $data['_dslpfw_pickup_location_name'] = $ds_local_pickup->get_dslpfw_orders_object()->get_dslpfw_order_items_object()->get_order_item_pickup_location_name( $item_id );
    if(!$data['_dslpfw_pickup_location_name'])
    $data['_dslpfw_pickup_location_name'] = $order->get_billing_address_1();

    or better — hire PHP programmer. I’m sorry, I have a lot of work.

    Thread Starter zaoyao

    (@zaoyao)

    Sorry on it

    One more question

    I habve tired enter the get_billing_address but it appear error. The feild of the billing address1&2 is ?

    Thread Starter zaoyao

    (@zaoyao)

    and meta feild or the full address is?

    Thread Starter zaoyao

    (@zaoyao)

    Maybe you just provide me documentation related the meta feild and i find the meta feild from there

    Plugin Author algol.plus

    (@algolplus)

    Thread Starter zaoyao

    (@zaoyao)

    Very sorry to bother you again. The issues mentioned above have been resolved. However, may I ask if it’s possible to remove the variation titles, such as size, color, etc.? Also, how can I center the quantity number?

    https://prnt.sc/-OQQgQHJGQfD

    Plugin Author algol.plus

    (@algolplus)

    1. use code

    add_filter( 'woe_fetch_item_meta', function($value, $meta, $item, $product ){
    return $meta->display_value;
    },10,4);

    2. use code

    add_action( 'woe_xls_print_footer', function ($objXls,$formatter) {
    $style = array(
    'alignment' => array(
    'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
    )
    );
    $objXls->getActiveSheet()->getStyle( "M1:M" . $formatter->last_row)->applyFromArray($style);
    }, 10, 2);



    Thread Starter zaoyao

    (@zaoyao)

    Hi we are able to make the quntity in the center. However it still unable remove the variable title(such as size and etc)

    add_filter( ‘woe_fetch_item_meta’, function($value, $meta, $item, $product ){
    return $meta->display_value;
    },10,4);

    If we using this code all the variable information will become blank

    Plugin Author algol.plus

    (@algolplus)

    Try debug this function , add line before “return…”;

    var_dump($value,$meta); die("debug");

    and press Preview .

    Thread Starter zaoyao

    (@zaoyao)

    1. I follow your indtruction to add the code and become as below
      add_filter( ‘woe_fetch_item_meta’, function($value, $meta, $item, $product ){
      var_dump($value,$meta); die(“debug”);
      return $meta->display_value;
      },10,4);

    The result as below
    string(14) “Size: XXS / XS” array(4) { [“meta_key”]=> string(4) “Size” [“meta_value”]=> string(8) “XXS / XS” [“meta_id”]=> string(6) “740162” [“order_item_id”]=> string(5) “91717” } debug

    1. My boss wants the product name along with the attribute (color) in one column, and the attribute size in a separate column for color.
      https://prnt.sc/ROIxerA8M2B8

    Could you please guide me on how to do this?

    Plugin Author algol.plus

    (@algolplus)

    You don’t need any code in this case ??

    open >Setup Fields>Product Order Items, click Add Field and select “Size” in the dropdown.

    Thread Starter zaoyao

    (@zaoyao)

    If want the other attribute combine with the product name?

    How to do it

    For exampleProduct A(Red)/ Product A(Design attribute)

    Plugin Author algol.plus

    (@algolplus)

    ok, try this code

    add_filter( ‘woe_fetch_item_meta’, function($value, $meta, $item, $product ){
    return $product->get_name() . "(" .$meta["meta_value"] . ")";
    },10,4);

    Thread Starter zaoyao

    (@zaoyao)

    https://prnt.sc/b0JZuSypBwxD

    After added my website will have this error

Viewing 15 replies - 16 through 30 (of 36 total)
  • You must be logged in to reply to this topic.