Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M2-59 update to tracking email template #5

Merged
merged 6 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; ?>