-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
reindertvetter
committed
Jan 27, 2017
1 parent
a453f68
commit 64c1e1d
Showing
9 changed files
with
196 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* Short_description | ||
* | ||
* LICENSE: This source file is subject to the Creative Commons License. | ||
* It is available through the world-wide-web at this URL: | ||
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US | ||
* | ||
* If you want to add improvements, please create a fork in our GitHub: | ||
* https://github.com/myparcelnl | ||
* | ||
* @author Reindert Vetter <reindert@myparcel.nl> | ||
* @copyright 2010-2017 MyParcel | ||
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US CC BY-NC-ND 3.0 NL | ||
* @link https://github.com/myparcelnl/magento | ||
* @since File available since Release 0.1.0 | ||
*/ | ||
|
||
namespace MyParcelNL\Magento\Block\Sales; | ||
|
||
use Magento\Backend\Block\Template; | ||
use Magento\Backend\Block\Template\Context; | ||
use Magento\Framework\App\ObjectManager; | ||
|
||
class Index extends Template | ||
{ | ||
/** | ||
* @var \Magento\Framework\ObjectManagerInterface | ||
*/ | ||
private $objectManager; | ||
|
||
/** | ||
* @var \MyParcelNL\Magento\Helper\Data | ||
*/ | ||
private $helper; | ||
|
||
/** | ||
* @param Context $context | ||
* @param array $data | ||
*/ | ||
public function __construct(Context $context, array $data = []) | ||
{ | ||
$this->objectManager = ObjectManager::getInstance(); | ||
$this->helper = $this->objectManager->get('\MyParcelNL\Magento\Helper\Data'); | ||
parent::__construct($context, $data); | ||
} | ||
|
||
public function getAjaxUrl() | ||
{ | ||
return $this->_urlBuilder->getUrl('myparcelnl/order/MassTrackTraceLabel'); | ||
} | ||
|
||
public function getSettings() | ||
{ | ||
$settings = $this->helper->getStandardConfig('print'); | ||
return json_encode($settings); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | ||
<body> | ||
<referenceBlock name="order_shipping_view"> | ||
<block class="MyParcelNL\Magento\Block\Sales\Index" name="myparcelnl.order" template="order_view.phtml"/> | ||
</referenceBlock> | ||
</body> | ||
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,96 @@ | ||
<?php /** @var MyParcelNL\Magento\Block\Sales\NewShipment $block */ ?> | ||
<!-- MyParcel options --> | ||
<div class="admin__field field-mypa_package_type"> | ||
<label class="admin__field-label"> | ||
<span>MyParcel options</span> | ||
</label> | ||
<div class="admin__field-control"> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-package" name="mypa[package_type]" value="1" checked="checked"> | ||
<label class="admin__field-label" for="mypa_package_type-package">Package</label> | ||
</div> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-mailbox" name="mypa[package_type]" value="2"> | ||
<label class="admin__field-label" for="mypa_package_type-mailbox">Mailbox</label> | ||
</div> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-letter" name="mypa[package_type]" value="3"> | ||
<label class="admin__field-label" for="mypa_package_type-letter">Letter</label> | ||
<?php if ($block->getCountry() == 'NL'): ?> | ||
<!-- MyParcel options --> | ||
<div class="admin__field field-mypa_package_type mypa_nl-toggle"> | ||
<label class="admin__field-label"> | ||
<span>MyParcel options</span> | ||
</label> | ||
<div class="admin__field-control"> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-package" name="mypa[package_type]" value="1" checked="checked"> | ||
<label class="admin__field-label" for="mypa_package_type-package">Package</label> | ||
</div> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-mailbox" name="mypa[package_type]" value="2"> | ||
<label class="admin__field-label" for="mypa_package_type-mailbox">Mailbox</label> | ||
</div> | ||
<div class="admin__field admin__field-option"> | ||
<input type="radio" class="admin__control-radio" id="mypa_package_type-letter" name="mypa[package_type]" value="3"> | ||
<label class="admin__field-label" for="mypa_package_type-letter">Letter</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_only_recipient"> | ||
<input id="mypa_only_recipient" | ||
class="admin__control-checkbox" | ||
name="mypa[only_recipient]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('only_recipient') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_only_recipient"> | ||
<span><?php /* @escapeNotVerified */ echo __('Home address only') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_signature"> | ||
<input id="mypa_signature" | ||
class="admin__control-checkbox" | ||
name="mypa[signature]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('signature') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_signature"> | ||
<span><?php /* @escapeNotVerified */ echo __('Signature on receipt') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_return"> | ||
<input id="mypa_return" | ||
class="admin__control-checkbox" | ||
name="mypa[return]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('return') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_return"> | ||
<span><?php /* @escapeNotVerified */ echo __('Return if no answer') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_large_format"> | ||
<input id="mypa_large_format" | ||
class="admin__control-checkbox" | ||
name="mypa[large_format]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('large_format') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_large_format"> | ||
<span><?php /* @escapeNotVerified */ echo __('Large package') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_insurance"> | ||
<?php $defaultInsurance = $block->getDefaultInsurance();?> | ||
<select name="mypa[insurance]" id="mypa_insurance" class="required product-custom-option admin__control-select" title="" > | ||
<option value="0" ><?php echo __('No insurance') ?></option> | ||
<option value="50" <?= $defaultInsurance == 50 ? 'selected="selected"' : '';?> >€ 50</option> | ||
<option value="250" <?= $defaultInsurance == 250 ? 'selected="selected"' : '';?> >€ 250</option> | ||
<option value="500" <?= $defaultInsurance == 500 ? 'selected="selected"' : '';?> >€ 500</option> | ||
<option value="1000" >€ 1000</option> | ||
<option value="1500" >€ 1500</option> | ||
<option value="2000" >€ 2000</option> | ||
<option value="2500" >€ 2500</option> | ||
<option value="3000" >€ 3000</option> | ||
<option value="3500" >€ 3500</option> | ||
<option value="4000" >€ 4000</option> | ||
<option value="4500" >€ 4500</option> | ||
<option value="5000" >€ 5000</option> | ||
</select> | ||
</div> | ||
<script type="text/x-magento-init"> | ||
{ | ||
".page-footer": { | ||
"myparcelnl_newshipment": {} | ||
} | ||
} | ||
</script> | ||
<div class="field choice admin__field admin__field-option field-mypa_only_recipient mypa_package-toggle"> | ||
<input id="mypa_only_recipient" | ||
class="admin__control-checkbox" | ||
name="mypa[only_recipient]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('only_recipient') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_only_recipient"> | ||
<span><?php /* @escapeNotVerified */ echo __('Home address only') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_signature mypa_package-toggle"> | ||
<input id="mypa_signature" | ||
class="admin__control-checkbox" | ||
name="mypa[signature]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('signature') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_signature"> | ||
<span><?php /* @escapeNotVerified */ echo __('Signature on receipt') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_return mypa_package-toggle"> | ||
<input id="mypa_return" | ||
class="admin__control-checkbox" | ||
name="mypa[return]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('return') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_return"> | ||
<span><?php /* @escapeNotVerified */ echo __('Return if no answer') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_large_format mypa_package-toggle"> | ||
<input id="mypa_large_format" | ||
class="admin__control-checkbox" | ||
name="mypa[large_format]" | ||
value="1" | ||
type="checkbox" | ||
<?= $block->getDefaultOption('large_format') == true ? 'checked="checked"' : '';?> | ||
/> | ||
<label class="admin__field-label" | ||
for="mypa_large_format"> | ||
<span><?php /* @escapeNotVerified */ echo __('Large package') ?></span></label> | ||
</div> | ||
<div class="field choice admin__field admin__field-option field-mypa_insurance mypa_package-toggle"> | ||
<?php $defaultInsurance = $block->getDefaultInsurance();?> | ||
<select name="mypa[insurance]" id="mypa_insurance" class="required product-custom-option admin__control-select" title="" > | ||
<option value="0" ><?php echo __('No insurance') ?></option> | ||
<option value="50" <?= $defaultInsurance == 50 ? 'selected="selected"' : '';?> >€ 50</option> | ||
<option value="250" <?= $defaultInsurance == 250 ? 'selected="selected"' : '';?> >€ 250</option> | ||
<option value="500" <?= $defaultInsurance == 500 ? 'selected="selected"' : '';?> >€ 500</option> | ||
<option value="1000" >€ 1000</option> | ||
<option value="1500" >€ 1500</option> | ||
<option value="2000" >€ 2000</option> | ||
<option value="2500" >€ 2500</option> | ||
<option value="3000" >€ 3000</option> | ||
<option value="3500" >€ 3500</option> | ||
<option value="4000" >€ 4000</option> | ||
<option value="4500" >€ 4500</option> | ||
<option value="5000" >€ 5000</option> | ||
</select> | ||
</div> | ||
<script type="text/x-magento-init"> | ||
{ | ||
".page-footer": { | ||
"myparcelnl_newshipment": {} | ||
} | ||
} | ||
</script> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test12345tgfv |
Oops, something went wrong.