Skip to content

Commit

Permalink
Merge pull request #54 from logeecom/master
Browse files Browse the repository at this point in the history
Release version 3.2.15
  • Loading branch information
logeecom authored Jul 12, 2023
2 parents fbcb08c + db69b21 commit 26e55fc
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
Binary file added PluginInstallation/3.2.15/packlink.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions PluginInstallation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [3.2.15](https://github.com/packlink-dev/prestashop_module/compare/v3.2.14...v3.2.15)
### Changed
- Do not send json encoded values as smarty variables

## [3.2.14](https://github.com/packlink-dev/prestashop_module/compare/v3.2.13...v3.2.14)
### Changed
- Update link to order draft on Packlink
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "packlink/prestashop",
"description": "Packlink Shipping PrestaShop plugin",
"type": "library",
"version": "3.2.14",
"version": "3.2.15",
"repositories": [
{
"type": "vcs",
Expand Down
8 changes: 4 additions & 4 deletions src/packlink.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct()
$this->module_key = 'a7a3a395043ca3a09d703f7d1c74a107';
$this->name = 'packlink';
$this->tab = 'shipping_logistics';
$this->version = '3.2.14';
$this->version = '3.2.15';
$this->author = $this->l('Packlink Shipping S.L.');
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.6.0.14', 'max' => _PS_VERSION_);
Expand Down Expand Up @@ -204,7 +204,7 @@ public function hookDisplayAfterCarrier($params)
$configuration = $this->getShippingStepConfiguration($params);

$this->context->smarty->assign(array(
'configuration' => json_encode($configuration),
'configuration' => $configuration,
));

return $this->display(__FILE__, 'shipping_methods_17.tpl');
Expand Down Expand Up @@ -290,7 +290,7 @@ public function hookDisplayOrderConfirmation($params)
$configuration['addressId'] = $order->id_address_delivery;
$configuration['cartId'] = $order->id_cart;
$this->context->smarty->assign(
array('configuration' => json_encode($configuration))
array('configuration' => $configuration)
);

$output = $this->getLocationPickerFilesLinks();
Expand Down Expand Up @@ -1000,7 +1000,7 @@ protected function getPresta16ShippingStepPage($params)
$configuration = $this->getShippingStepConfiguration($params);

$this->context->smarty->assign(
array('configuration' => json_encode($configuration))
array('configuration' => $configuration)
);

$stylesPath = $this->_path . 'views/css/packlink-shipping-methods.css?v=' . $this->version;
Expand Down
2 changes: 1 addition & 1 deletion src/views/templates/hook/confirm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
let selectBtn = document.getElementById('pl-dropoff-button');
let confirmMask = document.getElementById('pl-confirm-mask');
let configuration = JSON.parse(
'{$configuration|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
'{$configuration|json_encode|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
.replace(/"/g, '"')
.replace(/&/g, '&')
);
Expand Down
4 changes: 2 additions & 2 deletions src/views/templates/hook/shipping_methods_16.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@
Packlink.checkOut = new Packlink.CheckOutController(
JSON.parse(
'{$configuration|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
'{$configuration|json_encode|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
.replace(/"/g, '"')
.replace(/&/g, '&')
)
);
)
function checkLoadStatus() {
let elements = document.getElementsByClassName('delivery_option_radio');
Expand Down
3 changes: 2 additions & 1 deletion src/views/templates/hook/shipping_methods_17.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
</a>
</div>
</div>
<input type="hidden" id="pl-shipping-configuration" value="{$configuration|json_encode}">
</location-picker-template>

<script>
Expand All @@ -102,7 +103,7 @@
Packlink.checkOut = new Packlink.CheckOutController(
JSON.parse(
'{$configuration|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
'{$configuration|json_encode|escape:'htmlall':'UTF-8'|htmlspecialchars_decode:3}'
.replace(/&quot;/g, '"')
.replace(/&amp;/g, '&')
)
Expand Down

0 comments on commit 26e55fc

Please sign in to comment.