• Resolved heints

    (@heints)


    Hei,

    We are using a custom PDF invoice plugin with our woocommerce. (https://codecanyon.net/item/woocommerce-pdf-invoice/5951088?ref=RightPress)

    I need the pickup location caller (point of delivery text) of the DPD plugin, to display the shipping location on the invoice.

    When I used the developer tools on the admin page, it seems that the caller of the info I need is “div.selected_terminal” so I tried to add to my PDF invoice customiser:

    “Tarneviis: {{shipping_method}} {{selected_terminal}}”

    The shipping method returns the DPD Pickup name just fine, but the selected_terminal returns nothing.

    Any ideas? Maybe the developer could incorporate the destination location also to the “shipping_method” caller like the other shipment plugins do.

    br,
    Hendrik

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter heints

    (@heints)

    Best I have figured out so far is that key – {{wc_shipping_dpd_parcels_terminal}} returns the Pickup location code – in my case EE90028

    but what is the trick / key to get the name returned?

    Thread Starter heints

    (@heints)

    Would it be possible to update the plugin so, that the actual name of the pickup location (company+address) would be written together with the order?

    Also interested in getting human readable format from the code. Did you find a solution?

    Thread Starter heints

    (@heints)

    no, not yet. Still having the issue of not able to display the pickup selected on the invoice or in my dashboards ?? I hope the developer would help here.

    Plugin Author dpdbaltics

    (@dpdbaltics)

    Hi,
    we are considering about adding support for this plugin in the future. Sorry for inconvenience.

    @heints

    I found from their QA that they are saving the info in table so here’s the solution I am using.
    Pasting here part of code, that I am using. You can use this as example to get your own solution to working.

    
    // posting method is dpd_parcels
    case 'dpd_parcels':
    	// getting the terminal key from the order
    	$terminal_key = get_post_meta( $order->id, 'wc_shipping_dpd_parcels_terminal', true );
    	// creating mysql query
    	global $wpdb;
    	$table_name = $wpdb->prefix . "dpd_terminals";
    	$result = $wpdb->get_results( "SELECT company FROM $table_name where parcelshop_id = '$terminal_key'" );
    	//filtering the result
    	$parcel_terminal_name = $result[0]->company;
    
    • This reply was modified 5 years, 2 months ago by Robothead.
    • This reply was modified 5 years, 2 months ago by Robothead.
    • This reply was modified 5 years, 2 months ago by Robothead.
    • This reply was modified 5 years, 2 months ago by Robothead.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Caller for pickup location’ is closed to new replies.