alex_gospodarets Posted January 12, 2015 Share Posted January 12, 2015 I have sent you a pm I think your configure.php file is incorrect. Hi, could you show me what is wrong i have the same problem with oscommerce, here is my config file: <?php define('HTTP_SERVER', 'http://www.*******.com'); //define('HTTPS_SERVER', 'https://padlocksecure.co.uk/*******'); define('HTTPS_SERVER', 'https://www.*******.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', '*******.com'); define('HTTPS_COOKIE_DOMAIN', '*******.com'); 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_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('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/project/public_html'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '*******'); define('DB_SERVER_PASSWORD', '*******'); define('DB_DATABASE', '*******'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' //ink1 mysql server: define('DB_SERVER2', '*******'); // eg, localhost - should not be NULL for productive servers define('DB_SERVER_USERNAME2', '*******'); define('DB_SERVER_PASSWORD2', '*******'); define('DB_DATABASE2', '*******'); define('VAT', 20); $config_discount_band=array(); $config_discount_band["CPR"]=array( 18 => 20, 15 => 15, 10 => 10, 5 => 5, ); $config_discount_band["ECOT"]=array( 4 => 8, ); $config_discount_band["ECO"]=array( 6 => 15, 3 => 10, ); $config_discount_band["OEM"]=array( 6 => 10, 2 => 5, ); define('FREE_PRODUCT_ID', 80773); // Originally was define('FREE_PRODUCT_TOTAL', 20); define('POINTS_AUTO_APPROVE', false); define('POINTS_PERCENTAGE', 2); define('POINTS_MIN_SPEND', 5.00); ?> Quote Link to comment Share on other sites More sharing options...
Peace2u Posted January 24, 2015 Share Posted January 24, 2015 Dear all, I just have installed this addon and in the Admin I can't see the Ultimate SEO at module section or the configuration settings. I checked the forum, checked all files and changes, checked all files in the package...... no solution..... - OSC version 2.3.4 - MySQL 5.5.36 - PHP Version: 5.3.28 Could some one please give me some hints or help me to fix this? Kind greetings Quote Link to comment Share on other sites More sharing options...
Johnatan Posted January 29, 2015 Share Posted January 29, 2015 I'm having problem about showing my URL with USU5 I getting this: www.mydomain.com/subcategory/product-name-p-180 I want this: www.mydomain.com/category/subcategory/product-name-p-180 or www.mydomain.com/category/subcategory/product-name Is this possible?! please help ASAP thnx Quote Link to comment Share on other sites More sharing options...
tgely Posted January 29, 2015 Share Posted January 29, 2015 yes you can. Admin->Configuration->Seo Urls 5->Choose how your product link text is made upChoose how your product link text is made upProduct link text can be made up of:p = product namec = category nameb = manufacturer (brand)m = modele.g. bp (brand/product) and config the next: Admin->Configuration->Seo Urls 5->Add category parent to beginning of category uris?->true Add category parent to beginning of category uris?This setting will add the category parent name to the beginning of the category URLs (i.e. - parent-category-c-1.html). Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
Johnatan Posted January 29, 2015 Share Posted January 29, 2015 (edited) Thanks for your reply. I alredy done all this what you wrote but this not working for me at all. My product link is made up of: cp. Also I'm using path_rewrite mode. Add category parent to beginning of category uris is set to TRUE. But nothing happend. My URL's are the same mydomain.com/subcategory/product_name. There is no main category (mydomain.com/MAIN CATEGORY/subcategory/product_name). I think that "Add category parent to beginning of category uris" doesn't wotk for me, I mean nothing happen if I set it tu true or false?! Please, please could someone give me some direction what to look or where is the problem? thx in advance Edited January 29, 2015 by Johnatan Quote Link to comment Share on other sites More sharing options...
Johnatan Posted January 29, 2015 Share Posted January 29, 2015 If I click to main category and then to subcategory, I have URL for ex. mydomain.com/main_category/subcategory-c-1_16.html but when I click on product in this subcategory I get this mydomain.com/subcategory/product_name-p-105.html ?! Quote Link to comment Share on other sites More sharing options...
tgely Posted January 29, 2015 Share Posted January 29, 2015 Sorry its my fault. This is not work due to @see aPage_Modules::stripPathToLastNumber() Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
yomama360 Posted February 2, 2015 Share Posted February 2, 2015 Searched and scoured this forum and surprised no one else has this question / concern (or I couldn't find it). I have a 2.3.4 cart. On step 5 of the install for catalog/includes/application_top.php it says to find this code: // set php_self in the local scope $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']); But in my version all I can find is this: // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); I did a site wide search and cannot find anything that matches the "find this" code. I do have some mods, but they don't affect this code. I even checked a vanilla install of 2.3.4 and don't see that "find this" code.Should I just override it and move forward, or are there things I need to change so it works with 2.3.4?Anyone got this working error free on 2.3.4?Thanks Quote "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -- George Bernard Shaw Link to comment Share on other sites More sharing options...
yomama360 Posted February 6, 2015 Share Posted February 6, 2015 Update: for anyone in the same boat as me above. I went with the "Ultimate SEO URLs" (by Chemo) mod that this (FWR Media) mod is based on. It's found here:http://addons.oscommerce.com/info/2823The latest version of Chemo's mod (16 Jan, 2015) installed smoothly on my osC 2.3.4 cart with no conflicts. I'd still be interested if anyone makes this FWR Media work with 2.3.4 in the future. Quote "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -- George Bernard Shaw Link to comment Share on other sites More sharing options...
txigor Posted February 19, 2015 Share Posted February 19, 2015 Performance Problem, After a few years of happy working with the USU im facing a problem of database overload. As written on the instructions every time a product is updated the cache is reset. Now Im working with 2k online products and 9k total products and this reset causes a server overload. With only a product its afordable, but when updating 15 or 20 products one after another the server goes unresponsible. Is the cache reset a must do after an update? how can avoid this? Thanx Quote Link to comment Share on other sites More sharing options...
Guest Posted February 23, 2015 Share Posted February 23, 2015 Performance Problem, After a few years of happy working with the USU im facing a problem of database overload. As written on the instructions every time a product is updated the cache is reset. Now Im working with 2k online products and 9k total products and this reset causes a server overload. With only a product its afordable, but when updating 15 or 20 products one after another the server goes unresponsible. Is the cache reset a must do after an update? how can avoid this? Thanx Open \includes\modules\ultimate_seo_urls5\cache_system\cache and delete them all at one time Quote Link to comment Share on other sites More sharing options...
Guest Posted February 23, 2015 Share Posted February 23, 2015 Searched and scoured this forum and surprised no one else has this question / concern (or I couldn't find it). I have a 2.3.4 cart. On step 5 of the install for catalog/includes/application_top.php it says to find this code: // set php_self in the local scope $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']); But in my version all I can find is this: // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); I did a site wide search and cannot find anything that matches the "find this" code. I do have some mods, but they don't affect this code. I even checked a vanilla install of 2.3.4 and don't see that "find this" code. Should I just override it and move forward, or are there things I need to change so it works with 2.3.4? Anyone got this working error free on 2.3.4? Thanks I just wrote over it and works fine on windows 2012 . Quote Link to comment Share on other sites More sharing options...
clustersolutions Posted February 24, 2015 Share Posted February 24, 2015 I don't recall the details of the USU5 instructions on when to reset the cache, but I don't believe you have to reset it say if you just changed the description as the description isn't cached by USU5. Why don't you test the outcome of the changes you had made first before resetting the cache. Then even though if you had reset the cache the only issue you may encounter should only be the php memories limit error, which you would need to set it to a higher limit if you have a boat load of products. I suspect you may have other performance issue not related to USU5, and did you see any php warnings? I spent a week going throught the codes recently and resetting the cache as it suggested should only clear out the cache and the cache should be rebuild on demand as the server is serving URL requests. So if you server gets hit hard then you could see some performance issues. Keep an eye on the server stat after a cache reset and perhaps you would just need more hardware. Hey, if you have 9000 products I hope you are on a dedicated server for the least...hardware is must cheaper than any good consultant... Performance Problem, After a few years of happy working with the USU im facing a problem of database overload. As written on the instructions every time a product is updated the cache is reset. Now Im working with 2k online products and 9k total products and this reset causes a server overload. With only a product its afordable, but when updating 15 or 20 products one after another the server goes unresponsible. Is the cache reset a must do after an update? how can avoid this? Thanx Quote Link to comment Share on other sites More sharing options...
clustersolutions Posted February 24, 2015 Share Posted February 24, 2015 @@yomama360 giving up so easy!? Hey, you ask for it with that screen name...just comment out line 47 and 48 on your screen instead and implement the rest of the changes in application_top.php. The $PHP_SELF should be set by usu5_base_filename and you are good to go. I implemented USU5 in BS and its working fine...you can see the changes I made in application_top here... https://github.com/clustersolutions/osCommerce-234-bootstrap/commit/422d1b7b511377190cfcfb26087d015e1b7670f3#diff-afcc94946b036d003a770eb7f3afc89b USU5 works fine with header_tag and the non-FWR version of sitemap. I didn't even know FWR has a sitemap until recently....the site map I used isn't the best but it works for now... Searched and scoured this forum and surprised no one else has this question / concern (or I couldn't find it). I have a 2.3.4 cart. On step 5 of the install for catalog/includes/application_top.php it says to find this code: // set php_self in the local scope $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']); But in my version all I can find is this: // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); I did a site wide search and cannot find anything that matches the "find this" code. I do have some mods, but they don't affect this code. I even checked a vanilla install of 2.3.4 and don't see that "find this" code.Should I just override it and move forward, or are there things I need to change so it works with 2.3.4?Anyone got this working error free on 2.3.4?Thanks Update: for anyone in the same boat as me above. I went with the "Ultimate SEO URLs" (by Chemo) mod that this (FWR Media) mod is based on. It's found here:http://addons.oscommerce.com/info/2823The latest version of Chemo's mod (16 Jan, 2015) installed smoothly on my osC 2.3.4 cart with no conflicts. I'd still be interested if anyone makes this FWR Media work with 2.3.4 in the future. yomama360 1 Quote Link to comment Share on other sites More sharing options...
clustersolutions Posted February 24, 2015 Share Posted February 24, 2015 @@Johnatan, yeah, you only get the "next of kin" category with the existing USU5. By the comments in the codes what you wanted may have been on the todo list...I got what you wanted plus getting rid of that cPath thing working on a live system but I ran out of time to make it more robust...I wonder what happened to FWR? Thanks for your reply. I alredy done all this what you wrote but this not working for me at all. My product link is made up of: cp. Also I'm using path_rewrite mode. Add category parent to beginning of category uris is set to TRUE. But nothing happend. My URL's are the same mydomain.com/subcategory/product_name. There is no main category (mydomain.com/MAIN CATEGORY/subcategory/product_name). I think that "Add category parent to beginning of category uris" doesn't wotk for me, I mean nothing happen if I set it tu true or false?! Please, please could someone give me some direction what to look or where is the problem? thx in advance Quote Link to comment Share on other sites More sharing options...
marcochiana Posted March 1, 2015 Share Posted March 1, 2015 Hello, I'm using this contribution in heavy modified store version 2.3.4 in php 5.3 and all is fine, i'd like to upgrade php at 5.4 or better 5.5 I tried the solution posted by @@acidvertigo here http://www.oscommerce.com/forums/topic/336702-ultimate-seo-urls-5-by-fwr-media/page-183 but I received these messages Warning: SQLite3::query(): Unable to prepare statement: 1, no such table: usu_cache in C:\xampp\.........\includes\modules\ultimate_seo_urls5\main\usu5.php on line 308Fatal error: Call to a member function fetchArray() on a non-object in C:\xampp\......\includes\modules\ultimate_seo_urls5\main\usu5.php on line 309 there's someone that solve these problems? thanks a lot Marco Quote Link to comment Share on other sites More sharing options...
marcochiana Posted March 1, 2015 Share Posted March 1, 2015 Hello, solved my error, just reset the usu cache :blush: Marco acidvertigo 1 Quote Link to comment Share on other sites More sharing options...
broadstreetbully Posted March 2, 2015 Share Posted March 2, 2015 I'm trying to install this addon (v2.3.4) but in the first edit it says: FIND THIS CODE- // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); AND DIRECTLY AFTER ADD THIS- // Ultimate SEO URLs v2.2d if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) { include_once(DIR_WS_CLASSES . 'seo.class.php'); if ( !is_object($seo_urls) ){ $seo_urls = new SEO_URL($languages_id); } } but the code I need to edit doesn't show that, it shows this (below) and when I edit/add the code after it knocks out the buttons in my header. I really need this addon... // 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) here's the code from my application_top.php: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ // start the timer 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'); } if (strlen(DB_SERVER) < 1) { if (is_dir('install')) { header('Location: install/index.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 == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); // Security Pro by FWR Media include_once DIR_WS_MODULES . 'fwr_media_security_pro.php'; $security_pro = new Fwr_Media_Security_Pro; // If you need to exclude a file from cleansing then you can add it like below //$security_pro->addExclusion( 'some_file.php' ); $security_pro->cleanse( $PHP_SELF ); // End - Security Pro by FWR Media if ($request_type == 'NONSSL') { define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); } else { define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG); } // 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'); // 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 the application 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']); } // if gzip_compression is enabled, start to buffer the output if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && !headers_sent() ) { if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) { if (PHP_VERSION < '5.4' || PHP_VERSION > '5.4.5') { // see PHP bug 55544 if (PHP_VERSION >= '4.0.4') { ob_start('ob_gzhandler'); } elseif (PHP_VERSION >= '4.0.1') { include(DIR_WS_FUNCTIONS . 'gzip_compression.php'); ob_start(); ob_implicit_flush(); } } } elseif (function_exists('ini_set')) { ini_set('zlib.output_compression_level', GZIP_LEVEL); } } // set the HTTP GET parameters manually if search_engine_friendly_urls is enabled if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') { if (strlen(getenv('PATH_INFO')) > 1) { $GET_array = array(); $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF); $vars = explode('/', substr(getenv('PATH_INFO'), 1)); do_magic_quotes_gpc($vars); for ($i=0, $n=sizeof($vars); $i<$n; $i++) { if (strpos($vars[$i], '[]')) { $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1]; } else { $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1]; } $i++; } if (sizeof($GET_array) > 0) { while (list($key, $value) = each($GET_array)) { $HTTP_GET_VARS[$key] = $value; } } } } // define general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.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); // include cache functions if enabled if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php'); // include shopping cart class require(DIR_WS_CLASSES . 'shopping_cart.php'); // include navigation history class require(DIR_WS_CLASSES . 'navigation_history.php'); // define how the session functions will be used require(DIR_WS_FUNCTIONS . 'sessions.php'); // set the session name and save path tep_session_name('osCsid'); 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); // set the session ID if it exists if ( SESSION_FORCE_COOKIE_USE == 'False' ) { if ( isset($HTTP_GET_VARS[tep_session_name()]) && (!isset($HTTP_COOKIE_VARS[tep_session_name()]) || ($HTTP_COOKIE_VARS[tep_session_name()] != $HTTP_GET_VARS[tep_session_name()])) ) { tep_session_id($HTTP_GET_VARS[tep_session_name()]); } elseif ( isset($HTTP_POST_VARS[tep_session_name()]) && (!isset($HTTP_COOKIE_VARS[tep_session_name()]) || ($HTTP_COOKIE_VARS[tep_session_name()] != $HTTP_POST_VARS[tep_session_name()])) ) { tep_session_id($HTTP_POST_VARS[tep_session_name()]); } } // start the session $session_started = false; if (SESSION_FORCE_COOKIE_USE == 'True') { tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain); if (isset($HTTP_COOKIE_VARS['cookie_test'])) { tep_session_start(); $session_started = true; } } elseif (SESSION_BLOCK_SPIDERS == 'True') { $user_agent = strtolower(getenv('HTTP_USER_AGENT')); $spider_flag = false; if (tep_not_null($user_agent)) { $spiders = file(DIR_WS_INCLUDES . 'spiders.txt'); for ($i=0, $n=sizeof($spiders); $i<$n; $i++) { if (tep_not_null($spiders[$i])) { if (is_integer(strpos($user_agent, trim($spiders[$i])))) { $spider_flag = true; break; } } } } if ($spider_flag == false) { tep_session_start(); $session_started = true; } } else { tep_session_start(); $session_started = true; } if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) { extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS); } // initialize a session token if (!tep_session_is_registered('sessiontoken')) { $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); tep_session_register('sessiontoken'); } // set SID once, even if empty $SID = (defined('SID') ? SID : ''); // verify the ssl_session_id if the feature is enabled if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) { $ssl_session_id = getenv('SSL_SESSION_ID'); if (!tep_session_is_registered('SSL_SESSION_ID')) { $SESSION_SSL_ID = $ssl_session_id; tep_session_register('SESSION_SSL_ID'); } if ($SESSION_SSL_ID != $ssl_session_id) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_SSL_CHECK)); } } // verify the browser user agent if the feature is enabled if (SESSION_CHECK_USER_AGENT == 'True') { $http_user_agent = getenv('HTTP_USER_AGENT'); if (!tep_session_is_registered('SESSION_USER_AGENT')) { $SESSION_USER_AGENT = $http_user_agent; tep_session_register('SESSION_USER_AGENT'); } if ($SESSION_USER_AGENT != $http_user_agent) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_LOGIN)); } } // verify the IP address if the feature is enabled if (SESSION_CHECK_IP_ADDRESS == 'True') { $ip_address = tep_get_ip_address(); if (!tep_session_is_registered('SESSION_IP_ADDRESS')) { $SESSION_IP_ADDRESS = $ip_address; tep_session_register('SESSION_IP_ADDRESS'); } if ($SESSION_IP_ADDRESS != $ip_address) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_LOGIN)); } } // create the shopping cart if (!tep_session_is_registered('cart') || !is_object($cart)) { tep_session_register('cart'); $cart = new shoppingCart; } // include currencies class and create an instance require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // include the mail classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // 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']; } // 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) // currency if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) { if (!tep_session_is_registered('currency')) tep_session_register('currency'); if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) { $currency = $HTTP_GET_VARS['currency']; } else { $currency = ((USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && $currencies->is_set(LANGUAGE_CURRENCY)) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } // navigation history if (!tep_session_is_registered('navigation') || !is_object($navigation)) { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); // action recorder include('includes/classes/action_recorder.php'); // Shopping cart actions if (isset($HTTP_GET_VARS['action'])) { // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled if ($session_started == false) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = $PHP_SELF; if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } switch ($HTTP_GET_VARS['action']) { // customer wants to update the product quantity in their shopping cart case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) { if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) { $cart->remove($HTTP_POST_VARS['products_id'][$i]); } else { $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : ''; $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : ''; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; // customer removes a product from their shopping cart case 'remove_product' : if (isset($HTTP_GET_VARS['products_id'])) { $cart->remove($HTTP_GET_VARS['products_id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; case 'notify' : if (tep_session_is_registered('customer_id')) { if (isset($HTTP_GET_VARS['products_id'])) { $notify = $HTTP_GET_VARS['products_id']; } elseif (isset($HTTP_GET_VARS['notify'])) { $notify = $HTTP_GET_VARS['notify']; } elseif (isset($HTTP_POST_VARS['notify'])) { $notify = $HTTP_POST_VARS['notify']; } else { tep_redirect(tep_href_link($PHP_SELF, tep_get_all_get_params(array('action', 'notify')))); } if (!is_array($notify)) $notify = array($notify); for ($i=0, $n=sizeof($notify); $i<$n; $i++) { $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$notify[$i] . "' and customers_id = '" . (int)$customer_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['count'] < 1) { tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . (int)$notify[$i] . "', '" . (int)$customer_id . "', now())"); } } tep_redirect(tep_href_link($PHP_SELF, tep_get_all_get_params(array('action', 'notify')))); } else { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) { $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int)$customer_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int)$customer_id . "'"); } tep_redirect(tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')))); } else { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) { if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid'])); } else { $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; } } // include the who's online functions require(DIR_WS_FUNCTIONS . 'whos_online.php'); tep_update_whos_online(); // include the password crypto functions require(DIR_WS_FUNCTIONS . 'password_funcs.php'); // include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // infobox require(DIR_WS_CLASSES . 'boxes.php'); // auto activate and expire banners require(DIR_WS_FUNCTIONS . 'banner.php'); tep_activate_banners(); tep_expire_banners(); // auto expire special products require(DIR_WS_FUNCTIONS . 'specials.php'); tep_expire_specials(); require(DIR_WS_CLASSES . 'osc_template.php'); $oscTemplate = new oscTemplate(); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } 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; } // include the breadcrumb class and start the breadcrumb trail require(DIR_WS_CLASSES . 'breadcrumb.php'); $breadcrumb = new breadcrumb; $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; ?> everything else there & matches... Quote Link to comment Share on other sites More sharing options...
Supertex Posted March 3, 2015 Share Posted March 3, 2015 Try adding it right after /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
mikus Posted March 4, 2015 Share Posted March 4, 2015 Hello, I'm hoping someone could help. Simply trying to modify the code to use a new column I created in the products description table to build the Url's instead of using the product name. New column name in products_description table products_seo_url withing the file: product_info.php catalog\includes\modules\ultimate_seo_urls5\page_modules > product_info.php I modified the query to pull this new column instead of product_name. However, when i update the code i receive a different error below. Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338 I then navigate to the page_modules.php file and I don't see anywhere I can modify anything to make this work with the new column. Any thoughts of getting this simple adjustment to work? Quote Link to comment Share on other sites More sharing options...
mikus Posted March 4, 2015 Share Posted March 4, 2015 Hello, I'm hoping someone could help. Simply trying to modify the code to use a new column I created in the products description table to build the Url's instead of using the product name. New column name in products_description table products_seo_url withing the file: product_info.php catalog\includes\modules\ultimate_seo_urls5\page_modules > product_info.php I modified the query to pull this new column instead of product_name. However, when i update the code i receive a different error below. Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338 I then navigate to the page_modules.php file and I don't see anywhere I can modify anything to make this work with the new column. Any thoughts of getting this simple adjustment to work? Disregard, i was able to get this working. Thanks Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted March 6, 2015 Share Posted March 6, 2015 (edited) @@greasemonkey Hi Scott I though we continue our discussion regarding SEO URL here in the FWR topic. I don't want to clutter up your modify BS topic. I just installed this USU by FWR on a clean 2015.3.6 BS shop running on a XAMPP php 5.5.19 server. 1.) There is a part in the install missing regarding the rewrite rules for htaccess But thanks to clustersolutions github I could copy& paste it from there. 2.) the install seems a bit more tedious then the Chemo version but only a tiny bit. 3.) what is the difference anyway between those 2? Besides that this one here (FWR) is not really supported. 4.) Reading through this topic I saw that some had trouble regarding the cache. I can't confirm that....since I don't test in a real server environment with many products. I myself gonna stick with Chemo's version since Jack_mcs supports that version and it didn't let me down so far on my current non-BS shop. FWR's version includes a sitemap feature which i didn't test. Anyway, which ever version you choose (FWR or Chemo) both seem to run fine on a php 5.5.19 server. Edited March 6, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
cdetdi Posted March 11, 2015 Share Posted March 11, 2015 I have SEO URLs working properly for standard configuration, however, when I try to enable Header Tags as SEO name I get an error on the first page load. Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /home/idp2/idp2.didyoube.com/includes/classes/seo.class.php on line 152 Then, all my products lose the SEO friendliness, instead just using the product id, e.g. "-p-28.html" I have header tags installed, so I wondered what was going on. Admittedly, I am not very familiar with how this module functions, but, a cursory glance turned up something (which may be nothing) In function generate_products_cache line 2015 is this: $sqlCmd = $this->attributes['USE_SEO_HEADER_TAGS'] == 'true' ? 'IF(pd.products_head_title_tag_url !="",pd.products_head_title_tag_url,pd.products_name) as name' : 'pd.products_name as name'; In my version of header tags, there is no products_head_title_tag_url in products_description. Rather, there is a products_seo_title. I changed all the products_head_tag_url references to products_seo_title and things seem to be working. Have I hack-created a frankenstein here by forcing two modules that weren't supposed to go together? Am I working with the wrong version of the header tags module? Quote Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference. Link to comment Share on other sites More sharing options...
broadstreetbully Posted March 14, 2015 Share Posted March 14, 2015 I have this installed and it seems to be working correctly except that the product name in the tab is wrong. like for "brown paint can" that I'm viewing on the product page reads "blue paint can" in the tab... how can I fix this? Quote Link to comment Share on other sites More sharing options...
headline-dbs Posted March 31, 2015 Share Posted March 31, 2015 Dear FWR, I am having the folling error when I run cron of usu5_sitemaps/index.php: PHP Fatal error: Call to a member function retrieveDependencies() on a non-object in /....l/includes/modules/ultimate_seo_urls5/uri_modules/rewrite.php on line 84 I get the same error in connection with PayPal Express How can I fix this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.