You are here

function theme_uc_ups_label_image in Ubercart 8.4

Same name and namespace in other branches
  1. 5 shipping/uc_ups/uc_ups.module \theme_uc_ups_label_image()
  2. 6.2 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_label_image()
  3. 7.3 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_label_image()

Displays the shipping label for printing.

Each argument is a component of the file path to the image.

1 string reference to 'theme_uc_ups_label_image'
uc_ups_theme in shipping/uc_ups/uc_ups.module
Implements hook_theme().

File

shipping/uc_ups/src/Plugin/Ubercart/FulfillmentMethod/uc_ups.ship.inc, line 746
UPS functions for label generation.

Code

function theme_uc_ups_label_image() {
  $args = explode('/', Url::fromRoute('<current>')
    ->toString(), 8);
  if (count($args) != 8) {
    throw new NotFoundHttpException();
  }
  $image_path = file_create_url(file_stream_wrapper_uri_normalize($args[7]));
  $output = <<<EOLABEL
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<html>
<head>
<title>View/Print Label</title>
<style>
  .small-text {font-size: 80%;}
  .large-text {font-size: 115%;}
</style>
</head>
<body bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="600"><tr>
<td height="410" align="left" valign="top">
<b class="large-text">View/Print Label</b>
&nbsp;<br />
<ol class="small-text"> <li><b>Print the label:</b> &nbsp;
Select Print from the File menu in this browser window to print the label below.<br /><br /><li><b>
Fold the printed label at the dotted line.</b> &nbsp;
Place the label in a UPS Shipping Pouch. If you do not have a pouch, affix the folded label using clear plastic shipping tape over the entire label.<br /><br /><li><b>GETTING YOUR SHIPMENT TO UPS<br />
Customers without a Daily Pickup</b><ul><li>Ground, 3 Day Select, and Standard to Canada shipments must be dropped off at an authorized UPS location, or handed to a UPS driver. Pickup service is not available for these services. To find the nearest drop-off location, select the Drop-off icon from the UPS tool bar.<li>
Air shipments (including Worldwide Express and Expedited) can be picked up or dropped off. To schedule a pickup, or to find a drop-off location, select the Pickup or Drop-off icon from the UPS tool bar.</ul> <br />
<b>Customers with a Daily Pickup</b><ul><li>
Your driver will pickup your shipment(s) as usual. </ul>
</ol></td></tr></table><table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td class="small-text" align="left" valign="top">
&nbsp;&nbsp;&nbsp;
FOLD HERE</td>
</tr>
<tr>
<td align="left" valign="top"><hr />
</td>
</tr>
</table>

<table>
<tr>
<td height="10">&nbsp;
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="650" ><tr>
<td align="left" valign="top">
<img src="{<span class="php-variable">$image_path</span>}" height="392" width="672">
</td>
</tr></table>
</body>
</html>
EOLABEL;
  print $output;
  exit;
}