- Created a new template for the cart rule form with custom label, switch, and choice widgets. - Implemented the InPost Pay block in the order details template for displaying delivery method, APM, and VAT invoice request. - Added legacy support for the order details template to maintain compatibility with older PrestaShop versions.
31 lines
765 B
PHP
31 lines
765 B
PHP
<?php
|
|
|
|
if (!defined('_PS_VERSION_')) {
|
|
exit;
|
|
}
|
|
|
|
/**
|
|
* @param InPostIzi $module
|
|
*
|
|
* @return bool
|
|
*/
|
|
function upgrade_module_1_3_15(Module $module)
|
|
{
|
|
foreach (['INPOST_PAY_payment_courier', 'INPOST_PAY_payment_courier_cod'] as $key) {
|
|
if (!$carrierId = Configuration::get($key)) {
|
|
continue;
|
|
}
|
|
|
|
$carrier = new Carrier($carrierId);
|
|
|
|
if (!Configuration::updateValue($key, $carrier->id_reference)) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return $module->registerHook('displayPaymentReturn')
|
|
&& $module->registerHook('actionAjaxDieCartControllerDisplayAjaxUpdateBefore')
|
|
&& $module->unregisterHook('actionPresentCart')
|
|
&& $module->unregisterHook('actionCartUpdateQuantityBefore');
|
|
}
|