PDA

Shop Support News Archive - Shopbetreiber News -> Forum : xt eCommerce Templates Module SEO Support: GPL Shop: Nach Login Direkt In Den Warenkorb


Pixeler
30.04.2006, 10:19
Hallo,
vermutlich ist es nur eine Kleinigkeit, aber trotz ausführlicher Suche in diversen Foren habe ich diesbezüglich nichts gefunden ( odser übersehen :( )

- Gast legt Artikel in den Warenkorb und möchte zur Kasse gehen
- Er bekommt nun angezeigt, das er noch nicht eingeloggt ist
- Er loggt sich ein und springt auf die Startseite

Ich möchte aber nun, das er nach der Anmeldung direkt in den Warenkorb kommt


Wie kann ich das realisieren ?


Schon mal Danke für die Antwort(en)


Pixeler

HarryBoo
30.04.2006, 10:30
Hallo Pixeler,

das ist doch an und für sich Standard.

Habe es gerade nochmal getestet. Ich lande nach der Anmeldung im Warenkorb.

Welche Version hast du?
Hast du Änderungen vorgenommen welche evtl. dafür verantwortlich sein könnten?

Gruß HarryBoo

Pixeler
30.04.2006, 12:14
Hallo HarryBoo,
das hätte ich evtl. dazuschreiben sollen :D :


Credits
XT Credits

XT-Commerce Version - XT-C v1.0 Beta2
Release Datum: 1. April 2004

Ja ich weiß, ist eine "etwas" ältere Version, aber aktuell kann diese nicht geändert werden.

Pixeler



''>ZITAT(HarryBoo @ Apr 30 2006, 10:30) 4130
Hallo Pixeler,

das ist doch an und für sich Standard.

Habe es gerade nochmal getestet. Ich lande nach der Anmeldung im Warenkorb.

Welche Version hast du?
Hast du Änderungen vorgenommen welche evtl. dafür verantwortlich sein könnten?

Gruß HarryBoo
[/b]

bluemoon
30.04.2006, 12:34
Also ehrlich gesagt, würde ich mir um ein Update Gedanken machen ...

TechWay
30.04.2006, 12:59
Hi,

poste mal deine login.php aus dem Hauptverzeichnis... da müsste man ansetzen...

Gruß
TechWay

Gast
30.04.2006, 13:34
Hallo TechWay,
das steht außer Frage und wird auch in ca. einem Monat nachgeholt. Aktuell geht dies aus internen Gründen nicht. Die grundsätzliche Frage wäre, in welcher Datei ich den Aufruf der content (index) nach dem Login finde und ich welchen Aufruf dies geändert werden muß....

Pixeler


''>ZITAT(TechWay @ Apr 30 2006, 11:59) 4143
Hi,

poste mal deine login.php aus dem Hauptverzeichnis... da müsste man ansetzen...

Gruß
TechWay
[/b]

TechWay
30.04.2006, 13:37
ich habe dir doch gesagt, es müsste in der login.php geändert werden!! <_<

ich hab die Beta 2 nicht, deswegen kann ich dir auch nicht genau sagen wo du was ändern musst, deshalb habe ich gemeint du sollst die Datei mal hier posten :lol:

Gruß

Pixeler
30.04.2006, 13:41
ups :( , da ist ein bisschen was durcheinander gekommen, mein Posting ( aus Versehen als gast ) , war @bluemoon gernichtet..... nicht wie ich irrtümlich schrieb an TechWay.

Hallo TechWay,
hier die login.php :

include( 'includes/application_top.php');

// create smarty elements

$smarty = new Smarty;

// include boxes

require(DIR_FS_CATALOG .'templates/'.CURRENT_TEMPLATE. '/source/boxes.php');



// include needed functions

require_once(DIR_FS_INC . 'xtc_draw_password_field.inc.php');

require_once(DIR_FS_INC . 'xtc_validate_password.inc.php');

require_once(DIR_FS_INC . 'xtc_array_to_string.inc.php');

require_once(DIR_FS_INC . 'xtc_image_button.inc.php');



// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

if ($session_started == false) {

xtc_redirect(xtc_href_link(FILENAME_COOKIE_USAGE)) ;

}



if (isset($_GET['action']) && ($_GET['action'] == 'process')) {

$email_address = xtc_db_prepare_input($_POST['email_address']);

$password = xtc_db_prepare_input($_POST['password']);



// Check if email exists

$check_customer_query = xtc_db_query("select customers_id, customers_firstname,customers_lastname, customers_gender, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . xtc_db_input($email_address) . "'");

if (!xtc_db_num_rows($check_customer_query)) {

$_GET['login'] = 'fail';

$info_message=TEXT_NO_EMAIL_ADDRESS_FOUND;

} else {

$check_customer = xtc_db_fetch_array($check_customer_query);

// Check that password is good

if (!xtc_validate_password($password, $check_customer['customers_password'])) {

$_GET['login'] = 'fail';

$info_message=TEXT_LOGIN_ERROR;

} else {

if (SESSION_RECREATE == 'True') {

xtc_session_recreate();

}



$check_country_query = xtc_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . $check_customer['customers_default_address_id'] . "'");

$check_country = xtc_db_fetch_array($check_country_query);



$_SESSION['customer_gender'] = $check_customer['customers_gender'];

$_SESSION['customer_last_name'] = $check_customer['customers_lastname'];

$_SESSION['customer_id'] = $check_customer['customers_id'];

$_SESSION['customer_default_address_id'] = $check_customer['customers_default_address_id'];

$_SESSION['customer_first_name'] = $check_customer['customers_firstname'];

$_SESSION['customer_country_id'] = $check_country['entry_country_id'];

$_SESSION['customer_zone_id'] = $check_country['entry_zone_id'];



$date_now = date('Ymd');

xtc_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$_SESSION['customer_id'] . "'");



// restore cart contents

$_SESSION['cart']->restore_contents();



if (sizeof($_SESSION['navigation']->snapshot) > 0) {

$origin_href = xtc_href_link($_SESSION['navigation']->snapshot['page'], xtc_array_to_string($_SESSION['navigation']->snapshot['get'], array(xtc_session_name())), $_SESSION['navigation']->snapshot['mode']);

$_SESSION['navigation']->clear_snapshot();

xtc_redirect($origin_href);

} else {

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

}

}

}

}







$breadcrumb->add(NAVBAR_TITLE_LOGIN, xtc_href_link(FILENAME_LOGIN, '', 'SSL'));

require(DIR_WS_INCLUDES . 'header.php');



if ($_GET['info_message']) $info_message=$_GET['info_message'];

$smarty->assign('info_message',$info_message);

$smarty->assign('account_option',ACCOUNT_OPTIONS);

$smarty->assign('BUTTON_NEW_ACCOUNT','' . xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ' (' . xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . ')');

$smarty->assign('BUTTON_LOGIN',xtc_image_submit('button_log in.gif', IMAGE_BUTTON_LOGIN));

$smarty->assign('BUTTON_GUEST','' . xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ' (' . xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL') . ')');

$smarty->assign('FORM_ACTION',xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));

