rachael-portier
8/29/2019 - 7:55 PM

Add Tracking Info to Email

<!-- SET UP FOR ACF:

Delivery Service - select - field choices of Not Shipped, UPS, FedEx, USPS 
  UPS - text - conditional logic on: delivery service value is equal to UPS
  Fedex - text - conditional logic on: delivery service value is equal to Fedex
  USPS - text - conditional logic on: delivery service value is equal to USPS


Post Type = Order

-->




<!-- AROUND LINE 30 -->

<!-- Only display text if no numbers have been entered -->
<?php if( get_field('delivery_service', $curauth) == "Not Shipped" ): ?>
<p>Your order has shipped.</p>
<?php endif; ?>

<!-- Display number if UPS is selected as delivery service -->
<?php if( get_field('delivery_service', $curauth) == "UPS" ): ?>
	 <?php if( get_field('ups_tracking') ): ?>
	 <p>Your order has shipped. Track your package below.</p>
        <button><a class="link" style="margin: 0px auto;" href="https://www.ups.com/track?loc=en_US&tracknum=<?php the_field('ups_tracking'); ?>&requester=WT/trackdetails">TRACK PACKAGE</a></button>
     <?php endif; ?>

<!-- Display number if USPS is selected as delivery service -->     
<?php elseif( get_field('delivery_service', $curauth) == "USPS" ): ?>
     <?php if( get_field('usps_tracking') ): ?>
     <p>Your order has shipped. Track your package below.</p>
        <button><a class="link" style="margin: 0px auto;" href="https://tools.usps.com/go/TrackConfirmAction?tLabels=<?php the_field('usps_tracking'); ?>">TRACK PACKAGE</a></button>
    <?php endif; ?>

	
<!-- Display number if FEDEX is selected as delivery service -->
<?php elseif( get_field('delivery_service', $curauth) == "FedEx" ): ?>
    <?php if( get_field('fedex_tracking') ): ?>
    <p>Your order has shipped. Track your package below.</p>
        <button><a class="link" style="margin: 0px auto;" href="https://www.fedex.com/apps/fedextrack/?action=track&action=track&tracknumbers=<?php the_field('fedex_tracking');?>&requester=WT/trackdetails">TRACK PACKAGE</a></button>
    <?php endif; ?>

<?php endif; ?>