diff --git a/afterpayofficial.php b/afterpayofficial.php index 36b2ddc..051a03c 100644 --- a/afterpayofficial.php +++ b/afterpayofficial.php @@ -161,7 +161,7 @@ public function __construct() { $this->name = 'afterpayofficial'; $this->tab = 'payments_gateways'; - $this->version = '1.1.2'; + $this->version = '1.1.2.1'; $this->author = $this->l('Afterpay'); $this->currencies = true; $this->currencies_mode = 'checkbox'; @@ -366,6 +366,17 @@ public function hookHeader() // Continue } } + if (Context::getContext()->controller->php_self === 'order') { + if (_PS_VERSION_ >= "1.7") { + $this->context->controller->registerJavascript( + sha1(mt_rand(1, 90000)), + self::AFTERPAY_JS_CDN_URL, + array('server' => 'remote') + ); + } else { + $this->context->controller->addJS(self::AFTERPAY_JS_CDN_URL); + } + } } /** diff --git a/config.xml b/config.xml index 5012275..0b51576 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ afterpayofficial - +