WPPizza – A Restaurant Plugin for WordPress › Support › Feature Requests › Link to map
- AuthorPosts
- 29 June, 2021 at 7:17 pm #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
2 July, 2021 at 11:42 am #56721you could use the [wppizza_dbp_map] shortcode which does that and more
see here: https://docs.wp-pizza.com/developers/?section=delivery-by-post-zipcodeor 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-orderhistoryor 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; }
- AuthorPosts
- The topic ‘Link to map’ is closed to new replies.