|
ECB SEO SHOP SOFTWARE - IMEDES SOFTWARE DOWNLOADS
*****************************************
* INSTALLATION-GUIDE *
* Freundschaftwerbung *
* *
*****************************************
* @package freundschaftwerbung *
*****************************************
--------------
NEW FILES:
--------------
-admin/stats_invitations.php
-includes/functions/database.php
-includes/modules/order_total/ot_inviter_discount.php
-lang/english/admin/stats_invitations.php
-lang/english/modules/order_total/ot_inviter_discount.php
-lang/german/admin/stats_invitations.php
-lang/german/modules/order_total/ot_inviter_discount.php
-admin/mail/english/inviter_notification.html
-admin/mail/english/inviter_notification.txt
-admin/mail/german/inviter_notification.html
-admin/mail/german/inviter_notification.txt
-templates/xtc4/mail/english/tell_a_friend.html
-templates/xtc4/mail/english/tell_a_friend.txt
-templates/xtc4/mail/german/tell_a_friend.html
-templates/xtc4/mail/german/tell_a_friend.txt
-templates/xtc4/module/account_invitations.html
-templates/xtc4/module/account_tellafriend.html
-account_invitations.php
-account_tellafriend.php
--------------
CHANGED FILES:
--------------
-admin/includes/application_top.php
-admin/includes/column_left.php
-admin/orders.php
-includes/application_top.php
-includes/classes/order.php
-includes/functions/sessions.php
-includes/modules/order_total/ot_subtotal_no_tax.php
-includes/database_tables.php
-includes/filenames.php
-includes/header.php.php
-lang/english/admin/configuration.php
-lang/english/admin/english.php
-lang/english/admin/orders.php
-lang/english/english.php
-lang/english/lang_english.conf
-lang/german/admin/configuration.php
-lang/german/admin/german.php
-lang/german/admin/orders.php
-lang/german/german.php
-lang/german/lang_german.conf
-templates/xtc4/module/account.html
-templates/xtc4/module/create_account.html
-account.php
-checkout_process.php
-create_account.php
-------------
FEATURE-LIST:
-------------
-------------
INSTALLATION:
-------------
1. Datenkbankerweiterungen durchführen:
ALTER TABLE admin_access ADD stats_invitations INT( 1 ) DEFAULT '0' NOT NULL ;
UPDATE admin_access SET stats_invitations = '1' WHERE customers_id = '1' LIMIT 1 ;
UPDATE admin_access SET stats_invitations = '1' WHERE customers_id = 'groups' LIMIT 1 ;
UPDATE configuration SET configuration_value = 'ot_subtotal.php;ot_discount.php;ot_inviter_discount.php;ot_shipping.php;ot_subtotal_no_tax.php;ot_tax.php;ot_total.php' WHERE configuration_key = 'MODULE_ORDER_TOTAL_INSTALLED';
INSERT INTO `configuration` (`configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('TELL_A_FRIEND_AMOUNT_MINIMUM', '50', 5, 8, NULL, '0000-00-00 00:00:00', NULL, NULL);
INSERT INTO `configuration` (`configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('TELL_A_FRIEND_DISCOUNT', '0.00', 5, 9, NULL, '0000-00-00 00:00:00', NULL, NULL);
INSERT INTO `configuration` (`configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('TELL_A_FRIEND_VALUE', '5', 5, 9, NULL, '0000-00-00 00:00:00', NULL, NULL);
INSERT INTO `configuration` (`configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('MODULE_ORDER_TOTAL_INVITER_DISCOUNT_STATUS', 'true', 6, 1, NULL, '', NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO `configuration` (`configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('MODULE_ORDER_TOTAL_INVITER_DISCOUNT_SORT_ORDER', '25', 6, 2, NULL, '', NULL, NULL);
CREATE TABLE `invitations` (
`invitation_id` int(11) NOT NULL auto_increment,
`invitation_code` varchar(10) default NULL,
`inviter_id` int(11) NOT NULL,
`invitee_gender` varchar(1) default NULL,
`invitee_firstname` varchar(32) NOT NULL,
`invitee_lastname` varchar(32) NOT NULL,
`invitee_email_address` varchar(96) NOT NULL,
`invitee_id` int(11) NOT NULL default '0',
`invitee_order_amount` decimal(15,4) default NULL,
`inviter_notification` int(11) default NULL,
`inviter_order_id` int(11) default NULL,
PRIMARY KEY (`invitation_id`)
);
2. New_Files / new_dirs kopieren.
3. changed_files kopieren, oder bei nicht standard-version folgende änderungen durchführen:
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-admin/includes/application_top.php
-----------------------------------------------------------------------------------
nach (zeile 138):
define('FILENAME_XSELL_GROUPS','cross_sell_groups.php');
folgendes einfügen:
define('FILENAME_STATS_INVITATIONS', 'stats_invitations.php');
-----------------------------------------------------------------------------------
nach (zeile 217):
define('TABLE_CAMPAIGNS_IP','campaigns_ip');
folgendes einfügen:
define('TABLE_INVITATIONS','invitations');
-----------------------------------------------------------------------------------
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 needed functions
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');
require_once(DIR_FS_INC . 'xtc_db_prepare_input.inc.php');
require_once(DIR_FS_INC . 'xtc_get_ip_address.inc.php');
require_once(DIR_FS_INC . 'xtc_setcookie.inc.php');
require_once(DIR_FS_INC . 'xtc_validate_email.inc.php');
require_once(DIR_FS_INC . 'xtc_not_null.inc.php');
require_once(DIR_FS_INC . 'xtc_add_tax.inc.php');
require_once(DIR_FS_INC . 'xtc_get_tax_rate.inc.php');
require_once(DIR_FS_INC . 'xtc_get_qty.inc.php');
require_once(DIR_FS_INC . 'xtc_product_link.inc.php');
require_once(DIR_FS_INC . 'xtc_cleanName.inc.php');
und ersetze es mit:
// include needed functions
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');
require_once(DIR_FS_INC . 'xtc_db_prepare_input.inc.php');
require_once(DIR_FS_INC . 'xtc_get_ip_address.inc.php');
require_once(DIR_FS_INC . 'xtc_setcookie.inc.php');
require_once(DIR_FS_INC . 'xtc_validate_email.inc.php');
require_once(DIR_FS_INC . 'xtc_not_null.inc.php');
require_once(DIR_FS_INC . 'xtc_add_tax.inc.php');
require_once(DIR_FS_INC . 'xtc_get_tax_rate.inc.php');
require_once(DIR_FS_INC . 'xtc_get_qty.inc.php');
require_once(DIR_FS_INC . 'xtc_product_link.inc.php');
require_once(DIR_FS_INC . 'xtc_cleanName.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:
// make a connection to the database... now
xtc_db_connect() or die('Unable to connect to database server!');
und ersetze es mit:
// make a connection to the database... now
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
-----------------------------------------------------------------------------------
nach (zeile 47):
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['stats_campaigns'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_CAMPAIGNS_REPORT, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CAMPAIGNS_REPORT . '</a><br>';
folgendes einfügen:
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['stats_invitations'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_STATS_INVITATIONS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_STATS_INVITATIONS . '</a><br>';
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-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 ersetze es mit:
function _sess_write($key, $val) {
global $SESS_LIFE;
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/orders.php
-----------------------------------------------------------------------------------
nach (zeile 118):
xtc_db_query("insert into ".TABLE_ORDERS_STATUS_HISTORY." (orders_id, orders_status_id, date_added, customer_notified, comments) values ('".xtc_db_input($oID)."', '".xtc_db_input($status)."', now(), '".$customer_notified."', '".xtc_db_input($comments)."')");
folgendes einfügen:
if ($status !== 1) {
$find_invitation_query = xtc_db_query("select i.invitation_id, i.invitee_id, i.inviter_id, i.inviter_notification from invitations i, ".TABLE_ORDERS." o where i.invitee_id = o.customers_id and o.orders_id = '".xtc_db_input($oID)."'");
$find_invitation = xtc_db_fetch_array($find_invitation_query);
if ($find_invitation['invitee_id']) {
$amount_invitee_query = xtc_db_query("select sum(op.final_price) as ordersum from ".TABLE_ORDERS_PRODUCTS." op, ".TABLE_ORDERS." o where o.customers_id = '".$find_invitation['invitee_id']."' and o.orders_id = op.orders_id and o.orders_status > 1");
$amount_invitee = xtc_db_fetch_array($amount_invitee_query);
$amount_invitee_update = xtc_db_query("update ".TABLE_INVITATIONS." set invitee_order_amount = '".$amount_invitee['ordersum']."' where invitation_id = ".$find_invitation['invitation_id']);
if (!$find_invitation['inviter_notification'] && $amount_invitee['ordersum'] >= TELL_A_FRIEND_AMOUNT_MINIMUM) {
$invitee_notification_update = xtc_db_query("update ".TABLE_INVITATIONS." set inviter_notification = 1 where invitation_id = ".$find_invitation['invitation_id']);
$inviter_data_sql = "select customers_gender, customers_firstname, customers_lastname, customers_email_address from ".TABLE_CUSTOMERS." where customers_id = '".$find_invitation['inviter_id']."'";
$inviter_data_query = xtc_db_query("select customers_gender, customers_firstname, customers_lastname, customers_email_address from ".TABLE_CUSTOMERS." where customers_id = '".$find_invitation['inviter_id']."'");
$inviter_data = xtc_db_fetch_array($inviter_data_query);
$inviter_firstname = $inviter_data['customers_firstname'];
$inviter_lastname = $inviter_data['customers_lastname'];
$inviter_email = $inviter_data['customers_email_address'];
$smarty->assign('language', $_SESSION['language']);
$smarty->template_dir = DIR_FS_CATALOG.'templates';
$smarty->compile_dir = DIR_FS_CATALOG.'templates_c';
$smarty->config_dir = DIR_FS_CATALOG.'lang';
$smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('INVITER_GENDER', $inviter_data['customers_gender']);
$smarty->assign('INVITER_FIRSTNAME', $inviter_data['customers_firstname']);
$smarty->assign('INVITER_LASTNAME', $inviter_data['customers_lastname']);
$smarty->assign('DISCOUNT', TELL_A_FRIEND_DISCOUNT);
$smarty->assign('DISCOUNT_VALUE', TELL_A_FRIEND_VALUE);
$inviter_notification_email_subject = sprintf(EMAIL_INVITER_NOTIFICATION_SUBJECT);
// dont allow cache
$smarty->caching = false;
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/admin/mail/'.$_SESSION['language'].'/inviter_notification.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/admin/mail/'.$_SESSION['language'].'/inviter_notification.txt');
// send mail
xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $inviter_email, $inviter_firstname.' '.$inviter_lastname, '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $inviter_notification_email_subject, $html_mail, $txt_mail);
}
}
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
/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:
// Database
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');
require_once (DIR_FS_INC.'xtc_db_prepare_input.inc.php');
require_once (DIR_FS_INC.'xtc_get_top_level_domain.inc.php');
und ersetze es mit:
// Database
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');
require_once (DIR_FS_INC.'xtc_db_prepare_input.inc.php');
require_once (DIR_FS_INC.'xtc_get_top_level_domain.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:
// make a connection to the database... now
xtc_db_connect() or die('Unable to connect to database server!');
und ersetze es mit:
// make a connection to the database... now
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 ersetze es mit:
// include the language translations
require (DIR_WS_LANGUAGES.$_SESSION['language'].'/'.$_SESSION['language'].'.php');
$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/classes/order.php
-----------------------------------------------------------------------------------
nach:
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1){
$shown_price_tax = $shown_price-($shown_price/100 * $_SESSION['customers_status']['customers_status_ot_discount']);
}
folgendes einfügen:
if (!isset($shown_price_tax)) {
$shown_price_tax = $shown_price;
}
$discount_check_query = xtc_db_query("select invitation_id from ".TABLE_INVITATIONS." where inviter_id = '".$_SESSION['customer_id']."' limit 1");
$discount_check = xtc_db_fetch_array($discount_check_query);
if ($discount_check['invitation_id'] > 0 && (TELL_A_FRIEND_DISCOUNT!='0.00' || TELL_A_FRIEND_VALUE!='0.00')) {
if(TELL_A_FRIEND_DISCOUNT!='0.00')
$shown_price_tax = $shown_price_tax - ($shown_price_tax / 100 * TELL_A_FRIEND_DISCOUNT);
if(TELL_A_FRIEND_VALUE!='0.00')
$shown_price_tax = $shown_price_tax - TELL_A_FRIEND_VALUE;
}
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] != '1' && $discount_check['invitation_id'] > 0) {
$shown_price = $shown_price_tax;
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
/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 ersetze es mit:
function _sess_write($key, $val) {
global $SESS_LIFE;
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/modules/order_total/ot_subtotal_no_tax.php
-----------------------------------------------------------------------------------
nach (zeile 42-43):
$sub_total_price = $order->info['subtotal'];
}
folgendes einfügen:
$discount_check_query = xtc_db_query("select invitation_id from ".TABLE_INVITATIONS." where inviter_id = '".$_SESSION['customer_id']."' limit 1");
$discount_check = xtc_db_fetch_array($discount_check_query);
if ($discount_check['invitation_id'] > 0 && (TELL_A_FRIEND_DISCOUNT!='0.00' || TELL_A_FRIEND_VALUE!='0.00')) {
if(TELL_A_FRIEND_DISCOUNT!='0.00')
$sub_total_price = $sub_total_price - ($sub_total_price / 100 * TELL_A_FRIEND_DISCOUNT);
if(TELL_A_FRIEND_VALUE!='0.00')
$sub_total_price = $sub_total_price - TELL_A_FRIEND_VALUE;
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-includes/database_tables.php
-----------------------------------------------------------------------------------
vor:
?>
folgendes einfügen:
define('TABLE_INVITATIONS','invitations');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-includes/filenames.php
-----------------------------------------------------------------------------------
vor:
?>
folgendes einfügen:
define('FILENAME_ACCOUNT_TELLAFRIEND', 'account_tellafriend.php');
define('FILENAME_ACCOUNT_INVITATIONS', 'account_invitations.php');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-includes/header.php
-----------------------------------------------------------------------------------
vor:
if (strstr($PHP_SELF, FILENAME_CREATE_GUEST_ACCOUNT )) {
require('includes/form_check.js.php');
}
folgendes einfügen:
if (strstr($PHP_SELF, FILENAME_ACCOUNT_TELLAFRIEND )) {
require('includes/form_check.js.php');
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/english/admin/configuration.php
-----------------------------------------------------------------------------------
nach (zeile 582):
define('DISPLAY_REVOCATION_ON_CHECKOUT_DESC','Display right of revocation on checkout_confirmation?');
folgendes einfügen:
define('TELL_A_FRIEND_AMOUNT_MINIMUM_TITLE', 'Minimum Selling:');
define('TELL_A_FRIEND_AMOUNT_MINIMUM_DESC', 'Please fill in the minimum selling to get discount');
define('TELL_A_FRIEND_DISCOUNT_TITLE', 'Discount as %:');
define('TELL_A_FRIEND_DISCOUNT_DESC', 'If you dont\'t want to use it set in on 0.00!');
define('TELL_A_FRIEND_VALUE_TITLE', 'Discount as value:');
define('TELL_A_FRIEND_VALUE_DESC', 'If you dont\'t want to use it set in on 0.00!');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/english/admin/english.php
-----------------------------------------------------------------------------------
nach (zeile 156):
define('BOX_ORDERS_XSELL_GROUP','Cross-sell groups');
folgendes einfügen:
define('BOX_STATS_INVITATIONS', 'Invitations Statistics');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/english/admin/orders.php
-----------------------------------------------------------------------------------
nach (zeile 117):
define('TEXT_VALIDATING','Not validated');
folgendes einfügen:
define('EMAIL_INVITER_NOTIFICATION_SUBJECT', 'You have a discount!');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/english/english.php
-----------------------------------------------------------------------------------
nach (zeile 138):
define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'Your passwords do not match.');
folgendes einfügen:
define('ENTRY_INVITATION_CODE_TEXT', '');
define('ENTRY_INVITATION_CODE_ERROR', 'Your invitation code is wrong');
define('ENTRY_INVITATION_ADDRESS_ERROR', 'Your Address is the same like inviter');
-----------------------------------------------------------------------------------
nach (zeile 243):
define('SUCCESS_PASSWORD_UPDATED', 'Your password has been changed successfully!');
folgendes einfügen:
define('SUCCESS_FRIEND_INVITED', 'Your Frend has been invited successfully!');
-----------------------------------------------------------------------------------
nach (zeile 322):
define('NAVBAR_TITLE_2_ACCOUNT_PASSWORD', 'Change password');
folgendes einfügen:
define('NAVBAR_TITLE_1_ACCOUNT_TELLAFRIEND', 'Your account');
define('NAVBAR_TITLE_2_ACCOUNT_TELLAFRIEND', 'Tell a friend');
define('NAVBAR_TITLE_1_ACCOUNT_INVITATIONS', 'Your account');
define('NAVBAR_TITLE_2_ACCOUNT_INVITATIONS', 'Invitations');
-----------------------------------------------------------------------------------
nach (zeile 414):
define('PERSONAL_MESSAGE', '%s says:');
folgendes einfügen:
define('EMAIL_INVITATION_SUBJECT', 'Invitation');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/english/lang_english.conf
-----------------------------------------------------------------------------------
am Ende einfügen:
[account_tellafriend]
heading_tellafriend = 'Tell a friend'
text_must = ' * necessary Information '
text_gender = 'Address: '
text_male = 'Mr.'
text_female = 'Miss/Ms./Mrs.'
text_gently_male = 'Mr.'
text_gently_female = 'Miss/Ms./Mrs.'
text_pronoun_male = 'He'
text_pronoun_female = 'She'
text_firstname = 'First name: '
text_lastname = 'Last name: '
text_email = 'e-mail address: '
entry_message = 'Message: '
[account_invitations]
heading_invitations = 'Your invitations'
text_male = 'Mr.'
text_female = 'Miss/Ms./Mrs.'
text_name = 'Invitee: '
text_status = 'Invitation status: '
text_status_unregistered = 'unregistered.'
text_status_registered = 'registered.'
text_discount_status = 'Discount state: '
text_discount_yes = 'You have the rights for the discount.'
text_discount_no = 'You don't have the rights for the discount yet.'
text_discount_use_status = 'Discount use state: '
text_discount_use_yes = 'You have used your discount.'
text_discount_use_no = 'You haven't used your discount yet.'
-----------------------------------------------------------------------------------
nach:
[create_account]
folgendes einfügen:
title_invitation_code = 'Your invitation code'
text_invitation_code = 'Your invitation code'
-----------------------------------------------------------------------------------
nach:
[account]
folgendes einfügen:
text_tellafriend = 'Tell a friend'
text_invitations = 'List of your invitations'
-lang/german/admin/configuration.php
-----------------------------------------------------------------------------------
nach (zeile 582):
define('DISPLAY_REVOCATION_ON_CHECKOUT_DESC','Widerrufrecht auf checkout_confirmation anzeigen?');
folgendes einfügen:
define('TELL_A_FRIEND_AMOUNT_MINIMUM_TITLE', 'Minimum Umsatz:');
define('TELL_A_FRIEND_AMOUNT_MINIMUM_DESC', 'Hier den Minumumsatz eintragen, ab wann der Discount greifen soll.');
define('TELL_A_FRIEND_DISCOUNT_TITLE', 'Rabatt in Prozent:');
define('TELL_A_FRIEND_DISCOUNT_DESC', 'Wenn dieser nicht genutzt werden soll bitte 0.00 einfügen!');
define('TELL_A_FRIEND_VALUE_TITLE', 'Rabattwert:');
define('TELL_A_FRIEND_VALUE_DESC', 'Wenn dieser nicht genutzt werden soll bitte 0.00 einfügen!');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/german/admin/german.php
-----------------------------------------------------------------------------------
nach (zeile 156):
define('BOX_ORDERS_XSELL_GROUP','Cross-Marketing Gruppen');
folgendes einfügen:
define('BOX_STATS_INVITATIONS', 'Werberstatistik');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/german/admin/orders.php
-----------------------------------------------------------------------------------
nach (zeile 116):
define('TEXT_VALIDATING','Nicht bestätigt');
folgendes einfügen:
define('EMAIL_INVITER_NOTIFICATION_SUBJECT', 'Sie haben ein Rabatt!');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/german/german.php
-----------------------------------------------------------------------------------
nach (zeile 138):
define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'Ihre Passwörter stimmen nicht überein.');
folgendes einfügen:
define('ENTRY_INVITATION_CODE_TEXT', '');
define('ENTRY_INVITATION_CODE_ERROR', 'Ihr Einladungscode ist ungültig');
define('ENTRY_INVITATION_ADDRESS_ERROR', 'Ihre Anschrift ist die gleiche Ihres Werbers');
-----------------------------------------------------------------------------------
nach (zeile 243):
define('SUCCESS_PASSWORD_UPDATED', 'Ihr Passwort wurde erfolgreich geändert!');
folgendes einfügen:
define('SUCCESS_FRIEND_INVITED', 'Ihr Freund wurde erfolgreich eingeladen!');
-----------------------------------------------------------------------------------
nach (zeile 322):
define('NAVBAR_TITLE_2_ACCOUNT_PASSWORD', 'Passwort ändern');
folgendes einfügen:
define('NAVBAR_TITLE_1_ACCOUNT_TELLAFRIEND', 'Ihr Konto');
define('NAVBAR_TITLE_2_ACCOUNT_TELLAFRIEND', 'Freundschaftwerbung');
define('NAVBAR_TITLE_1_ACCOUNT_INVITATIONS', 'Ihr Konto');
define('NAVBAR_TITLE_2_ACCOUNT_INVITATIONS', 'Einladungen');
-----------------------------------------------------------------------------------
nach (zeile 414):
define('PERSONAL_MESSAGE', '%s schreibt:');
folgendes einfügen:
define('EMAIL_INVITATION_SUBJECT', 'Einladung');
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-lang/german/lang_german.conf
-----------------------------------------------------------------------------------
am Ende einfügen:
[account_tellafriend]
heading_tellafriend = 'Freundschaftwerbung'
text_must = '* notwendige Informationen'
text_gender = 'Anrede:'
text_male = 'Herr'
text_female = 'Frau'
text_gently_male = 'geehrter Herr'
text_gently_female = 'geehrte Frau'
text_pronoun_male = 'Er'
text_pronoun_female = 'Sie'
text_firstname = 'Vorname:'
text_lastname = 'Nachname:'
text_email = 'eMail-Adresse:'
entry_message = 'Nachricht: '
[account_invitations]
heading_invitations = 'Ihre Einladungen'
text_male = 'Herr'
text_female = 'Frau'
text_name = 'Eingeladene: '
text_status = 'Einladungsstatus: '
text_status_unregistered = 'unregistriert.'
text_status_registered = 'registriert.'
text_discount_status = 'Rabattstatus: '
text_discount_yes = 'Sie haben die Rechte auf dem Rabatt.'
text_discount_no = 'Sie haben noch keine Rechte auf dem Rabatt.'
text_discount_use_status = 'Rabattvebrauchsstatus: '
text_discount_use_yes = 'Sie haben Ihren Rabatt schon verbraucht.'
text_discount_use_no = 'Sie haben Ihren Rabatt noch nicht verbraucht.'
-----------------------------------------------------------------------------------
nach:
[create_account]
folgendes einfügen:
title_invitation_code = 'Ihr Einladungscode'
text_invitation_code = 'Ihr Einladungscode'
-----------------------------------------------------------------------------------
nach:
[account]
folgendes einfügen:
text_tellafriend = 'Freundschaftswerbung'
text_invitations = 'Freundschaftswerbungen anzeigen'
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-templates/xtc4/module/account.html
-----------------------------------------------------------------------------------
nach (zeile 66-68):
<tr>
<td class="main"><img src="{$tpl_path}img/arrow_green.gif" alt="" /><a href="{$LINK_PASSWORD}">{#text_password#}</a></td>
</tr>
folgendes einfügen:
<tr>
<td class="main"><img src="{$tpl_path}img/arrow_green.gif" alt="" /><a href="{$LINK_TELLAFRIEND}">{#text_tellafriend#}</a></td>
</tr>
{if $LINK_INVITATIONS}
<tr>
<td class="main"><img src="{$tpl_path}img/arrow_green.gif" alt="" /><a href="{$LINK_INVITATIONS}">{#text_invitations#}</a></td>
</tr>
{/if}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-templates/xtc4/module/create_account.html
-----------------------------------------------------------------------------------
nach (zeile 152-156):
<tr>
<td class="main">{#text_confirmation#}</td>
<td class="inputRequirement">{$INPUT_CONFIRMATION}</td>
</tr>
</table>
folgendes einfügen:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main"> </td>
</tr>
<tr>
<td class="main"><strong>{#title_invitation_code#}</strong></td>
</tr>
</table>
<table class="formArea" width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="200" class="main">{#text_invitation_code#}</td>
<td class="inputRequirement">{$INPUT_INVITATION_CODE}</td>
</tr>
</table>
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-account.php
-----------------------------------------------------------------------------------
nach (zeile 86-89):
$order_content[] = array ('ORDER_ID' => $orders['orders_id'], 'ORDER_DATE' => xtc_date_short($orders['date_purchased']), 'ORDER_STATUS' => $orders['orders_status_name'], 'ORDER_TOTAL' => $orders['order_total'], 'ORDER_LINK' => xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL'), 'ORDER_BUTTON' => '<a href="'.xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL').'">'.xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW).'</a>');
}
}
folgendes einfügen:
$invitations_check_query = xtc_db_query("select count(*) as total from " . TABLE_INVITATIONS . " where inviter_id = '" . (int)$_SESSION['customer_id'] . "'");
$invitations_check = xtc_db_fetch_array($invitations_check_query);
if ($invitations_check['total'] > 0) {
$smarty->assign('LINK_INVITATIONS', xtc_href_link(FILENAME_ACCOUNT_INVITATIONS, '', 'SSL'));
}
-----------------------------------------------------------------------------------
nach (zeile 97):
$smarty->assign('LINK_ALL', xtc_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
folgendes einfügen:
$smarty->assign('LINK_TELLAFRIEND', xtc_href_link(FILENAME_ACCOUNT_TELLAFRIEND, '', 'SSL'));
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-checkout_process.php
-----------------------------------------------------------------------------------
nach (zeile 324-330):
xtc_db_query("update ".TABLE_ORDERS." set
conversion_type = '2'
where orders_id = '".$insert_id."'");
}
}
}
folgendes einfügen:
$discount_check_query = xtc_db_query("select invitation_id from ".TABLE_INVITATIONS." where inviter_id = '".$_SESSION['customer_id']."' and inviter_notification is not null and inviter_notification > 0 and (inviter_order_id is null or inviter_order_id = 0) limit 1");
$discount_check = xtc_db_fetch_array($discount_check_query);
if ($discount_check['invitation_id'] > 0 && (TELL_A_FRIEND_DISCOUNT != '0.00' || TELL_A_FRIEND_VALUE != '0.00')) {
xtc_db_query("update ".TABLE_INVITATIONS." set
inviter_order_id = '".$insert_id."'
where invitation_id = '".$discount_check['invitation_id']."'");
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-create_account.php
-----------------------------------------------------------------------------------
nach (zeile 77):
$confirmation = xtc_db_prepare_input($_POST['confirmation']);
folgendes einfügen:
$invitation_code = xtc_db_prepare_input($_POST['invitation_code']);
-----------------------------------------------------------------------------------
nach (zeile 215-216):
if (!$newsletter)
$newsletter = 0;
folgendes einfügen:
if ($invitation_code !== '') {
$invitation_check_query = xtc_db_query("select count(*) as total from ".TABLE_INVITATIONS." where invitation_code = '".$invitation_code."'");
$invitation_check = xtc_db_fetch_array($invitation_check_query);
if ($invitation_check['total'] == 0) {
$error = true;
$messageStack->add('create_account', ENTRY_INVITATION_CODE_ERROR);
}
$address_check_query = xtc_db_query("select a.entry_lastname, a.entry_street_address, a.entry_postcode from ".TABLE_ADDRESS_BOOK." a, ".TABLE_INVITATIONS." i where i.inviter_id = a.customers_id and i.invitation_code = '".$invitation_code."'");
$address_check = xtc_db_fetch_array($address_check_query);
if ($address_check['entry_lastname'] == $lastname && $address_check['entry_street_address'] == $street_address && $address_check['entry_postcode'] == $postcode) {
$error = true;
$messageStack->add('create_account', ENTRY_INVITATION_ADDRESS_ERROR);
}
}
-----------------------------------------------------------------------------------
nach (zeile 254):
xtc_db_query("insert into ".TABLE_CUSTOMERS_INFO." (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('".(int) $_SESSION['customer_id']."', '0', now())");
folgendes einfügen:
if ($invitation_code !== '') {
xtc_db_query("update ".TABLE_INVITATIONS." set invitee_id = '".$user_id."' where (invitee_id = 0 or invitee_id is null) and invitation_code = '".$invitation_code."'");
}
-----------------------------------------------------------------------------------
nach (zeile 447):
$smarty->assign('INPUT_CONFIRMATION', xtc_draw_password_fieldNote(array ('name' => 'confirmation', 'text' => ' '. (xtc_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">'.ENTRY_PASSWORD_CONFIRMATION_TEXT.'</span>' : ''))));
folgendes einfügen:
if (isset($_GET['icode']) && $_GET['icode']!='')
$smarty->assign('INPUT_INVITATION_CODE', xtc_draw_input_fieldNote(array ('name' => 'invitation_code', 'text' => ' '. (xtc_not_null(ENTRY_INVITATION_CODE_TEXT) ? '<span class="inputRequirement">'.ENTRY_INVITATION_CODE_TEXT.'</span>' : '')),$_GET['icode']));
else
$smarty->assign('INPUT_INVITATION_CODE', xtc_draw_input_fieldNote(array ('name' => 'invitation_code', 'text' => ' '. (xtc_not_null(ENTRY_INVITATION_CODE_TEXT) ? '<span class="inputRequirement">'.ENTRY_INVITATION_CODE_TEXT.'</span>' : ''))));
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
|