Skip to content

Commit

Permalink
Version 5.1.3 for 1.5.7g
Browse files Browse the repository at this point in the history
  • Loading branch information
webchills committed Nov 14, 2023
1 parent 401462e commit 00555a9
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 75 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
<?php
/**
* create the breadcrumb trail
* see {@link http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
*
* @copyright Copyright 2003-2022 Zen Cart Development Team
* see {@link https://docs.zen-cart.com/dev/code/init_system/} for more details.
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2023 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_add_crumbs.php for Ceon Uri Mapping 2022-12-21 08:46:16Z webchills $
* @version $Id: init_add_crumbs.php for Ceon Uri Mapping 2023-11-04 08:24:16Z webchills $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));

/**
* add category names or the manufacturer name to the breadcrumb trail
*/
if (!isset($robotsNoIndex)) $robotsNoIndex = false;
$robotsNoIndex = $robotsNoIndex ?? false;

// might need isset($_GET['cPath']) later ... right now need $cPath or breaks breadcrumb from sidebox etc.
if (isset($cPath_array) && isset($cPath)) {
for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
$categories_query = "select categories_name
from " . TABLE_CATEGORIES_DESCRIPTION . "
where categories_id = '" . (int)$cPath_array[$i] . "'
and language_id = '" . (int)$_SESSION['languages_id'] . "'";
if (isset($cPath_array, $cPath)) {
for ($i = 0, $n = count($cPath_array); $i < $n; $i++) {
$categories_query =
"SELECT categories_name
FROM " . TABLE_CATEGORIES_DESCRIPTION . "
WHERE categories_id = " . (int)$cPath_array[$i] . "
AND language_id = " . (int)$_SESSION['languages_id'];
$categories = $db->Execute($categories_query, 1);

$categories = $db->Execute($categories_query);
if ($categories->RecordCount() > 0) {
$breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
} elseif(SHOW_CATEGORIES_ALWAYS == 0) {
// if invalid, set the robots noindex/nofollow for this page
$robotsNoIndex = true;
break;
if (!$categories->EOF) {
$breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i + 1)))));
} elseif (SHOW_CATEGORIES_ALWAYS === '0') {
// if invalid, set the robots noindex/nofollow for this page
$robotsNoIndex = true;
break;
}
}
}
}
/**
* add get terms (e.g manufacturer, music genre, record company or other user defined selector) to breadcrumb
Expand Down Expand Up @@ -73,17 +76,17 @@
$get_terms->MoveNext();
}
/**
* add the products model to the breadcrumb trail
* add the products name to the breadcrumb trail
*/
if (isset($_GET['products_id'])) {
$productname_query = "select products_name
from " . TABLE_PRODUCTS_DESCRIPTION . "
where products_id = '" . (int)$_GET['products_id'] . "'
and language_id = '" . $_SESSION['languages_id'] . "'";

$productname = $db->Execute($productname_query);
$productname_query =
"SELECT products_name
FROM " . TABLE_PRODUCTS_DESCRIPTION . "
WHERE products_id = " . (int)$_GET['products_id'] . "
AND language_id = " . (int)$_SESSION['languages_id'];
$productname = $db->Execute($productname_query, 1);

if ($productname->RecordCount() > 0) {
if (!$productname->EOF) {
$breadcrumb->add($productname->fields['products_name'], zen_href_link(zen_get_info_page($_GET['products_id']), 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/**
* Side Box Template
*
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2022 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: tpl_manufacturers_select.php for CEON Uri Mapping 2022-02-18 20:07:16Z webchills $
* @version $Id: tpl_manufacturers_select.php for CEON Uri Mapping 2023-11-04 08:07:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content.= zen_draw_form('manufacturers_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('manufacturers_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT);
$content .= zen_draw_label(PLEASE_SELECT, 'select-manufacturers_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/**
* Side Box Template
*
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2023 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: tpl_music_genres_select.php for CEON Uri Mapping 2022-02-18 20:07:16Z webchills $
* @version $Id: tpl_music_genres_select.php for CEON Uri Mapping 2023-11-04 08:07:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= zen_draw_form('music_genres_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('music_genres_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter', 'music_genre');
$content .= zen_draw_label(PLEASE_SELECT, 'select-music_genre_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/**
* Side Box Template
*
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2023 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: tpl_record_company_select.php for CEON URI Mapping 2022-02-18 20:08:16Z webchills $
* @version $Id: tpl_record_company_select.php for CEON URI Mapping 2023-11-04 08:08:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= zen_draw_form('record_company_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('record_company_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter', 'record_company');
$content .= zen_draw_label(PLEASE_SELECT, 'select-record_company_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
/**
* Side Box Template
*
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2022 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: tpl_manufacturers_select.php for CEON Uri Mapping 2022-02-18 20:03:16Z webchills $
* @version $Id: tpl_manufacturers_select.php for CEON Uri Mapping 2023-11-04 08:03:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content.= zen_draw_form('manufacturers_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('manufacturers_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT);
$content .= zen_draw_label(PLEASE_SELECT, 'select-manufacturers_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/**
* Side Box Template
*
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2023 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: tpl_music_genres_select.php for CEON Uri Mapping 2022-02-18 20:04:16Z webchills $
* @version $Id: tpl_music_genres_select.php for CEON Uri Mapping 2023-11-04 08:04:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= zen_draw_form('music_genres_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('music_genres_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter', 'music_genre');
$content .= zen_draw_label(PLEASE_SELECT, 'select-music_genre_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/**
* Side Box Template
*
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Specific (158 code in 157)
* @copyright Copyright 2003-2023 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: tpl_record_company_select.php for CEON URI Mapping 2022-02-18 20:04:16Z webchills $
* @version $Id: tpl_record_company_select.php for CEON URI Mapping 2023-11-04 08:04:16Z webchills $
*/
$content = "";
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= zen_draw_form('record_company_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get');
$content .= zen_draw_form('record_company_form', zen_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get', 'class="sidebox-select-form"');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter', 'record_company');
$content .= zen_draw_label(PLEASE_SELECT, 'select-record_company_id', 'class="sr-only"');
// BEGIN CEON URI MAPPING 1 of 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* Loaded by main_page=index
* Displays product-listing when a particular category/subcategory is selected for browsing
*
* @package templateSystem
* @copyright Copyright 2003-2022 Zen Cart Development Team
* @copyright Copyright 2003-2023 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: tpl_index_product_list.php for CEON Uri Mapping 2022-12-21 08:55:58Z webchills $
* @version $Id: tpl_index_product_list.php for CEON Uri Mapping 2023-11-04 08:55:58Z webchills $
*/
?>
<div class="centerColumn" id="indexProductList">
Expand Down Expand Up @@ -39,7 +38,7 @@
<?php } // categories_description ?>
</div>

<?php if ($listing->RecordCount()) { ?>
<?php if (!empty($listing)) { ?>
<div id="filter-wrapper" class="group">
<?php } ?>

Expand Down Expand Up @@ -159,7 +158,7 @@
?>

<?php // end wrapper ?>
<?php if ($listing->RecordCount()) { ?>
<?php if (!empty($listing)) { ?>
</div>
<?php } ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package ceon_uri_mapping
* @author Conor Kerr <[email protected]>
* @copyright Copyright 2008-2019 Ceon
* @copyright Copyright 2003-2019 Zen Cart Development Team
* @copyright Copyright 2003-2023 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @link http://ceon.net/software/business/zen-cart/uri-mapping
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
Expand Down Expand Up @@ -61,7 +61,7 @@ public function __construct($load_config = true)
// Set up the basic version settings for this module
$this->_ceon_base_model_code = 'S-ZC-UM';

$this->_version = '5.1.2';
$this->_version = '5.1.3';

$this->_copyright_start_year = 2008;

Expand Down
31 changes: 19 additions & 12 deletions SQL/install.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################################
# CEON URI Mapping 5.1.1 Install - 2022-02-19 - webchills
# CEON URI Mapping 5.1.2 Install - 2023-11-04 - webchills
###############################################################################################

##############################
Expand Down Expand Up @@ -33,14 +33,21 @@ PRIMARY KEY (`page_type`, `language_code`)


CREATE TABLE IF NOT EXISTS ceon_uri_mappings (
`uri` TEXT NOT NULL,
`language_id` INT(11) UNSIGNED DEFAULT NULL,
`current_uri` INT(1) UNSIGNED DEFAULT '0',
`main_page` VARCHAR(45) NULL,
`query_string_parameters` VARCHAR(255) DEFAULT NULL,
`associated_db_id` INT(11) UNSIGNED DEFAULT NULL,
`alternate_uri` VARCHAR(255) DEFAULT NULL,
`redirection_type_code` VARCHAR(3) DEFAULT '301',
`date_added` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
INDEX `assoc_db_id_idx` (`language_id`, `current_uri`, `main_page`, `associated_db_id`)
) ENGINE=MyISAM;
`id` int(11) NOT NULL,
`uri` TEXT NOT NULL,
`language_id` int(11) UNSIGNED DEFAULT NULL,
`current_uri` int(1) UNSIGNED DEFAULT 0,
`main_page` varchar(45) DEFAULT NULL,
`query_string_parameters` varchar(255) DEFAULT NULL,
`associated_db_id` int(11) UNSIGNED DEFAULT NULL,
`alternate_uri` varchar(255) DEFAULT NULL,
`redirection_type_code` varchar(3) DEFAULT '301',
`date_added` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00'
) ENGINE=MyISAM;

ALTER TABLE ceon_uri_mappings
ADD UNIQUE KEY `id` (`id`),
ADD KEY `assoc_db_id_idx` (`language_id`,`current_uri`,`main_page`,`associated_db_id`);

ALTER TABLE ceon_uri_mappings
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
27 changes: 21 additions & 6 deletions liesmich.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
CEON URI Mappings 5.1.2 für Zen Cart 1.5.7 deutsch
CEON URI Mappings 5.1.3 für Zen Cart 1.5.7g deutsch

Dieses Modul erlaubt das benutzerdefinierte Umschreiben der URLs in Zen Cart.
Anders als bei anderen Modulen dieser Art, erfolgt das Umschreiben nicht automatisch, sondern es kann jede URL per Admin eigens definiert werden, was eine völlige Kontrolle über die vom Shop verwendeten URLs ermöglicht.

Version 5.1.2 ist ausschließlich für Zen Cart 1.5.7 deutsch geeignet
Version 5.1.3 ist ausschließlich für Zen Cart 1.5.7g deutsch geeignet

Changelog 5.1.3
November 2023 - webchills
Anpassungen für 1.5.7g
Tabelle ceon_uri_mappings mit id versehen, um direktes Bearbeiten via phpMyAdmin zu erleichtern

Changelog 5.1.2
Dezember 2022 - webchills
Expand Down Expand Up @@ -62,7 +67,9 @@ Oder einfach das automatische Vergeben einer URL angekreuzt lassen (Tick this bo
NEUINSTALLATION


Dieses Modul ist nur für Zen Cart 1.5.7 deutsch geeignet und ändert einige Corefiles.
Dieses Modul ist nur für Zen Cart 1.5.7g deutsch geeignet und ändert einige Corefiles.
Stellen Sie sicher, dass Sie Ihren Shop auf 1.5.7g aktualisiert haben, bevor Sie dieses Modul installieren.
Die mitgelieferten geänderten Dateien sind auf dem Stand von 1.5.7g!
Es ist kein Modul, das Sie in 2 Minuten einfach hochladen können.
Da das Modul englisch ist, sollten Sie gute Englischkenntnisse haben

Expand Down Expand Up @@ -166,14 +173,22 @@ Lesen Sie die umfangreiche Doku im Ordner DOKU ENGLISCH, um sich mit dem Modul u

____________________________________________________________________________________________________________________________________________

UPDATE VON VERSION 5.0.0 oder 5.0.1 auf 5.1.2
HINWEIS zu Warning Logs unter PHP 8.1 bei der Installation

Bei Verwendung von PHP 8.1 kann es bei der Installation zu einigen völlig harmlosen Warning Errorlogs kommen.
Die einfach ignorieren und löschen.
Im laufenden Betrieb sollten dann auch mit PHP 8.1 keine Warning/Error Logs auftreten.

____________________________________________________________________________________________________________________________________________

UPDATE VON VERSION 5.0.0 oder 5.0.1 oder 5.1.2 auf 5.1.3

Wenn Sie in Ihrem Shop bereits das CEON URI Mapping Modul 5.1.1, 5.0.1 oder 5.0.0 verwenden, dann können Sie einfach auf 5.1.2 aktualisieren
Wenn Sie in Ihrem Shop bereits das CEON URI Mapping Modul 5.1.2, 5.0.1 oder 5.0.0 verwenden, dann können Sie einfach auf 5.1.3 aktualisieren
Gehen Sie dazu genauso vor wie unter Neuinstallation beschrieben.
Einzige Ausnahme:
Punkt 1 lassen Sie natürlich weg, denn Sie haben ja bereits die zusätzlichen CEON URI Mapping Datenbanktabellen in Ihrer Datenbank
Nach dem Hochladen der Dateien gehen Sie auf den Menüpunkt Module > CEON URI Mapping (SEO) Config
Dort werden Sie dann sehen, dass das Modul automatisch auf 5.1.2 aktualisiert wurde.
Dort werden Sie dann sehen, dass das Modul automatisch auf 5.1.3 aktualisiert wurde.
Löschen Sie nun noch folgende Datei falls vorhanden:
includes/extra_datafiles/ceon_uri_mapping_sessions_define.php
Sie wird bereits seit 5.1.0 nicht mehr benötigt

0 comments on commit 00555a9

Please sign in to comment.