everyth5 Posted August 22, 2006 Share Posted August 22, 2006 I have just ONE PAGE that is giving me trouble. I have looked through the code but because I am still learning, I must be overlooking where the problem is. As you can see, it seems to spill over, even though I have used the centershop contribution. I think that the problem is in the reviews.php file but am not really sure. This is the code for the page: <?php /* $Id: reviews.php,v 1.51 2003/06/09 23:03:55 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright ? 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_REVIEWS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_REVIEWS)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <?php // BOF: Header Tag Controller v2.5.7 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } // EOF: Header Tag Controller v2.5.7 ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </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="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="5" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><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 . '', 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> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' order by r.reviews_id DESC"; $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS); if ($reviews_split->number_of_rows > 0) { if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) { ?> <tr> <td><table border="5" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } $reviews_query = tep_db_query($reviews_split->sql_query); while ($reviews = tep_db_fetch_array($reviews_query)) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '"><u><b>' . $reviews['products_name'] . '</b></u></a> <span class="smallText">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</span>'; ?></td> <td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews['date_added'])); ?></td> </tr> </table></td> </tr> <tr> <td><table border="5" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="center" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $reviews['products_image'], $reviews['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td valign="top" class="main"><?php echo tep_break_string(tep_output_string_protected($reviews['reviews_text']), 60, '-<br>') . ((strlen($reviews['reviews_text']) >= 100) ? '..' : '') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])) . '</i>'; ?></td> <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <?php } else { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_NO_REVIEWS))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="5" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- 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'); ?> I hope that someone can help me figure this one out. ***************************************************************************** The other problem is this. When I try to send a message through my Contact Us page, it won't recognize a correct email address. I would like this page to be usable by ANYONE regardless of whether they are logged in or not. I have created a test account using one of my emails and bogus information just for testing the site. When I try to send a message using the Contact Us page, I get the following error. Your E-Mail Address does not appear to be valid - please make any necessary corrections. I get this whether I am logged in as a member to my site or not. Seems it will not recognize any email address. Thanks for the help. Thanks Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 22, 2006 Author Share Posted August 22, 2006 Sorry, the problem I am experiencing with the first part of the above message is located in the Reviews page. The link for that is this: http://everything-asian.com/reviews.php. Thanks Kelvin Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 your reviews issue is a cute one ... actually you do not have an issue, apart from having typed in a bogus review that is one looooooooooong word that is all in one line ;-) ... you can forcefully stretch it even more, hehe. Type in regular text with words, and the problem is gone. the contact us thing seems diffrent, here I would need to see the part of the code where it creates the error message ... it should look like this: if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 your reviews issue is a cute one ... actually you do not have an issue, apart from having typed in a bogus review that is one looooooooooong word that is all in one line ;-) ... you can forcefully stretch it even more, hehe. Type in regular text with words, and the problem is gone. the contact us thing seems diffrent, here I would need to see the part of the code where it creates the error message ... it should look like this: if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } Thanks Monika: I am laughing my head off right now. And kicking myself in the but for making such a STUPID problem. I guess I am better at finding problems with things than fixing them :blush: I haven't tried the code for the other problem yet, but I am sure that it will work. Thanks SOOOOOOO much. I have been trying for 3 days to get answers to these problems. Thanks again Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 your reviews issue is a cute one ... actually you do not have an issue, apart from having typed in a bogus review that is one looooooooooong word that is all in one line ;-) ... you can forcefully stretch it even more, hehe. Type in regular text with words, and the problem is gone. the contact us thing seems diffrent, here I would need to see the part of the code where it creates the error message ... it should look like this: if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } Hi again. Here is the code you were referring to. if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['Kelvin and Kalaya']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['[email protected]']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 Need to get this problem above fixed if someone can help me on it. Also I just found out that orders are not being sent back to me from 2CheckOut. I placed a LIVE order with a real credit card through my site, and all seemed to go well. It went through the checkout procedure with only one small bug. I got redirected to 2CheckOut and the process went well, but at the end of the process, 2 Check Out did not pass me back to my site, OR send me information about the order, OR send out a confirmation email to ME. There was one sent to the customer though. So in a real world, I would not ever know about the order and the customer would be charged for it! :o The one bug I have is that after the purchase, my site still has the product in the shopping cart. Hope someone can clue me in on how to fix these problems. Thanks Kelvin Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 in the contact_us snippet you posted, there is hardcoded values ... ho on earth did those go there??? is that where you want the info sent? That would normally have been the part to harvest your customers input info. You need to compare to a vanilla file and restore, and then in the tep_main change the store owner values if you want special name or email addy for yourself As for 2checkout, yes that is a known thing and can be overcome by order registration before checkout ... there are 2-3 contributions for this :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 in the contact_us snippet you posted, there is hardcoded values ... ho on earth did those go there??? is that where you want the info sent? That would normally have been the part to harvest your customers input info. You need to compare to a vanilla file and restore, and then in the tep_main change the store owner values if you want special name or email addy for yourself As for 2checkout, yes that is a known thing and can be overcome by order registration before checkout ... there are 2-3 contributions for this Thanks alot Monika. I will copy and paste from my original download I saved for that purpose and fix the contact_us file. I will also check out the order registration contribution you mentioned. Is there a specific one that you can recommend? Thanks again. Kelvin Link to comment Share on other sites More sharing options...
djms Posted August 23, 2006 Share Posted August 23, 2006 Monika, I'm having a similar problem with Contact Us screen. Unless there is a session started, the Continue Button on the Contact Us screen takes you to a Must Use Cookie screen. I have "Force Cookies" set to false and my code matches yours from your conversation with Kelvin. Any ideas, Djms Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 Thanks alot Monika. I will copy and paste from my original download I saved for that purpose and fix the contact_us file. I will also check out the order registration contribution you mentioned. Is there a specific one that you can recommend? Thanks again. Kelvin kelvin, sorry nope, I had coded one myself a while ago so I did not try a contrib. But searching this board should turn up a few as we had this topic a lot recently. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 Monika, I'm having a similar problem with Contact Us screen. Unless there is a session started, the Continue Button on the Contact Us screen takes you to a Must Use Cookie screen. I have "Force Cookies" set to false and my code matches yours from your conversation with Kelvin. Any ideas, Djms Debbie, are you experiencing session issues anywhere else on your site? Cookie domains are set up correctly? :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
djms Posted August 23, 2006 Share Posted August 23, 2006 Debbie, are you experiencing session issues anywhere else on your site?Cookie domains are set up correctly? I was having problems with adding items to a cart last week due to a sessions problem, I think. I have always had my "Show shopping cart after placing item in cart" option set to false. I wanted to be redirected to the category overview screen (the category being the one the customer was in when he placed something in the cart.) This was working fine for over a year until a few weeks ago when the Add to Cart button stopped working unless you were logged in. It would simply take you to a blank screen and would not start a session. The browsers Back button would take you back to the catalog but of course, no items was in the cart. I couldn't figure out the problem but I stumbled across the "Show Shopping Cart..." option and when I set it to true, it began working fine. I was satisfied enough for now...except my Contact Us Screen is having similar problems with sessions. Thanks, Djms Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 check if session is set to mysql in the config file (catalog) if yes, post your upper part of the code in that file (including the cookie info) :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
djms Posted August 23, 2006 Share Posted August 23, 2006 check if session is set to mysql in the config file (catalog) if yes, post your upper part of the code in that file (including the cookie info) Catalog/Admin/Configuration.php...right? A search for mysql gave me nothing. Here's the whole code. I need to change the permissions so I can edit the file right? Debbie Warning: This file cannot be edited due to file permissions! <?php /* $Id: configuration.php,v 1.14 2005/07/19 06:04:56 mayuru Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $checkValue = $HTTP_POST_VARS['configuration_value']; $stockQuery = tep_db_query("select configuration_id from ". TABLE_CONFIGURATION . " where configuration_title = 'Stock Re-order level' "); $stockQueryResult = tep_db_fetch_array($stockQuery); if($HTTP_GET_VARS['cID'] == $stockQueryResult['configuration_id']) { if(! ereg("^[1-9]+[0-9]*$", $checkValue)) { $messageStack->add(STOCK_VALIDATION, 'error'); $HTTP_GET_VARS['gID']=$gID; $HTTP_GET_VARS['cID']=$cID; $action = "edit"; break; } } // Added by Mayur Upalekar on July 19, 2005 $config_data_query = tep_db_query("select configuration_title, configuration_key, configuration_value from ". TABLE_CONFIGURATION . " where configuration_id = ". $HTTP_GET_VARS['cID']); $config_data = tep_db_fetch_array($config_data_query); if($config_data['configuration_key'] == "SESSION_FORCE_COOKIE_USE" && $HTTP_POST_VARS['configuration_value'] == 'True' ) { $http_domain = 0; $https_domain = 0; preg_match_all("/(http?:\/\/)(.*)$/",HTTP_CATALOG_SERVER,$http_domain); preg_match_all("/(http?:\/\/)(.*)$/",HTTPS_CATALOG_SERVER,$https_domain); if($http_domain[2][0] != $https_domain[2][0]) { $messageStack->add_session(ERROR_SSL_FORCED_COOKIE, 'error'); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID. '&action=edit')); } } // Added by Mayur Upalekar on July 19, 2005 // Added by Susan Kulkarni as part of the Shipping Message Module on May 13, 2005 if($HTTP_POST_VARS['shipping_msg']) { $shipping_msg = tep_db_prepare_input($HTTP_POST_VARS['shipping_msg']); $msg_error = false; foreach($shipping_msg as $language_id=>$msg) { //CYB Added on May 27,2005 By Susan Kulkarni //For the purpose of adding validation to Shipping Duration text. if(strlen($msg)>255) { if($msg_error == false) { $messageStack->add_session(MAX_LENGTH_EXCEEDED, 'error'); $msg_error = true; } } else { tep_db_query("update " . TABLE_SHIPPING_MSG . " set configuration_value = '" . tep_db_input($msg) . "' where language_id = " . (int)$language_id); } } if($msg_error = true) { tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID. '&action=edit')); } else { tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); } } // Added by Susan Kulkarni as part of the Shipping Message Module on May 13, 2005 // for checking if no.of search results entered is >0 $searchQuery= tep_db_query("select configuration_id from ". TABLE_CONFIGURATION . " where configuration_title = 'Search Results' "); $searchQueryResult = tep_db_fetch_array($searchQuery); if($HTTP_GET_VARS['cID'] == $searchQueryResult['configuration_id']) { if(! ereg("^[1-9]+[0-9]*$", $checkValue)) { $messageStack->add(SEARCH_RESULTS_VALIDATION, 'error'); $HTTP_GET_VARS['gID']=$gID; $HTTP_GET_VARS['cID']=$cID; $action = "edit"; break; } } // for checking if no.of search results entered is >0. // check if the discount coupon entered in the welcome disocunt coupon field already exists. if(tep_not_null($checkValue)){ $searchCouponQuery= tep_db_query("select configuration_id from ". TABLE_CONFIGURATION . " where configuration_title = 'Welcome Discount Coupon Code' "); $searchCouponQueryResult = tep_db_fetch_array($searchCouponQuery); if($HTTP_GET_VARS['cID'] == $searchCouponQueryResult['configuration_id']) { $coupon_query=tep_db_query("SELECT * FROM coupons WHERE coupon_code='$checkValue' AND coupon_active='Y'"); $coupon_query_result= tep_db_fetch_array($coupon_query); if(tep_db_num_rows($coupon_query) == 0) { $messageStack->add(WELCOME_COUPON_VALIDATION, 'error'); $HTTP_GET_VARS['gID']=$gID; $HTTP_GET_VARS['cID']=$cID; $action = "edit"; break; } } } // check if the disocunt coupon entered in the welcome disocunt coupon field already exists. $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1; $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); $cfg_group = tep_db_fetch_array($cfg_group_query); ?> <!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> <script language="javascript"> /* function to open a popup window */ function popupHelpWindow(url) { window.open(url,'popupHelpWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re sizable=yes,copyhistory=no,width=600,height=750,screenX=150,screenY=150,top=50,le ft=150') } </script> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while ($configuration = tep_db_fetch_array($configuration_query)) { if (tep_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; if (ereg('->', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); ${$class_method[0]} = new $class_method[0](); } $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]}); } else { $cfgValue = tep_call_function($use_function, $configuration['configuration_value']); } } else { $cfgValue = $configuration['configuration_value']; } if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'"); $cfg_extra = tep_db_fetch_array($cfg_extra_query); $cInfo_array = array_merge($configuration, $cfg_extra); $cInfo = new objectInfo($cInfo_array); } if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <!-- check if it is the Download section of configuration.Only then show the Help button --> <?php if((int)$HTTP_GET_VARS['gID']==13){ ?> <!-- help button for download settings --> <tr> <td colspan="4" align="right"><?php echo '<a href="java script:popupHelpWindow(\'' . tep_href_link(FILENAME_DOWNLOAD_CONTROLLER_HELP) . '\')">' . tep_image_button('button_help.gif', IMAGE_HELP) . '</a>'; ?> </td> </tr> <!-- help button for download settings --> <?php } ?> <!-- show the path of logs directory --> <?php if((int)$HTTP_GET_VARS['gID']==10){ ?> <tr> <td class="smallText" colspan="3"><?php echo TEXT_LOGS_DIRECTORY . ' ' . STORE_PAGE_PARSE_TIME_LOG; ?></td> </tr> <?php } ?> <!-- show the path of logs directory --> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'edit': $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value); } $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . $cInfo->configuration_description); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </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'); ?> Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 in the contact_us snippet you posted, there is hardcoded values ... ho on earth did those go there??? is that where you want the info sent? That would normally have been the part to harvest your customers input info. You need to compare to a vanilla file and restore, and then in the tep_main change the store owner values if you want special name or email addy for yourself As for 2checkout, yes that is a known thing and can be overcome by order registration before checkout ... there are 2-3 contributions for this I just check the code in contact_us and see what you mean!!! :blink: I don't know how that got changed. I will cut and paste it back to original unless you advise me otherwise. Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 Changed it and tested it without being logged in and it worked beautifully. Thanks alot Monika. Right now I have my site set on demo mode to 2Checkout so that sales will not be put through without me knowing. Don't want any customers getting ticked off at me before I get off the ground. Checking into the contributions right now that you suggested. Thanks again Kelvin Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 Debbie, no what would be needed is catalog/includes/configure.php when you post stuff, mask any login/password info!!! :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 Now this order registration thing, is that 2checkout specific? I just did a search for "order registration" , "registration" in the payment modules and didn't come up with anything. Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 23, 2006 Share Posted August 23, 2006 Now this order registration thing, is that 2checkout specific? I just did a search for "order registration" , "registration" in the payment modules and didn't come up with anything. they call it order logging http://www.oscommerce.com/community?contri...mp;category=all :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
djms Posted August 23, 2006 Share Posted August 23, 2006 Monika, I've sent the requested code to you in PM in case I missed masking any vital information. Thx, Debbie Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 I have now installed the Order Logging contribution and it works like a dream.....I think. It didn't cause any errors anyway, and there is a message in my Orders In Holding area reading: Copies of Orders in Orders Holding... In case your customer fails to return after Paypal or 2Checkout... These orders may or may not have been completed! This module logs all orders before the customer is passed to payment processing. The process is seamless and doesn't interfere with the regular checkout process. Please note that EVERY TIME a customer returns to the Order Confirmation Page, the order is stored in holding! Some orders may be saved several times! Use the last one of any such set of orders! You can view or delete the orders with a click of the appropriate icon! Now the problem still persists that if the customer doesn't get sent back to the checkout_success.php URL from 2CheckOut, then the items in the shopping cart do not get removed from there. Does anyone have any idea what code changes must be done to make this work??? I have my 2Checkout set up like such in 2CheckOut: Approved URL Input a url for your customers to be sent to on a successful purchase. http://everything-asian.com/checkout_success.php Example: https://www.yoursite.com/yourscript.php is the orange URL correct? I checked it on my computer and it seemed to go there. but it still didn't get rid of the items in the shopping cart. Hope someone smarter than I can figure this one out. Thanks Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 I wasn't (and still am not) being sent back to my site after the order has been processed by 2checkout. I am also not being sent back any of the information about the customer. If they make up an alias name for the account on my site, because I don't have SSL just yet and I DO let them know that in my information pages, then when they finish the order and I am sent a copy of the order, I don't have the correct information in order to send them the product. This causes a bit of a problem, right? In 2CheckOut "Setting Up Your Site" area they say the following: Passed back parameters The following parameters will be passed back to your routine:Parameter Name Description order_number 2Checkout.com order number card_holder_name Card holder's name street_address Card holder's address city Card holder's city state Card holder's state zip Card holder's zip country Card holder's country email Card holder's email phone Card holder's phone credit_card_processed Y if successful, K if waiting for approval total Total purchase amount ship_name Shipping information ship_street_address Shipping information ship_city Shipping information ship_state Shipping information ship_zip Shipping information ship_country Shipping information product_id 2Checkout product ID for purchased items will append a number if more than one item. ex. product_id,product_id1,product_id2 quantity quantity of corresponding product will append a number if more than one item.ex. quantity,quantity1,quantity2 merchant_product_id your product ID for purchased items will append a number if more than one item.ex. merchant_product_id,merchant_product_id1,merchant_product_id2 product_description your description for purchased items will append a number if more than one item.ex. product_description,product_description1,product_description2 Confirmation E-mail Once the credit card transaction is approved both you and the buyer will recieve a confirmation email. Ideally, I would rather have all this information sent to my email and not back to the website until such time that I get SSL (yes, I plan on getting it soon), but I am not sure if this is possible. Thanks Kelvin Link to comment Share on other sites More sharing options...
everyth5 Posted August 23, 2006 Author Share Posted August 23, 2006 bump : anyone??? Link to comment Share on other sites More sharing options...
everyth5 Posted August 24, 2006 Author Share Posted August 24, 2006 I could really use a hand on this one from a super programmer. I am not knowledgable enough on php to figure this one out just yet. Thanks anyone. Kelvin Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.