Skip to content

Commit

Permalink
Version 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webchills committed Mar 1, 2024
1 parent d5c96e4 commit 07013e6
Show file tree
Hide file tree
Showing 12 changed files with 389 additions and 341 deletions.
17 changes: 11 additions & 6 deletions ANLEITUNG/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>UID 3.1.3 für Zen-Cart 1.5.7 deutsch</title>
<title>UID 3.2.0 für Zen-Cart 1.5.7 deutsch</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="de">
Expand All @@ -12,7 +12,7 @@
<body>
<div id="wrapper">
<div id="header">
<h1>UID 3.1.3 für Zen Cart 1.5.7 deutsch</h1>
<h1>UID 3.2.0 für Zen Cart 1.5.7 deutsch</h1>
</div>

<div id="slidetabsmenu" style="display: none;">
Expand Down Expand Up @@ -65,7 +65,12 @@ <h2>Sinn und Zweck dieses Moduls</h2>
</p>
<h3>Copyright, Changelog, Lizenz</h3>
<p>Anpassung des Moduls <a href="https://github.com/lat9/vat4eu" target="_blank">VAT Processing for European Countries (Vat4EU) </a> von lat9 für die deutsche Zen Cart Version 1.5.7<br>
(c) 2022 <a href="https://www.webchills.at" target="_blank">webchills</a><br>
(c) 2022-2024 <a href="https://www.webchills.at" target="_blank">webchills</a><br>
<br>
Changelog Version 3.2.0:<br>
2024-03-01 webchills<br>
Anpassungen für 1.5.7h und PHP 8.2.x
<br>
<br>
Changelog Version 3.1.3:<br>
2022-09-02 webchills<br>
Expand Down Expand Up @@ -99,7 +104,7 @@ <h3>Copyright, Changelog, Lizenz</h3>
<h2>Neuinstallation</h2>
<h3>Voraussetzungen</h3>
<br>
<p>Dieses Modul ist<strong> nur für die deutsche Zen Cart 1.5.7 Version geeignet</strong> und ändert einige Corefiles.<br>
<p>Dieses Modul ist<strong> nur für die deutsche Zen Cart 1.5.7g oder 1.5.7h Version geeignet</strong> und ändert einige Corefiles.<br>
<strong> Erst in einem Testshop einspielen und nicht direkt in Ihrem Liveshop!</strong></p>
<br>
<p>Für den Einbau dieses Moduls sollten Sie über folgende Werkzeuge verfügen:<br>
Expand Down Expand Up @@ -200,8 +205,8 @@ <h2>UPDATE VON ÄLTEREN VERSIONEN DIESES MODULS</h2>
Falls Sie dieses Modul in Version 2.7.3 und älter bereits in Ihrem Zen Cart 1.5.6 Shop verwendet haben und nun auf Zen Cart 1.5.7 aktualisiert haben, dann können Sie ihre bereits hinterlegten UIDs weiterverwenden, indem Sie sie in die neue Datenbankstruktur übernehmen</p>
<p>Eine Anleitung dazu finden Sie in der Datei anleitung.txt im Ordner UID DATENUEBERNAHME AUS ALTEM MODUL.</p>
<p><strong>WICHTIG:<br/>
Bevor Sie diese Konvertierung durchführen installieren Sie zunächst ganz normal wie unter Neuinstallation beschrieben das Modul UID 3.1.2 für Zen Cart 1.5.7 deutsch in Ihrem bereits auf 1.5.7 aktualisierten Shop!</strong></p>
<p>Sie haben also bereits einen funktionierenden auf 1.5.7 aktualisierten Shop mit dem neuen UID Modul 3.1.3. <br>
Bevor Sie diese Konvertierung durchführen installieren Sie zunächst ganz normal wie unter Neuinstallation beschrieben das Modul UID 3.2.0 für Zen Cart 1.5.7 deutsch in Ihrem bereits auf 1.5.7 aktualisierten Shop!</strong></p>
<p>Sie haben also bereits einen funktionierenden auf 1.5.7 aktualisierten Shop mit dem neuen UID Modul 3.2.0. <br>
Nur unter Kunden > Kunden sind keinerlei bestehende UIDs vorhanden.</p>
<p>Und die übernehmen Sie nun wie in der anleitung.txt beschrieben.</p>
<p>Prüfen Sie auch, ob in Ihrer Shopinstallation noch irgendwo Relikte des alten Moduls sind, folgende Dateien sollten keinesfalls mehr vorhanden sein, falls sie vorhanden sind vom Server löschen:<br>
Expand Down
6 changes: 3 additions & 3 deletions GEAENDERTE DATEIEN/includes/classes/class.rl_invoice3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/**
* @package pdf Rechnung
* @copyright Copyright 2005-2012 langheiter.com
* @copyright Copyright 2003-2022 Zen Cart Development Team
* @copyright Copyright 2003-2024 Zen Cart Development Team
* Zen Cart German Version - www.zen-cart-pro.at
* @copyright Portions Copyright 2003 osCommerce
* @license https://www.zen-cart-pro.at/license/3_0.txt GNU General Public License V3.0
* @version $Id: class.rl_invoice3.php for UID 2022-06-03 15:02:17Z webchills $
* @version $Id: class.rl_invoice3.php for UID 2024-01-20 09:02:17Z webchills $
*/

