Skip to content

Commit

Permalink
Merge pull request #5 from myparcelnl/v1.1.3_2
Browse files Browse the repository at this point in the history
update 1.1.3
  • Loading branch information
NikitaMyParcel authored Dec 31, 2020
2 parents d3ef017 + f12140a commit 0a28a44
Show file tree
Hide file tree
Showing 14 changed files with 324 additions and 8 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<modification>
<name>MyParcel NL</name>
<version>1.1.2</version>
<version>1.1.3</version>
<code>MyParcelNL</code>
<author>MyParcel NL</author>
<link>https://www.myparcel.nl/</link>
Expand Down
Binary file added upload/.DS_Store
Binary file not shown.
Binary file added upload/admin/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// Heading
$heading_title = 'Myparcel NL v1.1.2';
$heading_title = 'Myparcel NL v1.1.3';
$_['heading_title'] = $heading_title;
// Text
$_['text_module'] = 'Modules';
Expand Down
270 changes: 270 additions & 0 deletions upload/admin/language/nl-nl/extension/module/myparcelnl.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
// Heading
$_['heading_title'] = 'MyParcel Shipping';

// Text
$_['text_shipping'] = 'Shipping';
$_['text_success'] = 'Success: You have modified MyParcel shipping!';
$_['text_edit'] = 'Edit MyParcel Shipping';

// Entry
$_['entry_title'] = 'Title';
$_['entry_cost'] = 'Cost';
$_['entry_tax_class'] = 'Tax Class';
$_['entry_geo_zone'] = 'Geo Zone';
$_['entry_status'] = 'Status';
$_['entry_sort_order'] = 'Sort Order';

// Error
$_['error_permission'] = 'Warning: You do not have permission to modify MyParcel shipping!';
15 changes: 15 additions & 0 deletions upload/admin/language/nl-nl/extension/total/myparcel_total.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
// Heading
$_['heading_title'] = 'MyParcel Total';

// Text
$_['text_total'] = 'MyParcel Total';
$_['text_success'] = 'Success: You have modified myparcel total!';
$_['text_edit'] = 'Edit';

// Entry
$_['entry_status'] = 'Status';
$_['entry_sort_order'] = 'Sort Order';

// Error
$_['error_permission'] = 'Warning: You do not have permission to modify myparcel total!';
Binary file added upload/catalog/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions upload/system/library/myparcelnl/assets/js/checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ var MYPARCEL_CHECKOUT = MYPARCEL_CHECKOUT || {};

MYPARCEL_CHECKOUT.activateIframe = function() {

$('#button-shipping-method').prop('disabled', true);
// If delivery iFrame is not enabled then ignore this function
if (!MYPARCEL_CHECKOUT.isActive()) {
return true;
Expand All @@ -366,7 +365,7 @@ var MYPARCEL_CHECKOUT = MYPARCEL_CHECKOUT || {};
if (typeof el === 'undefined' || !el) {
return false;
}

$('#button-shipping-method').prop('disabled', true);
iframeWindow = el.contentWindow;

$(el).on('load', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,13 @@ function add_query_arg()

function mp_parse_str( $string, &$array ) {
parse_str( $string, $array );
if ( get_magic_quotes_gpc() )
if(version_compare (phpversion(), '7.4.0', '<') && version_compare (phpversion(), '5.4', '!=')){
if ( get_magic_quotes_gpc() )
$array = $this->stripslashes_deep( $array );
}
else{
$array = $this->stripslashes_deep( $array );
}
}

function stripslashes_deep( $value ) {
Expand Down Expand Up @@ -411,7 +416,8 @@ function getAddressComponents($address)
$ret['street'] = str_replace('-', '', $ret['street']);
$ret['street'] .= ' -' . $ret['house_number'];
$ret['force_addition_number'] = true;
return $this->_splitMultipleHouseNumberStreet( $ret['street'] ,$ret['number_addition']);
$number_addition = (isset($ret['number_addition'])) ? $ret['number_addition'] : '';
return $this->_splitMultipleHouseNumberStreet( $ret['street'] ,$number_addition);
}
/** END @Since the fix for negative house number (64-69) **/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ public function prepareReturnShipmentData( $order_id, $options )

// PREVENT ILLEGAL SETTINGS
// convert numeric strings to int
$int_options = array('package_type', 'delivery_type', 'only_recipient', 'signature', 'return', 'large_format');
$int_options = array('package_type', 'delivery_type', 'only_recipient', 'signature', 'return', 'large_format','age_check');
foreach ($options as $key => &$value) {
if (in_array($key, $int_options)) {
$value = (int)$value;
Expand Down
7 changes: 7 additions & 0 deletions upload/system/library/myparcelnl/myparcel.checkout.ocmod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
$this->load->model('extension/myparcelnl/helper');
$this->model_extension_myparcelnl_helper->initMyParcel();
$data['myparcel_delivery_iframe'] = $this->model_extension_myparcelnl_helper->getContent('iframe_delivery_options');
$data['myparcel_delivery_checkout_header'] = $this->model_extension_myparcelnl_helper->getContent('iframe_delivery_checkout_header');
/* MyParcel Ocmod End */
]]></add>
</operation>
Expand Down Expand Up @@ -310,6 +311,12 @@
<!-- ____________ SHIPPING_METHOD.TWIG _____________ -->
<!-- ______________________________________________ -->
<file path="catalog/view/theme/*/template/checkout/shipping_method.twig">
<operation>
<search><![CDATA[{% if shipping_methods %}]]></search>
<add position="after"><![CDATA[
{{ myparcel_delivery_checkout_header }}
]]></add>
</operation>
<operation>
<search><![CDATA[{% for shipping_method in shipping_methods %}]]></search>
<add position="before"><![CDATA[
Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/myparcelnl/myparcel.ocmod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<modification>
<name>MyParcel NL</name>
<version>1.1.2</version>
<version>1.1.3</version>
<code>MyParcelNL</code>
<author>MyParcel NL</author>
<link>https://www.myparcel.nl/</link>
Expand Down

0 comments on commit 0a28a44

Please sign in to comment.