Skip to content

Commit

Permalink
Merge pull request #5 from shipperhq/develop
Browse files Browse the repository at this point in the history
 M2-59 update to tracking email template
  • Loading branch information
wsagen authored Mar 1, 2018
2 parents cce694f + 37044f3 commit e9848e8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.0.0] - 2018-02-23
### Added
- Initial release

## [1.0.1] - 2018-03-01
### Added
- M2-59 update to tracking email template
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For up-to-date installation instructions, along with troubleshooting steps, plea

Support
-------
For further information on using Tracker, please refer to our [online documentation](http://wiki.webshopapps.com/extensions/generic-tracker).
For further information on using Tracker, please refer to our [online documentation](http://support.webshopapps.com/shippingtracker).
If you have any issues with this extension, open an issue on [GitHub](https://github.com/shipperhq/module-shipping-tracker/issues).

Contribution
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"AFL-3.0"
],

"version": "1.0.0",
"version": "1.0.1",

"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"AFL-3.0"
],

"version": "1.0.0",
"version": "1.0.1",

"authors": [
{
Expand Down
31 changes: 15 additions & 16 deletions src/view/frontend/templates/email/shipment/track.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,40 @@
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

use ShipperHQ\Tracker\Helper\Track;
// @codingStandardsIgnoreFile

?>
<?php $_shipment = $block->getShipment() ?>
<?php $_order = $block->getOrder() ?>
<?php
$rplChars = array(" " => '');
$string = "";
$_shipment = $block->getShipment();
$_order = $block->getOrder();
$rplChars = array(' ' => '');
$string = '';
if ($this->getOrder()) {
$string = $this->getOrder()->getShippingAddress()->getPostcode();
}
$zipcode = strtr($string,$rplChars);?>
$zipCode = strtr($string, $rplChars);
?>
<?php if ($_shipment && $_order && $_shipment->getAllTracks()): ?>
<br />
<br/>
<table class="shipment-track">
<thead>
<tr>
<th><?= /* @escapeNotVerified */ __('Shipped1 By') ?></th>
<th><?= /* @escapeNotVerified */ __('Tracking1 Number') ?></th>
<th><?= /* @escapeNotVerified */ __('Shipped By') ?></th>
<th><?= /* @escapeNotVerified */ __('Tracking Number') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($_shipment->getAllTracks() as $_item): ?>
<tr>
<td><?= $block->escapeHtml($_item->getTitle()) ?>:</td>
<?php $_url=$this->helper('ShipperHQ\Tracker\Helper\Track')->getTrackUrl($_item->getTitle(),$_item->getNumber(), $zipcode) ?>
<?php $_url = $this->helper(Track::class)->getTrackUrl($_item->getTitle(),
$_item->getNumber(), $zipCode) ?>

<?php if ($_url!=""): ?>
<td><a href="<?php echo $_url ?>" ><?= $block->escapeHtml($_item->getNumber()) ?></a></td>
<?php if ($_url !== ''): ?>
<td><a href="<?php echo $_url ?>"><?= $block->escapeHtml($_item->getNumber()) ?></a></td>
<?php else: ?>
<td><?= $block->escapeHtml($_item->getNumber()) ?></td>
<?php endif; ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php endif; ?>
<?php endif; ?>

0 comments on commit e9848e8

Please sign in to comment.