Skip to content

Commit

Permalink
Release 1.0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoEigenmannCW committed Apr 3, 2019
1 parent 82cc1f6 commit 4a4e5cf
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 43 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ This repository contains the PrestaShop wallee payment module that enables the s

## Documentation

* [English](https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.0.21/docs/en/documentation.html)
* [English](https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.0.22/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/wallee-payment/prestashop-1.6/blob/1.0.21/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/prestashop-1.6/blob/1.0.22/LICENSE) for more information.

## Other PrestaShop Versions

Expand Down
1 change: 1 addition & 0 deletions controllers/front/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function postProcess()
$error[] = "Cron overloaded could not execute all registered tasks.";
break 2;
}
$callableName = null;
if (! is_callable($subTask, false, $callableName)) {
$error[] = "Module '$module' returns not callable task '$callableName'.";
continue;
Expand Down
24 changes: 24 additions & 0 deletions docs/en/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,30 @@ table td[class*="col-"],table th[class*="col-"] {
display: table-cell;
}

ol.glossary {
counter-reset: glossary-counter;
list-style: none;
padding-left: 40px;
}

ol.glossary li {
counter-increment: glossary-counter;
position: relative;
}

ol.glossary li::before {
content: counter(glossary-counter);
position: absolute;
background-color: #73EAA9;
color: #fff;
border-radius: 100px;
width: 24px;
left: -40px;
text-align: center;
font-weight: bold;
line-height: 24px;
}

.layout-wrapper {
position: relative;
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/prestashop-1.6/releases/tag/1.0.21/">
<a href="https://github.com/wallee-payment/prestashop-1.6/releases/tag/1.0.22/">
Source
</a>
</li>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/wallee-payment/prestashop-1.6/releases/tag/1.0.21/">Download</a> the module.</p>
<p><a href="https://github.com/wallee-payment/prestashop-1.6/releases/tag/1.0.22/">Download</a> the module.</p>
</li>
<li>
<p>Login to the backend of your PrestsShop store.</p>
Expand Down
83 changes: 48 additions & 35 deletions inc/AbstractMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public static function migrateDb()

protected static function installTableBase()
{
$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_method_configuration(
$instance = Db::getInstance();
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_method_configuration(
`id_method_configuration` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_shop` int(10) unsigned NOT NULL,
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand Down Expand Up @@ -93,11 +94,11 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}


$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_transaction_info(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_transaction_info(
`id_transaction_info` int(10) unsigned NOT NULL AUTO_INCREMENT,
`transaction_id` bigint(20) unsigned NOT NULL,
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -122,10 +123,10 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}

$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_token_info(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_token_info(
`id_token_info` int(10) unsigned NOT NULL AUTO_INCREMENT,
`token_id` bigint(20) unsigned NOT NULL,
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -145,10 +146,10 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}

$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_cart_meta(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_cart_meta(
`cart_id` int(10) unsigned NOT NULL,
`meta_key` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`meta_value` longtext COLLATE utf8_unicode_ci NULL,
Expand All @@ -157,10 +158,10 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}

$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_order_meta(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_order_meta(
`order_id` int(10) unsigned NOT NULL,
`meta_key` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`meta_value` longtext COLLATE utf8_unicode_ci NULL,
Expand All @@ -169,10 +170,10 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}

$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_void_job(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_void_job(
`id_void_job` int(10) unsigned NOT NULL AUTO_INCREMENT,
`void_id` bigint(20) unsigned,
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -190,10 +191,10 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}

$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_completion_job(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_completion_job(
`id_completion_job` int(10) unsigned NOT NULL AUTO_INCREMENT,
`completion_id` bigint(20) unsigned,
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -211,9 +212,9 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}
$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_refund_job(
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_refund_job(
`id_refund_job` int(10) unsigned NOT NULL AUTO_INCREMENT,
`refund_id` bigint(20) unsigned,
`external_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -236,7 +237,7 @@ protected static function installTableBase()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}
}

Expand All @@ -263,39 +264,51 @@ protected static function installOrderPaymentSaveHookBase()

protected static function updateCustomerIdOnTokenInfoBase()
{
$result = Db::getInstance()->execute(
$instance = Db::getInstance();
$result = $instance->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_token_info` CHANGE `customer_id` `customer_id` int(10) unsigned NULL DEFAULT NULL;"
);
if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}
}

protected static function updateImageBase()
{
$result = Db::getInstance()->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_method_configuration` ADD COLUMN `image_base` varchar(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception(DB::getMsgError());
}
$instance = Db::getInstance();
$exists = $instance->executeS("SHOW COLUMNS FROM `" . _DB_PREFIX_ . "wle_method_configuration` LIKE 'image_base'");
if (empty($exists)) {
$result = $instance->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_method_configuration` ADD COLUMN `image_base` varchar(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception($instance->getMsgError());
}
}

$result = Db::getInstance()->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_transaction_info` ADD COLUMN `image_base` VARCHAR(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception(DB::getMsgError());
$exists = $instance->executeS("SHOW COLUMNS FROM `" . _DB_PREFIX_ . "wle_transaction_info` LIKE 'image_base'");
if (empty($exists)) {
$result = $instance->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_transaction_info` ADD COLUMN `image_base` VARCHAR(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception($instance->getMsgError());
}
}
}

protected static function userFailureMessageBase()
{
$result = Db::getInstance()->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_transaction_info` ADD COLUMN `user_failure_message` VARCHAR(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception(DB::getMsgError());
}
$instance = Db::getInstance();
$exists = $instance->executeS("SHOW COLUMNS FROM `" . _DB_PREFIX_ . "wle_transaction_info` LIKE 'user_failure_message'");
if (empty($exists)) {
$result = $instance->execute(
"ALTER TABLE `" . _DB_PREFIX_ . "wle_transaction_info` ADD COLUMN `user_failure_message` VARCHAR(2047) COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;"
);
if ($result === false) {
throw new Exception($instance->getMsgError());
}
}
}

}
5 changes: 3 additions & 2 deletions inc/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ protected static function getMigrations()
public static function initializeTables()
{
static::installTableBase();
$result = Db::getInstance()->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_cron_job(
$instance = DB::getInstance();
$result = $instance->execute("CREATE TABLE IF NOT EXISTS " . _DB_PREFIX_ . "wle_cron_job(
`id_cron_job` int(10) unsigned NOT NULL AUTO_INCREMENT,
`constraint_key` int(10),
`state` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
Expand All @@ -44,7 +45,7 @@ public static function initializeTables()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");

if ($result === false) {
throw new Exception(DB::getMsgError());
throw new Exception($instance->getMsgError());
}
}

Expand Down
2 changes: 1 addition & 1 deletion views/templates/admin/admin_help_buttons.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<div class="alert alert-info">
<img src="../modules/wallee/logo.png" style="float:left; margin-right:15px;" height="50">
<p><strong>{l s='This module requires an %s account.' sprintf='wallee' mod='wallee'}</strong></p>
<p><a class="btn btn-default" href="https://app-wallee.com/user/signup" target="_blank">{l s='Sign Up' mod='wallee'}</a> <a class="btn btn-default" href="https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.0.21/docs/en/documentation.html" target="_blank">{l s='Documentation' mod='wallee'}</a></p>
<p><a class="btn btn-default" href="https://app-wallee.com/user/signup" target="_blank">{l s='Sign Up' mod='wallee'}</a> <a class="btn btn-default" href="https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.0.22/docs/en/documentation.html" target="_blank">{l s='Documentation' mod='wallee'}</a></p>
</div>
2 changes: 1 addition & 1 deletion wallee.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct()
$this->author = 'Customweb GmbH';
$this->bootstrap = true;
$this->need_instance = 0;
$this->version = '1.0.21';
$this->version = '1.0.22';
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.1.21');
parent::__construct();
}
Expand Down

0 comments on commit 4a4e5cf

Please sign in to comment.