♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 The CONTINUE SHOPPING button takes you back to the item you just added to your cart... where do you think it should take you? That's what the stock OSC does. Dan
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 I didn't use the centre shop contribution, I did it myself. Once I go live I will post up some tips and tricks! Dan
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 Stop and think about it. Why would somebody want to continue shopping for an item they just purchased?
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 When your customers are shopping for something, and they place an item in their cart, and then click "contiue to shop", they should be taken back to the place where they found the first item to place in the cart. which would be back 2 pages not 1. They might want something from the same catagory. Like I said. Just a thought.
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 Just for reference and anyone else who wants to fix this: In catalog/shopping cart.php look for this code: <?php ? ?$back = sizeof($navigation->path)-2; ? ?if (isset($navigation->path[$back])) { ?> ? ? ? ? ? ? ? ?<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td> <?php ? ?} ?> and change the -2 to -3
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 ahhhh excellent.... thanks for that dude, saves me having to go look around. ;) I am still having problems with logging in though.... it's wierd. Dan
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 Maybe you can help me out. What is the process of getting my site secured through ssl. I am going to get a dedicated certificate soon, but for now, my host has a shared cert that I will use. But how do I enable my site for it?
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 Nevermind. I figured it out. By the way, you asked if I was a business owner or a customer. Both. But Business Owner first. I have a post in the My Store forum HERE. check it out. give me some feedback.
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 I'm really stuck on this logging in issue. OK try this... go to http://dev.modyourcar.com.au Then try and log in using: [email protected]/test1 Notice it doesn't log you in... BUT if you add something to your cart then try it.. it logs you in! What the hell is going on!!!? Dan
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 can you post the code to your login.php?
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 <?php /* $Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.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) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); $password = tep_db_prepare_input($HTTP_POST_VARS['password']); // Check if email exists $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname,customers_email_address,customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); if (!tep_db_num_rows($check_customer_query)) { $error = true; } else { $check_customer = tep_db_fetch_array($check_customer_query); // Check that password is good if (!tep_validate_password($password, $check_customer['customers_password'])) { $error = true; } else { if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $check_country_query = tep_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 = '" . (int)$check_customer['customers_default_address_id'] . "'"); $check_country = tep_db_fetch_array($check_country_query); // Added last name field, email - Dan Rucci $customer_id = $check_customer['customers_id']; $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; $customer_last_name = $check_customer['customers_lastname']; $customer_email_address = $check_customer['customers_email_address']; $customer_country_id = $check_country['entry_country_id']; $customer_zone_id = $check_country['entry_zone_id']; tep_session_register('customer_id'); tep_session_register('customer_default_address_id'); tep_session_register('customer_first_name'); tep_session_register('customer_last_name'); tep_session_register('customer_email_address'); tep_session_register('customer_country_id'); tep_session_register('customer_zone_id'); tep_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)$customer_id . "'"); // restore cart contents $cart->restore_contents(); if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } else { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } } } } if ($error == true) { $messageStack->add('login', TEXT_LOGIN_ERROR); } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function session_win() { window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus(); } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top" class="infoBoxContents left"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top" class="centersite"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <!--<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>--> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('login') > 0) { ?> <tr> <td><?php echo $messageStack->output('login'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($cart->count_contents() > 0) { ?> <tr> <td class="smallText"><?php echo TEXT_VISITORS_CART; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td> <td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td> </tr> <tr> <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td> <td class="main"><?php echo tep_draw_input_field('email_address'); ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td> <td class="main"><?php echo tep_draw_password_field('password'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top" class="infoBoxContents right"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Dan
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 I think it has something to do with the SSL (virtual SSL I have int hat DEV environment). Here is my configure.php. define('HTTP_SERVER', 'http://dev.modyourcar.com.au'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'http://securedev.modyourcar.com.au'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'dev.modyourcar.com.au'); define('HTTPS_COOKIE_DOMAIN', 'securedev.modyourcar.com.au'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('HEADER_IMG_PIC', 'header.jpg'); Dan
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 did you try setting the STORE_SESSIONS value to mysql? I also had to add slashes at the end of the domain names.
♥MYC267 Posted January 22, 2004 Author Posted January 22, 2004 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' Is already.... Dan
Urbluffingme Posted January 22, 2004 Posted January 22, 2004 did you try adding the slashes at the end of the https server?
Guest Posted January 22, 2004 Posted January 22, 2004 Have you checked that it is creating the session in the MySQL database when you attempt to log in.
Urbluffingme Posted January 23, 2004 Posted January 23, 2004 just a thought, but I was a having a few problems with logging in. I made myHTTP_COOKIE_PATH= '/catalog/' and it took care of a few problems. dont know why though
Urbluffingme Posted January 23, 2004 Posted January 23, 2004 Here is a wierd thing. In my store I can operate flawlessly with the catalog and login and shopping cart. Everything works as it should. UNLESS, I click on home. And then it is as if I am arriving at the site for the first time. I am logged off, and my cart is emptied. It may be related, since I noticed that when you login to your site, you are redirected to the home page, and if you log in from the cart everything works fine.
♥MYC267 Posted January 23, 2004 Author Posted January 23, 2004 With mine if you have an item in your cart and log in it works. But if your cart is empty it doesn't. Dan
devosc Posted January 23, 2004 Posted January 23, 2004 Couple of things seeing how particular you are :D In my FireBird browser your shop isn't centered. Also where it say sales girl! the girl! bit drops to the next line. When I login with FB there is no problem However I tried it out with I.E. and see your gripe. The reason for that is because the session id is not being store in any of the forms in an I.E browser, don't ask me why but it ain't, thats why you can't login. As said yesterday you could just put the osCsid in the forms action i.e ?action=process&osCsid=<?php echo tep_session_id;?> or something (either name or id?). But you would have to do that for each form you have on that page. More intriguing is why your having that problem, the reason being is that application_top.php does a getenv('HTTPS') check to determine whether you have SSL and so its screwing with application_top.php. Might be interesting to find out why your forms aren't getting the osCsid in I.E "Any fool can know. The point is to understand." -- Albert Einstein
♥MYC267 Posted January 23, 2004 Author Posted January 23, 2004 I'm going to have a play tonight.. it's something I really want to get worted ASAP cause it's a pretty stupid problem to have and from a customer point of view it's unacceptable. I appreciate your feedback... Dan
devosc Posted January 23, 2004 Posted January 23, 2004 As a test, in you config.php file set both NONSSL and SSL settings to the same domain etc, and sitll enable SSL. If it works then you know not to worry until you get SSL. "Any fool can know. The point is to understand." -- Albert Einstein
Recommended Posts
Archived
This topic is now archived and is closed to further replies.