$smarty->assign('INPUT_MAIL',xtc_draw_input_field('email_ad dress'));

$smarty->assign('INPUT_PASSWORD',xtc_draw_password_field('p assword'));

$smarty->assign('LINK_LOST_PASSWORD',xtc_href_link(FILENAME _PASSWORD_FORGOTTEN, '', 'SSL'));







$smarty->assign('language', $_SESSION['language']);

$smarty->caching = 0;

$main_content=$smarty->fetch(CURRENT_TEMPLATE . '/module/login.html');

$smarty->assign('main_content',$main_content);



$smarty->assign('language', $_SESSION['language']);

$smarty->caching = 0;

if (!defined(RM)) $smarty->load_filter('output', 'note');

$smarty->display(CURRENT_TEMPLATE . '/index.html');


Pixeler

TechWay
30.04.2006, 13:48
Probier mal dies:


<?
include( 'includes/application_top.php');
// create smarty elements
$smarty = new Smarty;
// include boxes
require(DIR_FS_CATALOG .'templates/'.CURRENT_TEMPLATE. '/source/boxes.php');

// include needed functions
require_once(DIR_FS_INC . 'xtc_draw_password_field.inc.php');
require_once(DIR_FS_INC . 'xtc_validate_password.inc.php');
require_once(DIR_FS_INC . 'xtc_array_to_string.inc.php');
require_once(DIR_FS_INC . 'xtc_image_button.inc.php');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
xtc_redirect(xtc_href_link(FILENAME_COOKIE_USAGE)) ;
}

if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
$email_address = xtc_db_prepare_input($_POST['email_address']);
$password = xtc_db_prepare_input($_POST['password']);

