|
ECB SEO SHOP SOFTWARE - IMEDES SOFTWARE DOWNLOADS
*****************************************
* *
* INSTALLATION-GUIDE *
* *
*****************************************
* @package Ajax Matrix + Zubehör *
* @compatible SP2.1 *
*****************************************
--------------
NEW FILES:
--------------
admin/accessories.php
admin/includes/javascript/DynPrice.js
admin/includes/modules/product_matrix_functions.php
admin/products_matrix.php
inc/xtc_get_default_attributes.inc.php
includes/functions/database.php
includes/modules/product_accessories.php
includes/modules/product_matrix.php
includes/modules/product_matrix_functions.php
includes/wz_tooltip.js
lang/english/admin/accessories.php
lang/german/admin/accessories.php
templates/xtc4/module/accessories.html
templates/xtc4/module/product_info/product_info_zubehoer.html
--------------
NEW DIRS:
--------------
imedes_library
includes/classes/adodb_full
--------------
CHANGED FILES:
--------------
admin/includes/application_top.php
admin/includes/column_left.php
admin/includes/functions/sessions.php
admin/includes/modules/new_attributes_change.php
admin/includes/modules/new_attributes_include.php
admin/includes/stylesheet.css
checkout_process.php
includes/application_top.php
includes/cart_actions.php
includes/classes/product.php
includes/database_tables.php
includes/functions/sessions.php
includes/header.php
includes/modules/order_details_cart.php
includes/modules/product_info.php
lang/english/admin/english.php
lang/english/english.php
lang/english/lang_english.conf
lang/german/admin/german.php
lang/german/german.php
lang/german/lang_german.conf
templates/xtc4/module/product_info/product_info_v1.html
templates/xtc4/stylesheet.css
-------------
INSTALLATION:
-------------
1. Datenkbankerweiterungen durchführen
ALTER TABLE `admin_access` ADD `products_matrix` INT( 1 ) NOT NULL DEFAULT '0';
UPDATE `admin_access` SET `products_matrix` = '1' WHERE `customers_id` = '1';
DROP TABLE IF EXISTS `products_options_matrix`;
CREATE TABLE `products_options_matrix` (
`matrix_id` int(10) unsigned NOT NULL auto_increment,
`matrix_values_id` int(11) NOT NULL,
`products_id` int(11) NOT NULL COMMENT 'Product to which matrix is assigned',
`horiz_option` int(11) NOT NULL COMMENT 'horizontal attribute',
`vert_option` int(11) NOT NULL COMMENT 'vertical attribute',
PRIMARY KEY (`matrix_id`)
);
DROP TABLE IF EXISTS `products_options_matrix_values`;
CREATE TABLE `products_options_matrix_values` (
`matrix_value_id` int(11) NOT NULL auto_increment,
`matrix_id` int(11) NOT NULL,
`horiz_attribute` int(11) NOT NULL COMMENT 'Dies ist NICHT redundant sondern NOTWENDIG, da die Position in der Matrix nicht eindeutig festgelegt ist (bei anderer Attributesortierung z.B)',
`vert_attribute` int(11) NOT NULL,
`stock` int(11) NOT NULL,
`attributes_model` varchar(64) NOT NULL,
PRIMARY KEY (`matrix_value_id`)
);
ALTER TABLE admin_access ADD(accessories int(1) default '0');
UPDATE admin_access SET accessories = 1 WHERE customers_id = 1;
CREATE TABLE accessories (
id int(11) NOT NULL auto_increment,
head_product_id int(11) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
CREATE TABLE accessories_products (
id int(11) NOT NULL auto_increment,
accessories_id int(11) NOT NULL,
product_id int(11) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
2. new_files kopieren.
3. changed_files kopieren, oder bei nicht standard-version folgende änderungen durchführen:
-admin/includes/application_top.php
---------------------------------------------------------------------------------------------------
finde folgendes:
define('FILENAME_XSELL_GROUPS','cross_sell_groups.php');
und füge danach ein:
define('FILENAME_ACCESSORIES', 'accessories.php'); // attr_acc
define('FILENAME_PRODUCTS_MATRIX', 'products_matrix.php'); // attr_acc
define('TABLE_ACCESSORIES', 'accessories'); // attr_acc
define('TABLE_ACCESSORIES_PRODUCTS', 'accessories_products'); // attr_acc
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
require_once(DIR_FS_INC . 'xtc_db_connect.inc.php');
require_once(DIR_FS_INC . 'xtc_db_close.inc.php');
require_once(DIR_FS_INC . 'xtc_db_error.inc.php');
require_once(DIR_FS_INC . 'xtc_db_query.inc.php');
require_once(DIR_FS_INC . 'xtc_db_queryCached.inc.php');
require_once(DIR_FS_INC . 'xtc_db_perform.inc.php');
require_once(DIR_FS_INC . 'xtc_db_fetch_array.inc.php');
require_once(DIR_FS_INC . 'xtc_db_num_rows.inc.php');
require_once(DIR_FS_INC . 'xtc_db_data_seek.inc.php');
require_once(DIR_FS_INC . 'xtc_db_insert_id.inc.php');
require_once(DIR_FS_INC . 'xtc_db_free_result.inc.php');
require_once(DIR_FS_INC . 'xtc_db_fetch_fields.inc.php');
require_once(DIR_FS_INC . 'xtc_db_output.inc.php');
require_once(DIR_FS_INC . 'xtc_db_input.inc.php');
und ersetze es mit:
require_once('../'.DIR_WS_FUNCTIONS.'database.php');
//require_once(DIR_FS_INC . 'xtc_db_connect.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_close.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_error.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_query.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_queryCached.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_perform.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_fetch_array.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_num_rows.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_data_seek.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_insert_id.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_free_result.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_fetch_fields.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_output.inc.php');
//require_once(DIR_FS_INC . 'xtc_db_input.inc.php');
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
xtc_db_connect() or die('Unable to connect to database server!');
und ersetze es mit:
require_once (DIR_FS_CATALOG.'imedes_library/db_connect_alt_admin.php');
db_connect_alt() or die('Unable to connect to database server!');
global $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE=ADODB_FETCH_ASSOC;
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-admin/includes/column_left.php
---------------------------------------------------------------------------------------------------
finde folgendes:
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['products_attributes'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_ATTRIBUTES . '</a><br>';
und füge danach ein:
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['products_matrix'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_PRODUCTS_MATRIX, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . "Attribut-Matrix" . '</a><br>'; // attr_acc
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['accessories'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_ACCESSORIES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ACCESSORIES . '</a><br>'; // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-admin/includes/functions/sessions.php
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
function _sess_write($key, $val) {
global $SESS_LIFE;
und füge danach ein:
if(!is_object($db)){// Vermutlich wird das $db objekt gelöscht, bevor die Session geschrieben wird
global$db;
require_once (DIR_FS_CATALOG.'imedes_library/db_connect_alt_admin.php');
db_connect_alt() or die('Unable to connect to database server!');
$db->Execute("SET NAMES '".$_SESSION['language_charset']."'");
$db->Execute("SET CHARACTER_SET_CLIENT=".$_SESSION['language_charset']);
$db->Execute("SET CHARACTER_SET_RESULTS=".$_SESSION['language_charset']);
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-admin/includes/modules/new_attributes_change.php
---------------------------------------------------------------------------------------------------
finde folgendes:
xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id = '" . $_POST['current_product_id'] . "'" );
und ersetze es mit:
// attr_acc beginn ---------------------
//xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id = '" . $_POST['current_product_id'] . "'" );
$all_ids = array();
$tmpquery = "SELECT options_id, options_values_id FROM products_attributes WHERE products_id = " . $_POST['current_product_id'];
$tmpresult = xtc_db_query($tmpquery);
// write all options_values_id into an array for later comparisson
while($tmpdata = xtc_db_fetch_array($tmpresult))
$all_ids = array_merge($all_ids, array($tmpdata['options_values_id']));
// hack yadda yadda yadda <- improve you code instead of making funny comments!
// keep track of what is to be saved
$saved_ids = array();
// attr_acc end ---------------------
---------------------------------------------------------------------------------------------------
finde folgendes:
$value_stock = $_POST[$cv_id . '_stock'];
$value_weight = $_POST[$cv_id . '_weight'];
und füge danach ein:
if($value_stock < 0 || $value_stock == null) // attr_acc
$value_stock = 0;
// attr_acc beginn ----------------------------------
// xtc_db_query("INSERT INTO ".TABLE_PRODUCTS_ATTRIBUTES." (products_id, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."')") or die(mysql_error());
// see if this option already exists...
$tmpquery = "SELECT * FROM products_attributes WHERE products_id = " . $_POST['current_product_id'] .
" AND options_id = " . $optionsID . " AND options_values_id = " . $_POST['optionValues'][$i] .
" LIMIT 1";
$tmpresult = xtc_db_query($tmpquery);
// ...and if it does, just update the set
if(xtc_db_num_rows($tmpresult) > 0){
$tmpquery = "UPDATE ".TABLE_PRODUCTS_ATTRIBUTES." SET " .
" products_id = " . $_POST['current_product_id'] . "," .
" options_id = " . $optionsID . "," .
" options_values_id = " . $_POST['optionValues'][$i] . "," .
" options_values_price = " . $value_price . "," .
" price_prefix ='" . $value_prefix . "'," .
" attributes_model='" . $value_model. "'," .
" attributes_stock='" . $value_stock . "'," .
" options_values_weight='" . $value_weight . "'," .
" weight_prefix ='" . $value_weight_prefix . "'," .
" sortorder='" . $value_sortorder . "'" .
//, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."') " .
" WHERE products_id = " . $_POST['current_product_id'] .
" AND options_id = " . $optionsID .
" AND options_values_id = " . $_POST['optionValues'][$i] .
" LIMIT 1";
xtc_db_query($tmpquery);
}
// else insert new set
else{
$tmpquery = "INSERT INTO products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."') ";
xtc_db_query($tmpquery);
}
---------------------------------------------------------------------------------------------------
finde folgendes:
xtc_db_query("INSERT INTO ".TABLE_PRODUCTS_ATTRIBUTES." (products_id, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."')") or die(mysql_error());
und ersetze es mit:
$saved_ids = array_merge($saved_ids, array($_POST['optionValues'][$i]));
---------------------------------------------------------------------------------------------------
finde folgendes:
?>
und füge davor ein:
// attr_acc beginn ----------------------------------
// we delete every attrib not checked
foreach($all_ids as $id){
if(!in_array($id, $saved_ids)){
$tmpquery = "DELETE FROM " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE products_id = " .
$_POST['current_product_id'] . " AND options_values_id = " . $id . " LIMIT 1";
xtc_db_query($tmpquery);
}
}
// attr_acc end --------------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-admin/includes/modules/new_attributes_include.php
---------------------------------------------------------------------------------------------------
finde folgendes:
echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_stock\" value=\"" . $attribute_value_stock . "\" size=\"4\"></TD>";
und ersetze es mit:
// echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_stock\" value=\"" . $attribute_value_stock . "\" size=\"4\"></TD>";
//TBEGIN ProductMatrix Module attr_acc
echo "<TD class=\"main\" align=\"left\">";
require_once(DIR_WS_MODULES . "product_matrix_functions.php");
if(!hasProductMatrix($_POST['current_product_id'])){
echo "<input type=\"text\" name=\"" . $current_value_id . "_stock\" value=\"" . $attribute_value_stock . "\" size=\"4\">";
}
else{
echo "Matrix";
}
echo "</TD>";
// TEND ProductMatrix Module attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-admin/includes/stylesheet.css
---------------------------------------------------------------------------------------------------
am Ende einfügen:
/* attr_acc */
.access_step_cc {background-color:#dddddd; padding-left:5px; padding-right:10px;}
.access_step_c2 {padding-left:5px; padding-right:10px;}
.dataTableContentRow_acc {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
vertical-align: top;
border-bottom: 1px dashed #cccccc;
padding:5px;
}
.mouseOut {
border:1px solid #CCCCCC;
}
.mouseIn {
border:1px solid #999999;
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-checkout_process.php
---------------------------------------------------------------------------------------------------
finde folgnedes:
$attributes_values = xtc_db_fetch_array($attributes);
und füge danach ein:
// TBEGIN products_matrix module // AB hier ist neu attr_acc ----------------------
if(sizeof($order->products[$i]['attributes']) >= 2 && !$order->products[$i]['checked_out']){
$option1 = $order->products[$i]['attributes'][0]['option_id'];
$value1 = $order->products[$i]['attributes'][0]['value_id'];
$option2 = $order->products[$i]['attributes'][1]['option_id'];
$value2 = $order->products[$i]['attributes'][1]['value_id'];
$query = "SELECT matrix_id FROM products_options_matrix WHERE (horiz_option = $option1 AND vert_option = $option2) " . " OR (horiz_option = $option2 AND vert_option = $option1) AND products_id = " . xtc_get_prid($order->products[$i]['id']) . " LIMIT 1";
$result = xtc_db_query($query);
if(xtc_db_num_rows($result) > 0){
$tmpdata =xtc_db_fetch_array($result); $matrix_id = $tmpdata['matrix_id'];
// it was a matrix-product, update stock
$query = "SELECT products_attributes_id FROM products_attributes WHERE options_id = $option1 AND options_values_id = $value1 LIMIT 1";
$result = xtc_db_query($query);
$tmpdata = xtc_db_fetch_array($result);
$id1 = $tmpdata['products_attributes_id'];
$query = "SELECT products_attributes_id FROM products_attributes WHERE options_id = $option2 AND options_values_id = $value2 LIMIT 1";
$result = xtc_db_query($query);
$tmpdata = xtc_db_fetch_array($result);
$id2 = $tmpdata['products_attributes_id'];
// update stock
$query= "UPDATE products_options_matrix_values SET stock = stock - " .$order->products[$i]['qty'] ." WHERE (horiz_attribute = $id1 AND vert_attribute = $id2) "." OR (horiz_attribute = $id2 AND vert_attribute = $id1) AND matrix_id = $matrix_id ";
xtc_db_query($query);
$order->products[$i]['checked_out'] = true;
}
}
// TEND products_matrix module attr_acc -------------------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/application_top.php
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
require_once (DIR_FS_INC.'xtc_db_connect.inc.php');
require_once (DIR_FS_INC.'xtc_db_close.inc.php');
require_once (DIR_FS_INC.'xtc_db_error.inc.php');
require_once (DIR_FS_INC.'xtc_db_perform.inc.php');
require_once (DIR_FS_INC.'xtc_db_query.inc.php');
require_once (DIR_FS_INC.'xtc_db_queryCached.inc.php');
require_once (DIR_FS_INC.'xtc_db_fetch_array.inc.php');
require_once (DIR_FS_INC.'xtc_db_num_rows.inc.php');
require_once (DIR_FS_INC.'xtc_db_data_seek.inc.php');
require_once (DIR_FS_INC.'xtc_db_insert_id.inc.php');
require_once (DIR_FS_INC.'xtc_db_free_result.inc.php');
require_once (DIR_FS_INC.'xtc_db_fetch_fields.inc.php');
require_once (DIR_FS_INC.'xtc_db_output.inc.php');
require_once (DIR_FS_INC.'xtc_db_input.inc.php');
und ersetze es mit.
require_once(DIR_WS_FUNCTIONS.'database.php');
// require_once (DIR_FS_INC.'xtc_db_connect.inc.php');
// require_once (DIR_FS_INC.'xtc_db_close.inc.php');
// require_once (DIR_FS_INC.'xtc_db_error.inc.php');
// require_once (DIR_FS_INC.'xtc_db_perform.inc.php');
// require_once (DIR_FS_INC.'xtc_db_query.inc.php');
// require_once (DIR_FS_INC.'xtc_db_queryCached.inc.php');
// require_once (DIR_FS_INC.'xtc_db_fetch_array.inc.php');
// require_once (DIR_FS_INC.'xtc_db_num_rows.inc.php');
// require_once (DIR_FS_INC.'xtc_db_data_seek.inc.php');
// require_once (DIR_FS_INC.'xtc_db_insert_id.inc.php');
// require_once (DIR_FS_INC.'xtc_db_free_result.inc.php');
// require_once (DIR_FS_INC.'xtc_db_fetch_fields.inc.php');
// require_once (DIR_FS_INC.'xtc_db_output.inc.php');
// require_once (DIR_FS_INC.'xtc_db_input.inc.php');
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
xtc_db_connect() or die('Unable to connect to database server!');
und ersetze es mit:
require_once (DIR_FS_CATALOG.'imedes_library/db_connect_alt.php');
db_connect_alt() or die('Unable to connect to database server!');
global $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE=ADODB_FETCH_ASSOC;
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
// include the language translations
require (DIR_WS_LANGUAGES.$_SESSION['language'].'/'.$_SESSION['language'].'.php');
und füge danach ein:
$db->Execute("SET NAMES '".$_SESSION['language_charset']."'");
$db->Execute("SET CHARACTER_SET_CLIENT=".$_SESSION['language_charset']);
$db->Execute("SET CHARACTER_SET_RESULTS=".$_SESSION['language_charset']);
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/cart_actions.php
---------------------------------------------------------------------------------------------------
finde folgendes:
$old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id']));
$econda->_addProduct($_POST['products_id'], $_POST['products_qty'], $old_quantity);
}
$_SESSION['cart']->add_cart((int) $_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id'])) + xtc_remove_non_numeric($_POST['products_qty']), $_POST['id']);
}
xtc_redirect(xtc_href_link($goto, 'products_id=' . (int) $_POST['products_id'] . '&' . xtc_get_all_get_params($parameters)));
und ersetze es mit:
$old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id']));
$econda->_addProduct($_POST['products_id'], $_POST['products_qty'], $old_quantity);
}
require_once( DIR_WS_MODULES . "product_matrix_functions.php");
if(hasProductMatrix($_POST['products_id'])) {
foreach ($_POST['id'] as $k => $v) { $current_val = $v; }
foreach ($_POST['temp_id'] as $k => $v) {
list($l, $r) = explode('-', $k);
if ($r == $current_val) {
$_POST['id'][$l] = $v;
break;
}
}
unset($_POST['temp_id']);
}
$_SESSION['cart']->add_cart((int) $_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id'])) + xtc_remove_non_numeric($_POST['products_qty']), $_POST['id']);
$pids = count($_POST['products_id_acc']);
for($i=0; $i<$pids; $i++){
$attr=xtc_get_default_attributes((int)$_POST['products_id_acc'][$i]);
if ( sizeof($attr) == 0)
unset ($attr);
$_SESSION['cart']->add_cart((int)$_POST['products_id_acc'][$i], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id_acc'][$i], $attr)) + xtc_remove_non_numeric($_POST['products_qty']), $attr);
}
}
xtc_redirect(xtc_href_link($goto, 'products_id=' . (int) $_POST['products_id'] . '&' . xtc_get_all_get_params($parameters)));
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/classes/product.php
---------------------------------------------------------------------------------------------------
finde folgendes:
function buildDataArray(&$array,$image='thumbnail') {
und füge davor ein:
// attr_acc beginn ---------------------------------
function getAccessoriesCount() {
$products_accessories_query = xtDBquery("SELECT COUNT(ap.id) AS total
FROM ".TABLE_ACCESSORIES_PRODUCTS." ap, ".TABLE_ACCESSORIES." a
WHERE a.head_product_id = '".$this->pID."'
AND a.id = ap.accessories_id");
$products_accessories = xtc_db_fetch_array($products_accessories_query, true);
return $products_accessories['total'];
}
// attr_acc end ---------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/database_tables.php
---------------------------------------------------------------------------------------------------
finde fogendes:
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
und füge danach ein:
define('TABLE_ACCESSORIES', 'accessories'); // attr_acc
define('TABLE_ACCESSORIES_PRODUCTS', 'accessories_products'); // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/functions/sessions.php
---------------------------------------------------------------------------------------------------
Achtung!!!! Diese folgende Änderung ist nur notwendig, wenn Sie bisher noch KEINE Bibliothek von Imedes
erworben haben, welches unter einer Bezahllizenz steht. Falls Sie nicht sicher sind, dann schauen Sie
einfach in den Quellcode der entsprechenden Datei oder sprechen uns einfach an
finde folgendes:
function _sess_write($key, $val) {
global $SESS_LIFE;
und füge danach ein:
if(!is_object($db)){// Vermutlich wird das $db objekt gelöscht, bevor die Session geschrieben wird
global$db;
require_once (DIR_FS_CATALOG.'imedes_library/db_connect_alt.php');
db_connect_alt() or die('Unable to connect to database server!');
$db->Execute("SET NAMES '".$_SESSION['language_charset']."'");
$db->Execute("SET CHARACTER_SET_CLIENT=".$_SESSION['language_charset']);
$db->Execute("SET CHARACTER_SET_RESULTS=".$_SESSION['language_charset']);
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/header.php
---------------------------------------------------------------------------------------------------
finde folgendes:
// econda tracking
if (TRACKING_ECONDA_ACTIVE=='true') {
?>
und füge davor ein:
// attr_acc beginn ---------------------------------------------
if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
?>
<script type="text/javascript" src="includes/wz_tooltip.js"></script>
<?php
}
// attr_acc end ---------------------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/modules/order_details_cart.php
---------------------------------------------------------------------------------------------------
finde folgendes:
if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true') {
und ersetze es mit:
$attribute_stock_check = ''; // attr_acc
if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true' && !hasProductMatrix(xtc_get_prid($products[$i]['id']))) { // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/modules/product_info.php
---------------------------------------------------------------------------------------------------
finde folgendes:
require_once (DIR_FS_INC.'get_cross_sell_name.inc.php');
und füge danach ein:
require_once(DIR_WS_MODULES.'product_matrix_functions.php'); // attr_acc
---------------------------------------------------------------------------------------------------
finde folgendes:
// check if customer is allowed to add to cart
und füge davor ein:
/* ----------- original -----------------------
---------------------------------------------------------------------------------------------------
finde folgendes:
$info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART));
}
}
und füge danach ein:
*/
if ($_SESSION['customers_status']['customers_status_show_price'] != '0') {
// fsk18
if ($_SESSION['customers_status']['customers_fsk18'] == '1') {
if ($product->data['products_fsk18'] == '0') {
// attr_acc beginn -------------------------------------------
// if has a matrix we dont need a quantity button
if(!hasProductMatrix($product->data['products_id'])){
$info_smarty->assign('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'size="3"').' '.xtc_draw_hidden_field('products_id', $product->data['products_id']));
$info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART));
}
else{
// attr_acc end -------------------------------------------------
$info_smarty->assign('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'size="3" id="products_qty"').' '.xtc_draw_hidden_field('products_id', $product->data['products_id']));
$info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'onclick="return check_qty()"'));
}
}
} else {
// if has a matrix we dont need a quantity button
// attr_acc beginn -------------------------------------------
if(!hasProductMatrix($product->data['products_id'])){
$info_smarty->assign('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'size="3"').' '.xtc_draw_hidden_field('products_id', $product->data['products_id']));
$info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART));
} else {
// attr_acc end -------------------------------------------------
$info_smarty->assign('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'size="3" id="products_qty"').' '.xtc_draw_hidden_field('products_id', $product->data['products_id']));
$info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'onclick="return check_qty()"'));
}
}
}
---------------------------------------------------------------------------------------------------
finde folgendes:
include (DIR_WS_MODULES.'product_attributes.php');
include (DIR_WS_MODULES.'product_reviews.php');
und ersetze es mit:
// attr_acc beginn -----------------------------------------------
// include (DIR_WS_MODULES.'product_attributes.php');
if(hasProductMatrix($product->pID))
include (DIR_WS_MODULES.'product_matrix.php');
else
// load default xt:C attribute handling
include (DIR_WS_MODULES.'product_attributes.php');
// attr_acc end -----------------------------------------------------
include (DIR_WS_MODULES.'product_reviews.php');
include (DIR_WS_MODULES.'product_accessories.php'); // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/english/admin/english.php
---------------------------------------------------------------------------------------------------
finde folgendes:
define('BOX_ORDERS_XSELL_GROUP','Cross-sell groups');
und füge danach ein:
define('BOX_ACCESSORIES', 'Accessories'); // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/english/english.php
---------------------------------------------------------------------------------------------------
finde folgendes:
?>
und füge davor ein:
// attr_acc
define('MATRIX_OVER_TEXT','Move mousecursor here to show stock');
define('MATRIX_STOCK_TEXT','Stock: ');
define('MATRIX_TEXT_SELECT', 'please choose');
define('MATRIX_TEXT_STOCK', 'in stock');
define('MATRIX_TEXT_CHOOSE', 'Please select ');
define('MATRIX_TEXT_MIN', 'The minimum amount is 1');
define('MATRIX_TEXT_MAX1', 'You can max buy ');
define('MATRIX_TEXT_MAX2', '');
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/english/lang_english.conf
---------------------------------------------------------------------------------------------------
finde folgendes:
model = 'Product No.:'
print = 'Print product data sheet'
text_shippingtime = 'Shipping time:'
und füge danach ein:
text_accessories = 'To this article we have suitable Accessories'
text_accessories_info = 'Falls Sie einen oder mehr Zubehörartikel mit einkaufen möchten dann brauchen Sie nur die Checkbox des jeweiligen Zubehörartikels auszuwählen.'
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/german/admin/german.php
---------------------------------------------------------------------------------------------------
finde folgendes:
define('BOX_ORDERS_XSELL_GROUP','Cross-Marketing Gruppen');
und füge danach ein:
define('BOX_ACCESSORIES', 'Zubehör'); // attr_acc
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/german/german.php
---------------------------------------------------------------------------------------------------
finde folgendes:
?>
und füge davor ein:
// attr_acc
define('MATRIX_OVER_TEXT','Überfahren Sie das jeweilige Eingabefeld mit dem Maus Cursor, um den aktuellen Lagerbestand zu erfahren.');
define('MATRIX_STOCK_TEXT','Lagerbestand: ');
define('MATRIX_TEXT_SELECT', 'Bitte wählen');
define('MATRIX_TEXT_STOCK', 'auf Lager');
define('MATRIX_TEXT_CHOOSE', 'Bitte wählen Sie erst');
define('MATRIX_TEXT_MIN', 'Die Mindestanzahl ist 1');
define('MATRIX_TEXT_MAX1', 'Sie können maximal');
define('MATRIX_TEXT_MAX2', 'kaufen');
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/german/lang_german.conf
---------------------------------------------------------------------------------------------------
finde folgendes:
model = 'Art.Nr.:'
print = 'Artikeldatenblatt drucken'
text_shippingtime = 'Lieferzeit:'
und füge danach ein:
text_accessories = 'Zu diesem Artikel haben wir passendes Zubehör'
text_accessories_info = 'Falls Sie einen oder mehr Zubehörartikel mit einkaufen möchten dann brauchen Sie nur die Checkbox des jeweiligen Zubehörartikels auszuwählen.'
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-templates/xtc4/module/product_info/product_info_v1.html
---------------------------------------------------------------------------------------------------
Finde folgendes:
<br />{if $MODULE_product_options !=''}{$MODULE_product_options}<br />{/if}
und füge danach an:
{if $MODULE_product_matrix !=''}{$MODULE_product_matrix}<br>{/if} <!-- attr_acc -->
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-templates/xtc4/stylesheet.css
---------------------------------------------------------------------------------------------------
am Ende einfügen:
/* start product matrix attr_acc */
table.product_matrix {
border:1px solid #666666;
}
div.horiz_option {
border-bottom: 1px solid #666666;
}
td.attributeName {
border-left:1px solid #666666;
background-color:#CCCCCC;
}
td.attributeName2 {
border-top:1px solid #666666;
background-color:#CCCCCC;
}
td.stock {
border-top:1px solid #666666;
border-left:1px solid #666666;
}
/* end product matrix attr_acc */
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
|