Latest News: (loading..)

herbsandhelpers

Members
  • Content count

    108
  • Joined

  • Last visited

2 Followers

About herbsandhelpers

Profile Information

  • Real Name
    Lorraine Hodgkinson
  • Gender
    Female
  1. I couldn't find anything similar in Add Ons that's why I persisted with altering the above module, it does work, although I'm not a coder so would appreciate an expert eye. I did look at the link you posted and one of the comments was that someone was unable to get it to work, which doesn't fill with confidence. I think for now I'll stick with what I've got, although if yours becomes an official add on I may give it a try. Lorraine
  2. Doooh! Can you post the Add On link please ... Lorraine
  3. Hello, Just moved to 2.3.4 BS GOLD and needed to carry on using this excellent contrib. Admin side worked fine along with assistance posted here, however getting the tabs to show shop side failed. I'm not a coder but I've just spent many hours altering the products_tabs.php module to work and show tabs again. I used a lot of help from here: http://forums.oscommerce.com/topic/398352-234bs-tabs-in-product-info/ If it will help anyone then please find the adjusted module below. You can remove the 'brand/image bit' if you prefer. Please note I'm not a coder so an expert eye would be helpful. Lorraine <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ ?> <script type="text/javascript"> $(function() { $( "#tabs" ).tabs(); }); </script> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="#"> <img alt="Brand" src="images/QELICON.png"> </a> <!-- Nav tabs --> <div id="tabs" role="tabpanel" class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="#tabs-0" aria-controls="tabs-0" role="tab" data-toggle="tab"><?php echo TEXT_TAB_DESCRIPTION; ?></a></li> <?php // Tab 1 if ($product_info['products_tab_1'] > '') { ?> <li role="presentation"><a href="#tabs-1" aria-controls="tabs-1" role="tab" data-toggle="tab"><?php echo PRODUCT_TABS_TAB_1; ?></a></li> <?php } ?> <?php // Tab 2 if ($product_info['products_tab_2'] > '') { ?> <li role="presentation"><a href="#tabs-2" aria-controls="tabs-2" role="tab" data-toggle="tab"><?php echo PRODUCT_TABS_TAB_2; ?></a></li> <?php } ?> <?php // Tab 3 if ($product_info['products_tab_3'] > '') { ?> <li role="presentation"><a href="#tabs-3" aria-controls="tabs-3" role="tab" data-toggle="tab"><?php echo PRODUCT_TABS_TAB_3; ?></a></li> <?php } ?> <?php // Tab 4 if ($product_info['products_tab_4'] > '') { ?> <li role="presentation"><a href="#tabs-4" aria-controls="tabs-4" role="tab" data-toggle="tab"><?php echo PRODUCT_TABS_TAB_4; ?></a></li> <?php } ?> <?php // Tab 5 if ($product_info['products_tab_5'] > '') { ?> <li role="presentation"><a href="#tabs-5" aria-controls="tabs-5" role="tab" data-toggle="tab"><?php echo PRODUCT_TABS_TAB_5; ?></a></li> <?php } ?> <?php // Review Tab if (PRODUCT_TABS_REVIEWS_TAB == 'True') { ?> <li><a href="#tabs-6"><?php echo TEXT_TAB_REVIEWS; ?></a></li> <?php } ?> <?php // Ask a Question Tab if (PRODUCT_TABS_QUESTION_TAB == 'True') { ?> <li><a href="#tabs-7"><?php echo TEXT_TAB_ASK_A_QUESTION; ?></a></li> <?php } ?> <?php // Tell a Friend Tab if (PRODUCT_TABS_FRIEND_TAB == 'True') { ?> <li><a href="#tabs-8"><?php echo TEXT_TAB_TELL_A_FRIEND; ?></a></li> <?php } ?> </ul> </div> <!-- Tab panes --> <div class="tab-content"> <div role="tabpanel" class="tab-pane active" id="tabs-0"> <?php echo stripslashes($product_info['products_description']); ?> </div> <?php // Tab 1 if ($product_info['products_tab_1'] > '') { ?> <div role="tabpanel" class="tab-pane" id="tabs-1"> <br> <?php echo stripslashes ($product_info['products_tab_1']); ?> </div> <?php } ?> <?php // Tab 2 if ($product_info['products_tab_2'] > '') { ?> <div role="tabpanel" class="tab-pane" id="tabs-2"> <br> <?php echo stripslashes ($product_info['products_tab_2']); ?> </div> <?php } ?> <?php // Tab 3 if ($product_info['products_tab_3'] > '') { ?> <div role="tabpanel" class="tab-pane" id="tabs-3"> <br> <?php echo stripslashes ($product_info['products_tab_3']); ?> </div> <?php } ?> <?php // Tab 4 if ($product_info['products_tab_4'] > '') { ?> <div role="tabpanel" class="tab-pane" id="tabs-4"> <br> <?php echo stripslashes ($product_info['products_tab_4']); ?> </div> <?php } ?> <?php // Tab 5 if ($product_info['products_tab_5'] > '') { ?> <div role="tabpanel" class="tab-pane"id="tabs-5"> <br> <?php echo stripslashes ($product_info['products_tab_5']); ?> </div> <?php } ?> <?php // Review Tab if (PRODUCT_TABS_REVIEWS_TAB == 'True') { echo ' <div id="tabs-6">'; include( DIR_WS_MODULES . FILENAME_PRODUCT_REVIEWS ); echo ' </div><div style="clear: both;"></div>'; } ?> <?php // Ask a Question Tab if (PRODUCT_TABS_QUESTION_TAB == 'True') { echo ' <div id="tabs-7">'; include( DIR_WS_MODULES . FILENAME_ASK_A_QUESTION ); echo ' </div><div style="clear: both;"></div>'; } ?> <?php // Tell a Friend Tab if (PRODUCT_TABS_FRIEND_TAB == 'True') { echo ' <div id="tabs-8">'; include( DIR_WS_MODULES . FILENAME_TELL_A_FRIEND ); echo ' </div><div style="clear: both;"></div>'; } ?> </div> </div> </div> </nav>
  4. Solved! The whole problem was the Ultimate SEO urls 5, With making soo many changes I uploaded the original Ultimate SEO files but then didn't upload the ones from support as well! Once this corrected all is well. Many thanks, when you make several changes it's hard to know what's gone wrong sometimes. Back to normal thanks for a great contrib!
  5. Thanks Rainer, general is fine but a there's a </div> at the end of the header file. Removing it seems to make no difference can you direct me to the thread on this please? Thanks, Lorraine
  6. Hello, Strangely I'm getting the following: Warning: Cannot modify header information - headers already sent by (output started at /.../shop/mobile/includes/header.php:6) in /..../shop/includes/functions/general.php on line 57 I've changed SEO URL 5.0 to rewrite and now it seems I'm getting this error in my mobile shop. Can anyone shed light please? See at this link: https://www.herbalmedicineuk.com/shop/mobile/green-tea-100g-mp-1056.html?redirectCancelled=true Thanks, Lorraine
  7. Hello David, What would you like to know? My mobile site currently now works fully for SPPC and Hide Categories. Happy to help. been away for a few days recently, Lorraine
  8. Okay thanks to the mighty Rainer all you need to do to make search work on 2.3.4 is add above the $listing_sql shown from the original instructions as here: // BOF Separate Price Per Customer // global variable (session): $sppc_customers_group_id -> local variable $customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) {$customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF SPPC $listing_sql = $select_str . $from_str . $where_str . $order_str; Then compare your advanced_search_result.php with the mobile version and ensure you compare and copy in every SPPC and Hide Categories changes exactly. I'm NOT a coder all at your own risk but it now seems to work perfectly for me ... Best wishes, Lorraine
  9. First thanks to Rainer for his excellent contrib. Just going to post a workaround I found for SPPC with Hide Categories and Products as this has been the only thing stopping me using this in the past. Please note I am NOT a coder! All at your own risk! Additionally I can't get the search to work. it's too restrictive if anyone can help further with this please. So to ensure only the categories and products show per SPPC on 2.3.4.only: In catalog_mb.php find first listing_sql and paste this above it as per current SPPC instructions: // BOF Separate Price Per Customer // global variable (session): $sppc_customers_group_id -> local variable $customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) {$customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF SPPC Then find this line: $listing_sql .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; and directly below it paste this line: // BOF SPPC Hide products and categories from groups $listing_sql .= " and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 "; // EOF SPPC Hide products and categories from groups Do this for the other files mentioned: specials.php and products_new.php Then in login.php compare your login file with one below and add the SPPC and Hide Categories bit: <?php require_once('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_mobile_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 // BOF Separate Pricing per Customer $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_group_id, customers_password, customers_email_address, customers_default_address_id, customers_specific_taxes_exempt from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); // EOF Separate Pricing Per Customer 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(); } // BOF Separate Pricing Per Customer: choice for logging in under any customer_group_id // note that tax rates depend on your registered address! if ($_POST['skip'] != 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD ) { $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id "); echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">'; print ("\n<html "); echo HTML_PARAMS; print (">\n<head>\n<title>Choose a Customer Group</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset="); echo CHARSET; print ("\"\n<base href=\""); echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; print ("\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\">\n"); echo '<body bgcolor="#ffffff" style="margin:0">'; print ("\n<table border=\"0\" width=\"100%\" height=\"100%\">\n<tr>\n<td style=\"vertical-align: middle\" align=\"middle\">\n"); echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); print ("\n<table border=\"0\" bgcolor=\"#f1f9fe\" cellspacing=\"10\" style=\"border: 1px solid #7b9ebd;\">\n<tr>\n<td class=\"main\">\n"); $index = 0; while ($existing_customers = tep_db_fetch_array($existing_customers_query)) { $existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => " ".$existing_customers['customers_group_name']." "); ++$index; } print ("<h1>Choose a Customer Group</h1>\n</td>\n</tr>\n<tr>\n<td align=\"center\">\n"); echo tep_draw_pull_down_menu('new_customers_group_id', $existing_customers_array, $check_customer['customers_group_id']); print ("\n<tr>\n<td class=\"main\"> <br />\n "); print ("<input type=\"hidden\" name=\"email_address\" value=\"".$_POST['email_address']."\">"); print ("<input type=\"hidden\" name=\"skip\" value=\"true\">"); print ("<input type=\"hidden\" name=\"password\" value=\"".$_POST['password']."\">\n</td>\n</tr>\n<tr>\n<td align=\"right\">\n"); echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); print ("</td>\n</tr>\n</table>\n</form>\n</td>\n</tr>\n</table>\n</body>\n</html>\n"); exit; } // EOF Separate Pricing Per Customer: choice for logging in under any customer_group_id // migrate old hashed password to new phpass password if (tep_password_type($check_customer['customers_password']) != 'phpass') { tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . tep_encrypt_password($password) . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'"); } $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); $customer_id = $check_customer['customers_id']; $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; // BOF Separate Pricing Per Customer $customers_specific_taxes_exempt = $check_customer['customers_specific_taxes_exempt']; if ($_POST['skip'] == 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD && isset($_POST['new_customers_group_id'])) { $sppc_customer_group_id = $_POST['new_customers_group_id'] ; $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$_POST['new_customers_group_id'] . "'"); } else { $sppc_customer_group_id = $check_customer['customers_group_id']; $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$check_customer['customers_group_id'] . "'"); } $customer_group_tax = tep_db_fetch_array($check_customer_group_tax); $sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax']; $sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt']; $group_specific_taxes_exempt = $customer_group_tax['group_specific_taxes_exempt']; if (tep_not_null($customers_specific_taxes_exempt)) { $sppc_customer_specific_taxes_exempt = $customers_specific_taxes_exempt; } elseif (tep_not_null($group_specific_taxes_exempt)) { $sppc_customer_specific_taxes_exempt = $group_specific_taxes_exempt; } else { $sppc_customer_specific_taxes_exempt = ''; } // EOF Separate Pricing Per Customer $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'); // BOF Separate Pricing per Customer tep_session_register('sppc_customer_group_id'); tep_session_register('sppc_customer_group_show_tax'); tep_session_register('sppc_customer_group_tax_exempt'); if (tep_not_null($sppc_customer_specific_taxes_exempt)) { tep_session_register('sppc_customer_specific_taxes_exempt'); } // EOF Separate Pricing per Customer 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, password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$customer_id . "'"); // reset session token $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); // restore cart contents $cart->restore_contents(); if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_mobile_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_mobile_link(FILENAME_DEFAULT)); } } } } if ($error == true) { $messageStack->add('login', TEXT_LOGIN_ERROR); } $breadcrumb->add(NAVBAR_TITLE, tep_mobile_link(FILENAME_LOGIN, '', 'SSL')); require(DIR_MOBILE_INCLUDES . 'header.php'); $headerTitle->write(); ?> <div id="iphone_content"> <div id="messageStack"> <?php if ($messageStack->size('login') > 0) { echo $messageStack->output('login'); } ?> </div> <div id="returning_cust"> <h1><?php echo HEADING_RETURNING_CUSTOMER; ?></h1> <?php echo tep_draw_form('login', tep_mobile_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?> <label for="email_address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label> <?php echo tep_input_jquery('email_address'); ?> <label for="password"><?php echo ENTRY_PASSWORD; ?></label> <?php echo tep_draw_password_field('password','','id="password" data-theme="a"'); ?> <div class="bouton"> <?php echo tep_button_jquery( IMAGE_BUTTON_FORGOT_PASS , tep_mobile_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') , 'b' , 'button' , 'data-icon="info" data-inline="true" data-ajax="false"' ); echo tep_button_jquery( IMAGE_BUTTON_LOGIN , '', 'b' , 'submit' , 'data-icon="arrow-r" data-iconpos="right" data-inline="true"' ); ?> </div> </form> </div> <div id="new_cust"> <h1><?php echo HEADING_NEW_CUSTOMER; ?></h1> <?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?> <div class="bouton"> <?php echo tep_button_jquery( IMAGE_BUTTON_CREATE_ACCOUNT , tep_mobile_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'b' , 'button' , 'data-icon="arrow-r" data-iconpos="right" data-inline="true" ' ); ?> </div> </div> <?php if( JQUERY_MOBILE_VALIDATE == 'True') require(DIR_MOBILE_INCLUDES. 'form_check.js.php'); else require(DIR_WS_INCLUDES . 'form_check.js.php'); require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> Do the same for your logoff.php with this: <?php require_once('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGOFF); $breadcrumb->add(NAVBAR_TITLE); tep_session_unregister('customer_id'); tep_session_unregister('customer_default_address_id'); tep_session_unregister('customer_first_name'); // BOF Separate Pricing Per Customer tep_session_unregister('sppc_customer_group_id'); tep_session_unregister('sppc_customer_group_show_tax'); tep_session_unregister('sppc_customer_group_tax_exempt'); if (tep_session_is_registered('sppc_customer_specific_taxes_exempt')) { tep_session_unregister('sppc_customer_specific_taxes_exempt'); } // EOF Separate Pricing Per Customer tep_session_unregister('customer_country_id'); tep_session_unregister('customer_zone_id'); if ( tep_session_is_registered('sendto') ) { tep_session_unregister('sendto'); } if ( tep_session_is_registered('billto') ) { tep_session_unregister('billto'); } if ( tep_session_is_registered('shipping') ) { tep_session_unregister('shipping'); } if ( tep_session_is_registered('payment') ) { tep_session_unregister('payment'); } if ( tep_session_is_registered('comments') ) { tep_session_unregister('comments'); } if ( tep_session_is_registered('mobilesession') ) { tep_session_unregister('mobilesession'); } $cart->reset(); require(DIR_MOBILE_INCLUDES . 'header.php'); $headerTitle->write(); ?> <div id="iphone_content"> <div id="cms"> <?php echo TEXT_MAIN; ?> <div id="bouton"> <?php echo tep_button_jquery(IMAGE_BUTTON_CONTINUE , tep_mobile_link(FILENAME_DEFAULT, '', 'NONSSL'), 'b' , 'button' , ' data-icon="arrow-r" data-iconpos="right" data-ajax="false"' ); ?> </div> </div> <?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> You'll also have to make some changes to the mobile product_info.php file too just compare with your existing main catalog version. It all works except advanced search/search. Hope this helps someone! Lorraine
  10. Hi Jim, Thanks again, yeap triple yep I've checked this and reuploaded my application_top.php and everything is the exactly the same the error message as above. If I remove the wishlist box PDF datasheet works fine and account link to wishlist but I need the box ... I think I'll have to remove PDF datasheet sadly ... Lorraine
  11. Can anyone suggest a fix for this? Tried in the Wish List 3.0 forum with no success. If I remove the Wish List box both PDF datasheet and Wish List work well however I need to have the Wishlist box ... Fatal error: Call to a member function count_contents() on a non-object in /homepages/xx/xxxx/htdocs/clickandbuilds/xxxxx/xxxx/xxxx/includes/modules/boxes/bm_wishlist.php on line 37 Thanks again, Lorraine
  12. Here's the bit that creates it: function productInfo(){ global $languages_id; $this->productInfo = array(); $p_string = ''; for($i=0, $n=sizeof($this->products); $i<$n; $i++){ $p_string .= $this->products[$i] . ', '; } $p_string = trim($p_string, ', '); $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join (select * from (select products_id, specials_new_products_price, expires_date, status from " . TABLE_SPECIALS . " where status = 1 order by products_id, specials_new_products_price, expires_date) as t group by products_id) as s on pd.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in(" . $p_string . ") and pd.language_id=" . (int)$languages_id . " order by products_name"); Is there an error here?
  13. Using 2.3.4 getting this error to do with the $p_string: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and pd.language_id=1 order by products_name' at line 1 select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from products p, products_description pd left join (select * from (select products_id, specials_new_products_price, expires_date, status from specials where status = 1 order by products_id, specials_new_products_price, expires_date) as t group by products_id) as s on pd.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in() and pd.language_id=1 order by products_name [TEP STOP] Is there a solution? The email won't send ... Thanks, Lorraine
  14. Not a coder but this puts the link back in: <?php if (tep_not_null($product_info['products_url'])) { echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); } ?>
  15. Heres my catalog/includes/application_top.php Can anyone see what's wrong please? <?php /* $Id$ adapted for Hide products and categories from customer groups for SPPC 2008/08/02 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ // Start the clock for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); // Set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); // check support for register_globals if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) { exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.'); } // load server configuration parameters if (file_exists('includes/local/configure.php')) { // for developers include('includes/local/configure.php'); } else { include('includes/configure.php'); } // Define the project version --- obsolete, now retrieved with tep_get_version() define('PROJECT_VERSION', 'osCommerce Online Merchant v2.3'); // some code to solve compatibility issues require(DIR_WS_FUNCTIONS . 'compatibility.php'); // set the type of request (secure or not) $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], ($request_type == 'SSL') ? strlen(DIR_WS_HTTPS_ADMIN) : strlen(DIR_WS_ADMIN)); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); define('LOCAL_EXE_GUNZIP', 'gunzip'); define('LOCAL_EXE_ZIP', 'zip'); define('LOCAL_EXE_UNZIP', 'unzip'); // include the list of project filenames require(DIR_WS_INCLUDES . 'filenames.php'); // include the list of project database tables require(DIR_WS_INCLUDES . 'database_tables.php'); // Define how do we update currency exchange rates // Possible values are 'oanda' 'xe' or '' define('CURRENCY_SERVER_PRIMARY', 'oanda'); define('CURRENCY_SERVER_BACKUP', 'xe'); // include the database functions require(DIR_WS_FUNCTIONS . 'database.php'); // make a connection to the database... now tep_db_connect() or die('Unable to connect to database server!'); // set application wide parameters $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } // define our general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.php'); // initialize the logger class require(DIR_WS_CLASSES . 'logger.php'); // include shopping cart class require(DIR_WS_CLASSES . 'shopping_cart.php'); // define how the session functions will be used require(DIR_WS_FUNCTIONS . 'sessions.php'); // set the cookie domain $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN); $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH); // set the session name and save path tep_session_name('osCAdminID'); tep_session_save_path(SESSION_WRITE_DIRECTORY); // set the session cookie parameters if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, $cookie_path, $cookie_domain); } elseif (function_exists('ini_set')) { ini_set('session.cookie_lifetime', '0'); ini_set('session.cookie_path', $cookie_path); ini_set('session.cookie_domain', $cookie_domain); } @ini_set('session.use_only_cookies', (SESSION_FORCE_COOKIE_USE == 'True') ? 1 : 0); // lets start our session tep_session_start(); if ( (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) { extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS); } // set the language if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) { if (!tep_session_is_registered('language')) { tep_session_register('language'); tep_session_register('languages_id'); } include(DIR_WS_CLASSES . 'language.php'); $lng = new language(); if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { $lng->get_browser_language(); } $language = $lng->language['directory']; $languages_id = $lng->language['id']; } // redirect to login page if administrator is not yet logged in if (!tep_session_is_registered('admin')) { $redirect = false; $current_page = $PHP_SELF; // if the first page request is to the login page, set the current page to the index page // so the redirection on a successful login is not made to the login page again if ( ($current_page == FILENAME_LOGIN) && !tep_session_is_registered('redirect_origin') ) { $current_page = FILENAME_DEFAULT; $HTTP_GET_VARS = array(); } if ($current_page != FILENAME_LOGIN) { if (!tep_session_is_registered('redirect_origin')) { tep_session_register('redirect_origin'); $redirect_origin = array('page' => $current_page, 'get' => $HTTP_GET_VARS); } // try to automatically login with the HTTP Authentication values if it exists if (!tep_session_is_registered('auth_ignore')) { if (isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_PW'])) { $redirect_origin['auth_user'] = $HTTP_SERVER_VARS['PHP_AUTH_USER']; $redirect_origin['auth_pw'] = $HTTP_SERVER_VARS['PHP_AUTH_PW']; } } $redirect = true; } if (!isset($login_request) || isset($HTTP_GET_VARS['login_request']) || isset($HTTP_POST_VARS['login_request']) || isset($HTTP_COOKIE_VARS['login_request']) || isset($HTTP_SESSION_VARS['login_request']) || isset($HTTP_POST_FILES['login_request']) || isset($HTTP_SERVER_VARS['login_request'])) { $redirect = true; } if ($redirect == true) { tep_redirect(tep_href_link(FILENAME_LOGIN, (isset($redirect_origin['auth_user']) ? 'action=process' : ''))); } unset($redirect); } // include the language translations $_system_locale_numeric = setlocale(LC_NUMERIC, 0); require(DIR_WS_LANGUAGES . $language . '.php'); setlocale(LC_NUMERIC, $_system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634) $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $language . '/' . $current_page); } // define our localization functions require(DIR_WS_FUNCTIONS . 'localization.php'); // Include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // setup our boxes require(DIR_WS_CLASSES . 'table_block.php'); require(DIR_WS_CLASSES . 'box.php'); // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // entry/item info classes require(DIR_WS_CLASSES . 'object_info.php'); // email classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // file uploading class require(DIR_WS_CLASSES . 'upload.php'); // action recorder require(DIR_WS_CLASSES . 'action_recorder.php'); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; } else { $current_category_id = 0; } // initialize configuration modules require(DIR_WS_CLASSES . 'cfg_modules.php'); $cfgModules = new cfg_modules(); // the following cache blocks are used in the Tools->Cache section // ('language' in the filename is automatically replaced by available languages) // adapted for Hide products and categories from groups $cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language-cg', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language-cg', 'multiple' => true) ); // BOF: WebMakers.com Added: Functions Library include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php'); // EOF: WebMakers.com Added: Functions Library ?>