|
ECB SEO SHOP SOFTWARE - IMEDES SOFTWARE DOWNLOADS
*****************************************
* *
* INSTALLATION-GUIDE *
* *
*****************************************
* @package matrix_fa *
* @compatible SP2.1 *
*****************************************
--------------
NEW FILES:
--------------
admin/includes/modules/product_matrix_functions.php
admin/products_matrix.php
includes/functions/database.php
includes/modules/product_matrix.php
includes/modules/product_matrix_functions.php
includes/wz_tooltip.js
--------------
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
checkout_process.php
includes/application_top.php
includes/cart_actions.php
includes/functions/sessions.php
includes/header.php
/includes/modules/order_details_cart.php
includes/modules/product_info.php
lang/english/english.php
lang/german/german.php
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`)
);
2. new_files kopieren.
3. changed_files kopieren, oder bei nicht standard-version folgende änderungen durchführen:
-admin/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_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['categories'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CATEGORIES . '</a><br>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['new_attributes'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_NEW_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink"> -'.BOX_ATTRIBUTES_MANAGER.'</a><br>';
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>';
füge danach ein:
//TBEGIN ProductMatrix Module
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['products_matrix'] == '1')) echo '<a href="' . xtc_href_link('products_matrix.php', '', 'NONSSL') . '" class="menuBoxContentLink"> -' . "Attribut-Matrix" . '</a><br>';
//TEND ProductMatrix Module
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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 'latin1'");
$db->Execute("SET CHARACTER_SET_CLIENT=latin1");
$db->Execute("SET CHARACTER_SET_RESULTS=latin1");
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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:
// 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();
---------------------------------------------------------------------------------------------------
finde folgendes:
$value_model = $_POST[$cv_id . '_model'];
$value_stock = $_POST[$cv_id . '_stock'];
$value_weight = $_POST[$cv_id . '_weight'];
füge danach ein:
if($value_stock < 0 || $value_stock == null)
$value_stock = 0;
---------------------------------------------------------------------------------------------------
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:
// 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);
}
$saved_ids = array_merge($saved_ids, array($_POST['optionValues'][$i]));
---------------------------------------------------------------------------------------------------
finde folgendes:
xtc_db_query("INSERT INTO ".TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD." (products_attributes_id, products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount) VALUES ('" . $products_attributes_id . "', '" . $value_download_file . "', '" . $value_download_expire . "', '" . $value_download_count . "')") or die(mysql_error());
}
}
danach einfügen:
// 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);
}
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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:
//TBEGIN ProductMatrix Module
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
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
/checkout_process.php
--------------------------------
finde folgendes:
$attributes_values = xtc_db_fetch_array($attributes);
und füge danach ein:
// TBEGIN products_matrix module // AB hier ist neu
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
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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 'latin1'");
$db->Execute("SET CHARACTER_SET_CLIENT=latin1");
$db->Execute("SET CHARACTER_SET_RESULTS=latin1");
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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);
}
danach einfügen:
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']);
}
/*
echo '<pre>';
var_dump($_POST);
echo '</pre>';
exit;
*/
/*
foreach ($_POST['id'] as $k => $v) {
if (strpos($k, '-') !== FALSE) {
if (!empty($v)) {
list($needed,) = explode('-', $k);
$_POST['id'][$needed] = $v;
}
unset($_POST['id'][$k]);
}
}
*/
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-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 'latin1'");
$db->Execute("SET CHARACTER_SET_CLIENT=latin1");
$db->Execute("SET CHARACTER_SET_RESULTS=latin1");
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/header.php
---------------------------------------------------------------------------------------------------
finde folgendes:
} else {
echo '<body>';
}
danach einfügen:
if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
?>
<script type="text/javascript" src="includes/wz_tooltip.js"></script>
<?php
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
/includes/modules/order_details_cart.php
--------------------------------
finde folgendes:
require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');
und füge danach ein:
require_once(DIR_WS_MODULES.'product_matrix_functions.php');
--------------------------------
finde folgendes:
if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true') {
und ersetze es mit:
$attribute_stock_check = '';
if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true' && !hasProductMatrix(xtc_get_prid($products[$i]['id']))) {
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-includes/modules/product_info.php
---------------------------------------------------------------------------------------------------
finde folgendes:
require_once (DIR_FS_INC.'xtc_get_products_mo_images.inc.php');
require_once (DIR_FS_INC.'xtc_get_vpe_name.inc.php');
require_once (DIR_FS_INC.'get_cross_sell_name.inc.php');
danach einfügen:
require_once(DIR_WS_MODULES.'product_matrix_functions.php');
---------------------------------------------------------------------------------------------------
finde folgendes:
if ($_SESSION['customers_status']['customers_fsk18'] == '1') {
if ($product->data['products_fsk18'] == '0') {
danach einfügen:
// if has a matrix we dont need a quantity button
if(!hasProductMatrix($product->data['products_id'])){
---------------------------------------------------------------------------------------------------
finde folgendes:
$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));
}
danach einfügen:
else{
$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:
} else {
danach einfügen:
// if has a matrix we dont need a quantity button
if(!hasProductMatrix($product->data['products_id'])){
---------------------------------------------------------------------------------------------------
finde folgendes:
$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));
}
danach einfügen:
else{
$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:
$info_smarty->assign('PRODUCTS_DISCOUNT', $discount.'%');
}
danach einfügen:
// TBEGIN ProductMatrix Module
require_once(DIR_WS_MODULES.'product_matrix_functions.php');
if(hasProductMatrix($product->pID))
include (DIR_WS_MODULES.'product_matrix.php');
else
// load default xt:C attribute handling
if(hasProductMatrix($product->pID))
include (DIR_WS_MODULES.'product_matrix.php');
else
// load default xt:C attribute handling
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-lang/english/english.php
---------------------------------------------------------------------------------------------------
finde folgendes:
?>
davor einfügen:
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/german/german.php
---------------------------------------------------------------------------------------------------
finde folgendes:
?>
davor einfügen:
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');
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-templates/xtc4/module/product_info/product_info_v1.html
---------------------------------------------------------------------------------------------------
finde folgendes:
<br />{if $MODULE_product_options !=''}{$MODULE_product_options}<br />{/if}
danach einfügen:
{if $MODULE_product_matrix !=''}{$MODULE_product_matrix}<br>{/if}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-templates/xtc4/stylesheet.css
---------------------------------------------------------------------------------------------------
am Ende einfügen:
/* start product matrix */
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 */
|