// Check if email exists
$check_customer_query = xtc_db_query("select customers_id, customers_firstname,customers_lastname, customers_gender, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . xtc_db_input($email_address) . "'");
if (!xtc_db_num_rows($check_customer_query)) {
$_GET['login'] = 'fail';
$info_message=TEXT_NO_EMAIL_ADDRESS_FOUND;
} else {
$check_customer = xtc_db_fetch_array($check_customer_query);
// Check that password is good
if (!xtc_validate_password($password, $check_customer['customers_password'])) {
****$_GET['login'] = 'fail';
****$info_message=TEXT_LOGIN_ERROR;
} else {
****if (SESSION_RECREATE == 'True') {
********xtc_session_recreate();
****}

****$check_country_query = xtc_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . $check_customer['customers_default_address_id'] . "'");
****$check_country = xtc_db_fetch_array($check_country_query);
****
****$_SESSION['customer_gender'] = $check_customer['customers_gender'];
****$_SESSION['customer_last_name'] = $check_customer['customers_lastname'];
****$_SESSION['customer_id'] = $check_customer['customers_id'];
****$_SESSION['customer_default_address_id'] = $check_customer['customers_default_address_id'];
****$_SESSION['customer_first_name'] = $check_customer['customers_firstname'];
****$_SESSION['customer_country_id'] = $check_country['entry_country_id'];
****$_SESSION['customer_zone_id'] = $check_country['entry_zone_id'];
****
****$date_now = date('Ymd');
****xtc_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$_SESSION['customer_id'] . "'");
****
****// restore cart contents
****$_SESSION['cart']->restore_contents();
****
****if ($_SESSION['cart']->count_contents() > 0) {
********xtc_redirect(xtc_href_link(FILENAME_SHOPPI NG_CART, '', 'SSL'));
****} else {
********xtc_redirect(xtc_href_link(FILENAME_DEFAUL T));
****}
}
}
}

$breadcrumb->add(NAVBAR_TITLE_LOGIN, xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
require(DIR_WS_INCLUDES . 'header.php');

if ($_GET['info_message']) $info_message=$_GET['info_message'];
$smarty->assign('info_message',$info_message);
$smarty->assign('account_option',ACCOUNT_OPTIONS);
$smarty->assign('BUTTON_NEW_ACCOUNT','' . xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ' (' . xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . ')');
$smarty->assign('BUTTON_LOGIN',xtc_image_submit('button_log in.gif', IMAGE_BUTTON_LOGIN));
$smarty->assign('BUTTON_GUEST','' . xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ' (' . xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL') . ')');
$smarty->assign('FORM_ACTION',xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
$smarty->assign('INPUT_MAIL',xtc_draw_input_field('email_ad dress'));
$smarty->assign('INPUT_PASSWORD',xtc_draw_password_field('p assword'));
$smarty->assign('LINK_LOST_PASSWORD',xtc_href_link(FILENAME _PASSWORD_FORGOTTEN, '', 'SSL'));
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$main_content=$smarty->fetch(CURRENT_TEMPLATE . '/module/login.html');
$smarty->assign('main_content',$main_content);

$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
if (!defined(RM)) $smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE . '/index.html');
?>


ist es wirklich die BETA 2?
die hatte doch damals noch keine Smarty-Engine oder? :blink:

Gruß

Pixeler
30.04.2006, 14:03
Hallo TechWay,

Volltreffer :D

Einen großes Dankeschön an Dich.


Zu der Version, habe dies aus dem Punkt "Credits" im Adminbereich kopiert....

Pixeler



''>ZITAT(TechWay @ Apr 30 2006, 13:48) 4149
Probier mal dies:

[code]
......
[/b]

TechWay
30.04.2006, 15:14
die credits seite wird lange nicht mehr aktualisiert... :lol:

um die Version herauszufinden schaue am besten deinen Quelltext von deinem Shop an und ganz oben findest du dann sowas:


<meta name="generator" content="(c) by XT-Commerce v2.0 RC1.2 , http://www.xt-commerce.com">


Gruß
TechWay

Pixeler
30.04.2006, 16:31
Hallo TechWay,
und genau das steht auch da : v2.0 RC1.2 :D

Pixeler



''>ZITAT(TechWay @ Apr 30 2006, 15:14) 4153
die credits seite wird lange nicht mehr aktualisiert... :lol:

um die Version herauszufinden schaue am besten deinen Quelltext von deinem Shop an und ganz oben findest du dann sowas:


<meta name="generator" content="(c) by XT-Commerce v2.0 RC1.2 , http://www.xt-commerce.com">


Gruß
TechWay
[/b]