error_reporting(E_ERROR);
Expand Down Expand Up @@ -512,7 +512,7 @@ function getPDFFileName() {
return $this->pdfPath['path'] . $pdfName;
}
function getPDFAttachments($param = 'ALL') {
$attachArray = array();
$attachArray = [];
$tmp = $this->getPDFFileName();
if (file_exists($tmp)) {
$ft = str_replace($this->pdfPath['path'], '', $tmp);
Expand Down
345 changes: 162 additions & 183 deletions NEUE DATEIEN/DEINADMIN/includes/classes/observers/Vat4EuAdminObserver.php

Large diffs are not rendered by default.

54 changes: 39 additions & 15 deletions NEUE DATEIEN/DEINADMIN/includes/init_includes/init_vat4eu_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@
* @package UID
* Zen Cart German Specific
* based on VAT4EU plugin by Cindy Merkin a.k.a. lat9 (cindy@vinosdefrutastropicales.com)
* Copyright (c) 2017-2022 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Copyright (c) 2017-2024 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2024 Zen Cart Development Team
* Zen Cart German Version - www.zen-cart-pro.at
* @copyright Portions Copyright 2003 osCommerce
* @license https://www.zen-cart-pro.at/license/3_0.txt GNU General Public License V3.0
* @version $Id: init_vat4eu_admin.php 2022-06-05 08:40:16Z webchills $
* @version $Id: init_vat4eu_admin.php 2024-03-01 20:27:16Z webchills $
*/

if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}

define('VAT4EU_CURRENT_VERSION', '3.1.2');
define('VAT4EU_CURRENT_VERSION', '3.2.0');
define('VAT4EU_CURRENT_UPDATE_DATE', '2024-03-01');

define('VAT4EU_CURRENT_VERSION', VAT4EU_CURRENT_RELEASE . ': ' . VAT4EU_CURRENT_UPDATE_DATE);

// -----
// Wait until an admin is logged in before seeing if any initialization steps need to be performed.
// That ensures that "someone" will see the plugin's installation/update messages!
//
if (isset($_SESSION['admin_id'])) {
if (!isset($_SESSION['admin_id']) || (defined('VAT4EU_MODULE_VERSION') && VAT4EU_MODULE_VERSION === VAT4EU_CURRENT_VERSION)) {
return;
}
// -----
// Create the plugin's configuration-group, if it's not already there. That way, we'll have the
// configuration_group_id, if needed for future configuration updates.
Expand Down Expand Up @@ -62,7 +67,7 @@
"INSERT INTO " . TABLE_CONFIGURATION . "
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function)
VALUES
('Plugin Version', 'VAT4EU_MODULE_VERSION', '" . VAT4EU_CURRENT_VERSION . "', 'The &quot;VAT for EU Countries (VAT4EU)&quot; current version and release date.', $cgi, 1, now(), 'trim(')"
('Plugin Version and Release Date', 'VAT4EU_MODULE_VERSION', '" . VAT4EU_CURRENT_VERSION . "', 'The &quot;VAT for EU Countries (VAT4EU)&quot; current version and release date.', $cgi, 10, now(), 'zen_cfg_read_only(')"
);

$db->Execute(
Expand Down Expand Up @@ -162,19 +167,38 @@
}



// -----
// Perform version-specific updates/additions.
//
switch (true) {
// -----
// Update the configuration table to reflect the current version, if it's not already set.
// v3.2.0:
//
// - Use zen_cfg_read_only instead of trim for module's version-setting.
//
if (VAT4EU_MODULE_VERSION != VAT4EU_CURRENT_VERSION) {
case version_compare(VAT4EU_MODULE_VERSION, '3.2.0', '<'):
$db->Execute(
"UPDATE " . TABLE_CONFIGURATION . "
SET configuration_value = '" . VAT4EU_CURRENT_VERSION . "',
set_function = 'zen_cfg_read_only('
"UPDATE " . TABLE_CONFIGURATION . "
SET set_function = 'zen_cfg_read_only('
WHERE configuration_key = 'VAT4EU_MODULE_VERSION'
LIMIT 1"
);
if (VAT4EU_MODULE_VERSION != '0.0.0') {
$messageStack->add(sprintf(VAT4EU_TEXT_MESSAGE_UPDATED, VAT4EU_MODULE_VERSION, VAT4EU_CURRENT_VERSION), 'success');
}
}

default: //- Fall through from above
break;
}

// -----
// Update the configuration table to reflect the current version, if it's not already set.
//
$db->Execute(
"UPDATE " . TABLE_CONFIGURATION . "
SET configuration_value = '" . VAT4EU_CURRENT_VERSION . "',
set_function = 'zen_cfg_read_only('
WHERE configuration_key = 'VAT4EU_MODULE_VERSION'
LIMIT 1"
);
if (VAT4EU_MODULE_VERSION !== '0.0.0') {
$messageStack->add(sprintf(VAT4EU_TEXT_MESSAGE_UPDATED, VAT4EU_MODULE_VERSION, VAT4EU_CURRENT_VERSION), 'success');
}
Loading

0 comments on commit 07013e6

Please sign in to comment.