Link to map

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #56686

    Hello! Good day to you!
    Just bought the “DELIVERY BY POSTCODE” extension, I am going to use it for calculating the delivery charge by distance, it works after testing. But is it possible to make the marked address (which identified by Google Map) to become a “url link”, so that my delivery driver can click on that link on the order received message? Please see the pics I share in the link below. Thank you!

    https://drive.google.com/file/d/1i-pSAws14EmBBW6cA2Zfui66yxP8FlZV/view?usp=sharing

    Angus

    #56721
    Olly
    Admin & Mod

      you could use the [wppizza_dbp_map] shortcode which does that and more
      see here: https://docs.wp-pizza.com/developers/?section=delivery-by-post-zipcode

      or add your orderhistory shortcode somewhere and setup the address as outlined here (which will make it a link)
      https://docs.wp-pizza.com/shortcodes/?section=admin-orderhistory

      or filter your emails like so (adjust as required)

      
      add_filter('wppizza_filter_template_customer_section','my_email_template_markup', 100, 4 );
      function my_email_template_markup($section, $template_type, $template_id, $order){
      if($template_type == 'emails'){
      $field_id = 'wppizza-dbp-map-location';
      $section[$field_id] ='<tr><td style="text-align: left; padding: 2px; white-space:nowrap; vertical-align:top;">'.$order['customer'][$field_id]['label'].'</td><td style="text-align: right;padding: 2px;;"><a href="[some link to some mapping site with the address/apikey/etc  added as necessary]">'.$order['customer'][$field_id]['value'].'</a></td></tr>';
      }	
      return $section;	
      }
      
    Viewing 2 posts - 1 through 2 (of 2 total)
    • The topic ‘Link to map’ is closed to new replies.