Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] SEO-G


Guest

Recommended Posts

Enigma. Great work here. Totally blows away seo-url's across the boards.

 

In the manual it states "The page split is the number of entries to display for the SEO-G pages." I have looked through the forums trying to understand this.

 

I have a category with 58 products in it. It currently splits at 30, but my SEO-G config is set to: "SEO-G Listings Split 100".

 

What is this setting? Do I need to be concerned about Google picking up the other 28 products on the "Next" page?

 

Please help me understand this setting's significance and what it is supposed to help with SEO.

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

I keep seeing googlebot on my site and it is looking at urls constructed like the following:

 

"/product_info.php?products_id=263&page=1&sort=5d"

 

How is it picking up the product_info.php page at all with SEO-G installed?

 

From the front end as I click around I am getting nothing but the perfect formed SEO-G html pages.

 

Note: I do have the sort for product listing split fix installed as noted in the manual.

Edited by zelf
Link to comment
Share on other sites

Thanks Andrea!

 

I'll try this once I have some time to dedicate to it. I guess it really doesnt bother me if the feed is sent with ugly urls. I am just wanting to use it for SEO purposes. As long as the old URLs are still working with it, its fine with me :)

Link to comment
Share on other sites

I keep seeing googlebot on my site and it is looking at urls constructed like the following:

 

"/product_info.php?products_id=263&page=1&sort=5d"

 

How is it picking up the product_info.php page at all with SEO-G installed?

 

From the front end as I click around I am getting nothing but the perfect formed SEO-G html pages.

 

Note: I do have the sort for product listing split fix installed as noted in the manual.

 

 

It is quite possible that I'm wrong here, but could it just be that your whos online is still showing the old url in its views, but google is actually seeing the new ones?

Link to comment
Share on other sites

It is quite possible that I'm wrong here, but could it just be that your whos online is still showing the old url in its views, but google is actually seeing the new ones?

 

I considered that, but any other visitor besides googlebot is showing SEO-G formed urls in whos online. Maybe googlebot picked up a page while I was transitioning from seo-urls to seo-g. When googlebot is on your site does the whos online show seo-g formed urls or osc stock urls?

Link to comment
Share on other sites

In the manual it states "The page split is the number of entries to display for the SEO-G pages." I have looked through the forums trying to understand this.

 

Oh boy. It's referring to the number to display in the backend administration area for url's. Has nothing to do with the front end. My bad.

Link to comment
Share on other sites

I've just installed in on one site. That was way too easy, makes me think I did something wrong or its gonna crash! I'm not used to a mod working right off the bat!

 

It appears as though my whos online is showing the correct urls (the seo-g generated ones), however, I have whosonline 3.2 installed, maybe thats the difference

Edited by theantiquestore
Link to comment
Share on other sites

On the front end of the site when they are 60 products in a category and the split is set to 30 you get the stock osc previous and next page links.

 

These next and previous links on split page results do not have SEO-G formed urls. Did I miss an install step or is there a way to form the urls such as ...

 

http://www.mydomain.com/something.html = Page 1

http://www.mydomain.com/something_2.html = Page 2 (Url on the next link)

 

... and so on and so forth.

Link to comment
Share on other sites

Puggy,

 

I see you changed the redirect from cookie_usage, where did you do that?

 

Also, for some reason my manufacturer pages urls are not changing, darn if i can see why. Any suggestions?

Edited by theantiquestore
Link to comment
Share on other sites

I've fixed the manufacturer issue by installing the css manufacturers box mod. I would have preferred the dropdown box but it'll do.

 

I also changed the cookie_usage to index.php.

 

Now for some reason, I cant figure out how to get any changes I've made to the gzones to show up on the site. Is there somewhere to refresh the urls that I've missed?

 

Has anyone used this with chemos google sitemap generator?

 

I also seem to be having an issue with the tell a friend page, I would like it to show "tell a friend" in the url but not sure how to do that.

 

It seems to show the category name in the url sometimes, sometimes not.

 

Looks like I'd have a duplicate content issue with some of the urls.

 

Also, I have noticed google is spidering my old urls, I would assume its coming directly from my current sitemap (chemos google xml sitemaps) and its not seeing the new url.

Edited by theantiquestore
Link to comment
Share on other sites

Theantiquestore: I don't know what you mean by G-Zones. I only see this in Admin:

 

Configuration

G-Types

G-Controller

G-Exclude

G-Reports

G-Redirects

 

What do you mean by G-Zones?

 

As for seeing Google still crawling old urls...that will take time to change. Be glad they're crawling. LOL.

 

The sitemap...if you click on G-Reports you'll see a button to generate a Google Sitemap. You'll also see a box to select to Notify Google. I never got that working. I can generate a sitemap if I just click the Google XML button, and save what it generates to my hard drive. But, if I tick the Notify Google box...I get errors onscreen.

 

The problem, too, with the Google XML button is that it appears to pull its info from G-Reports. Which means...the old, unfriendly URLs are picked up in the file it creates. Not to mention, duplicate content. Multiple URLs for the same page or product.

 

I downloaded and saved the file to my hard-drive....and then manually edited it to get rid of all URLs that I did not want appearing in the sitemap. No small job, either, having over 2500 items in my site at that point. And then I manually uploaded the sitemap to Google.

 

Whenever I create new listings now, which is almost daily...I open that XML file and manually edit it and add the new links to the file. Then I upload it and write over the existing file. There's got to be an easier way...I just haven't figured it out. I want nothing but the new links in the sitemap. I'm in hell, really. :)

 

Not all of your categories are showing .html extensions?

 

I don't know what to say about that. If you 'imported' all of your categories like you should...they all should have .html extensions. Name-Of-Category.html.

 

I'd go play with that again. Investigate what did get picked up versus what did not.

 

Isn't there some documentation within the contrib regarding Tell-A-Friend? I could swear I saw something about that. I just remember skipping over that because I don't care enough about it to bother.

 

Andrea

Link to comment
Share on other sites

hello,

 

first sorry for may bad english.

i have a big problem with seo-G, i have read all 45 sites. there a lot of peopel with the same problem but for me are the fixes not working. :'(

 

i have removed other contribs such as ultimate seo urls, friendly urls. because seo-g support information unlimited (v1.20) other contribs work fine but seo-g will not working.

 

the problem:

1.every page redirect to cookie usage

2. urls are not rewriting with correct names /index_cpath-26_34.html

3. when i update information.php in controller and i click on validate gives me an sql error other pages are correct

 

i have read a lot in last days for the problem 1 & 2 but i have check teh install 100 times ^^ and the fixes dont work.

i dont know what i can make, i post my files and i hope somwhere find an error.

 

root.php

 

<?php

/*

//----------------------------------------------------------------------------

// Copyright © 2006-2007 Asymmetric Software - Innovation & Excellence

// Author: Mark Samios

// http://www.asymmetrics.com

// SEO-G Root page

// Main handler script

// Includes part of the includes/application_top.php from osCommerce to

// initialize the database.

//----------------------------------------------------------------------------

// Script is intended to be used with:

// osCommerce, Open Source E-Commerce Solutions

// http://www.oscommerce.com

// Copyright © 2003 osCommerce

//----------------------------------------------------------------------------

// Released under the GNU General Public License

//----------------------------------------------------------------------------

// MAKE SURE THE FOLLOWING SECTION IS COPIED DIRECTLY FROM YOUR OWN

*/

//----------------------------------------------------------------------------

//-MS- Beginning of application_top.php section

//----------------------------------------------------------------------------

// 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 if register_globals is enabled.

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.

if (function_exists('ini_get')) {

ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

}

 

// Set the local configuration parameters - mainly for developers

if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

 

// include server parameters

require('includes/configure.php');

 

if (strlen(DB_SERVER) < 1) {

if (is_dir('install')) {

header('Location: install/index.php');

}

}

 

// define the project version

define('PROJECT_VERSION', 'osCommerce 2.2-MS2');

 

// set the type of request (secure or not)

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

 

// set php_self in the local scope

if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

 

if ($request_type == 'NONSSL') {

define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);

$g_relpath = HTTP_SERVER . DIR_WS_CATALOG;

$g_server = HTTP_SERVER;

} else {

define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);

$g_relpath = HTTPS_SERVER . DIR_WS_CATALOG;

$g_server = HTTPS_SERVER;

}

 

// 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');

 

// customization for the design layout

define('BOX_WIDTH', 150); // how wide the boxes should be in pixels (default: 125)

 

// 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']);

}

 

//----------------------------------------------------------------------------

//-MS- End of application_top.php section

//----------------------------------------------------------------------------

 

//----------------------------------------------------------------------------

// SEO-G Section starts here. This part is required for proper operation

// Do not override the code below

//----------------------------------------------------------------------------

require(DIR_WS_CLASSES . 'seo_url.php');

$g_seo_url = new seoURL;

$osc_url = $osc_params = $osc_parse = '';

if( $g_seo_url->get_osc_url($g_server . $_SERVER['REQUEST_URI'], $osc_url, $osc_params, $osc_parse) ) {

$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'] = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $osc_parse['path'];

if(basename($_SERVER['PHP_SELF']) == 'root.php' ) {

echo '<b>SEO-G Error</b>: Invalid Self-Request - Check recorded URLs';

exit();

}

$tmp_array = array();

for($i=0, $j=count($osc_params); $i<$j; $i++ ) {

$array_equal = explode('=', $osc_params[$i]);

if( is_array($array_equal) ) {

if( isset($array_equal[1]) ) {

$tmp_array[$array_equal[0]] = $array_equal[1];

} else {

$tmp_array[$array_equal[0]] = '';

}

}

}

$tmp_array = array_merge($HTTP_GET_VARS,$tmp_array);

// Synchronize global arrays.

$HTTP_GET_VARS = $_GET = $tmp_array;

unset($tmp_array);

// Synchronize query string variables

$HTTP_SERVER_VARS['QUERY_STRING'] = $_SERVER['QUERY_STRING'] = implode('&',$osc_params);

$g_script = basename($PHP_SELF);

// Signal SEO-G translation.

$g_seo_flag = true;

require(basename($PHP_SELF));

} elseif( file_exists(basename($osc_parse['path']))) {

$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'] = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $osc_parse['path'];

if(basename($_SERVER['PHP_SELF']) == 'root.php' ) {

echo '<b>SEO-G Error</b>: Invalid Self-Request, passed URI Request: ' . $_SERVER['REQUEST_URI'];

exit();

}

$g_script = basename($PHP_SELF);

$g_seo_flag = true;

require(basename($osc_parse['path']));

} else {

// Script not found. Initiate redirection

header("HTTP/1.1 " . SEO_DEFAULT_ERROR_HEADER);

header('Location: ' . $g_relpath . SEO_DEFAULT_ERROR_REDIRECT);

//echo STORE_NAME . ' - Page was moved';

}

exit();

?>

----------------------------------------------------------------

.hataccess

 

 

Options +FollowSymLinks

RewriteEngine On

 

RewriteBase /

RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}

-----------------------------------------------------------------------

 

application_top.php

 

<?php

/*

$Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Start ship2pay

define('TABLE_SHIP2PAY','ship2pay');

 

//-MS- SEO-G Added

if( !isset($g_seo_flag) || $g_seo_flag !== true) {

 

// 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 if register_globals is enabled.

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.

if (function_exists('ini_get')) {

ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

}

 

// Set the local configuration parameters - mainly for developers

if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

 

// include server parameters

require('includes/configure.php');

 

if (strlen(DB_SERVER) < 1) {

if (is_dir('install')) {

header('Location: install/index.php');

}

}

 

// define the project version

define('PROJECT_VERSION', 'osCommerce 2.2-MS2');

 

// set the type of request (secure or not)

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

 

// set php_self in the local scope

if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

 

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');

 

// customization for the design layout

define('BOX_WIDTH', 150); // how wide the boxes should be in pixels (default: 125)

 

// 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']);

}

//-MS- SEO URLs Support Added

require(DIR_WS_CLASSES . 'seo_url.php');

$g_seo_url = new seoURL;

//-MS- SEO URLs Support Added EOM

 

}

//-MS- SEO-G Added EOM

 

// if gzip_compression is enabled, start to buffer the output

if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {

if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {

if (PHP_VERSION >= '4.0.4') {

ob_start('ob_gzhandler');

} else {

include(DIR_WS_FUNCTIONS . 'gzip_compression.php');

ob_start();

ob_implicit_flush();

}

} else {

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));

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');

 

// some code to solve compatibility issues

require(DIR_WS_FUNCTIONS . 'compatibility.php');

 

// check if sessions are supported, otherwise use the php3 compatible session class

if (!function_exists('session_start')) {

define('PHP_SESSION_NAME', 'osCsid');

define('PHP_SESSION_PATH', $cookie_path);

define('PHP_SESSION_DOMAIN', $cookie_domain);

define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);

 

include(DIR_WS_CLASSES . 'sessions.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);

}

 

// set the session ID if it exists

if (isset($HTTP_POST_VARS[tep_session_name()])) {

tep_session_id($HTTP_POST_VARS[tep_session_name()]);

} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {

tep_session_id($HTTP_GET_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;

}

 

// 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 & fix the cart if necesary

if (tep_session_is_registered('cart') && is_object($cart)) {

if (PHP_VERSION < 4) {

$broken_cart = $cart;

$cart = new shoppingCart;

$cart->unserialize($broken_cart);

}

} else {

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

require(DIR_WS_LANGUAGES . $language . '.php');

 

// 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'])) {

if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

 

// 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 = basename($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 {

if (PHP_VERSION < 4) {

// if PHP3, make correction for lack of multidimensional array.

reset($HTTP_POST_VARS);

while (list($key, $value) = each($HTTP_POST_VARS)) {

if (is_array($value)) {

while (list($key2, $value2) = each($value)) {

if (ereg ("(.*)\]\[(.*)", $key2, $var)) {

$id2[$var[1]][$var[2]] = $value2;

}

}

}

}

$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$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'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['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(basename($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 = '" . $notify[$i] . "' and customers_id = '" . $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 ('" . $notify[$i] . "', '" . $customer_id . "', now())");

}

}

tep_redirect(tep_href_link(basename($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 = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

$check = tep_db_fetch_array($check_query);

if ($check['count'] > 0) {

tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

}

tep_redirect(tep_href_link(basename($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();

 

// 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;

 

// set which precautions should be checked

define('WARN_INSTALL_EXISTENCE', 'true');

define('WARN_CONFIG_WRITEABLE', 'true');

define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

define('WARN_SESSION_AUTO_START', 'true');

define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

 

include('includes/forum_application_top.php');

define('MAIN_CATEGORIES', 'main_categories.php');

?>

 

-----------------------------------------------------------------

configure.php

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.kcm-sys.de/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'kcm-sys.de');

define('HTTPS_COOKIE_DOMAIN', 'kcm-sys.de');

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/var/www/vhosts/kcm-sys.de/httpdocs/');

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', 'xxxxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxxxxx');

define('DB_DATABASE', 'xxxxxx');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

 

------------------------------------------------------

 

thx and greats hannes

Link to comment
Share on other sites

First up: Great Mod, congradats to the author! I have a few questions though:

 

1) At the begining of every browser session, the first product, category link, etc. that I click on displays the original url, but any link after that shows the proper seo url. Why is this? I have no additional mods that would affect this, and I have the default settings set-up except that I enabled seo-g urls.

 

2) I noticed this mod displays the url in title, is there a way to change this? Can this be used in conjuction with any other meta tag geneartor mods?

 

3) Is there any mod I can safely used to create a sitemap page that I can add to my website that will work seo-g mod?

 

Thanks again, and great work!!

Link to comment
Share on other sites

The G-Zones is under G-controller. I was able to get the urls to work correctly after I deleted them all in the G-Reports and let them repopulate.

 

I still didnt get the tell a friend to work, but I ended up turning it off for now since I dont have time to play with it.

 

I am just a hack, so it takes me a little longer to wrap my brain around these mods to get them to be friendly with my heavily hacked site. Once I have some time I'd really like to get it to work, it was a very easy install. My biggest issues are with the sitemap and tell a friend.

Link to comment
Share on other sites

The G-Zones is under G-controller. I was able to get the urls to work correctly after I deleted them all in the G-Reports and let them repopulate.

 

I still didnt get the tell a friend to work, but I ended up turning it off for now since I dont have time to play with it.

 

I am just a hack, so it takes me a little longer to wrap my brain around these mods to get them to be friendly with my heavily hacked site. Once I have some time I'd really like to get it to work, it was a very easy install. My biggest issues are with the sitemap and tell a friend.

 

After a lot cup of coffes and 1 pack malboro ^^ i can fix the sql error (error in admin whne call information.php) and i see urls are working after delete/refresh.

 

first as info for all user from information pages unlimited!!

 

in phpmyadmin find in information tabelle the field imformation titel and information description tu utf8_general_ci then the work admin with information.php

 

only the cookie usage php make me crazy........ :'(

 

i have no idea more, but i need the contrib :(

 

 

or know anyone a contrib that url rewrite and with information pages+metas work ?

ultimate seo urls have problems with info managers, but by me are 75% of the content inside of info managers :(

 

 

one thing i cant understand.

 

come the cookie error why the the urls not found ? (urls show correct & rewrited) and then redirect or

is it a generall error called from unkwon code or bug ?

 

where can i disbaled cookie usage page ? under admin-config-seesons the are of false (spider on)

 

 

thx and greats hannes

Link to comment
Share on other sites

Hi Rachael: Okay. I get it now.

 

When you click on G-Controller the screen loads as G-Zones. That's where the confusion was on my part. I'm sitting here looking for a G-Zones entry to click on and...there is none.

 

What exactly are you trying to accomplish with Tell A Friend? Get the URL to show up as...tell_a_friend.html?

 

If I click on a product listing and then click on the Tell A Friend box in my site...I get something like this:

 

www.mysite.com/tell_a_friend.html?to_email_address=&products_id=9999&x=5&y=6

 

What are you seeing in your site? And I guess the big question would be...what's the big deal?

 

SEO-G is designed, I feel, to make your product listings and information pages more SEO friendly. Does it really matter if the Tell A Friend box has an appendage on the end of it? I don't think anyone gives a *** over our Tell A Friend boxes, you know?

 

I think this is all about having our product listings stop reading as mysite.com/product_info.php blah blah blah and create some recognizable, user friendly content within the body of those URLs. Same thing with the info pages...I don't understand why you're worked up over Tell A Friend. It's got to be one of the LEAST important parts of your website. Just my opinion!

 

Andrea

Link to comment
Share on other sites

On my site, I've changed the tell a friend to a link rather than a box, so when someone clicks the tell a friend link in the product page the url is exactly the same as the product. There is no change between the product url and the tell a friend url. Probably just an error for my site. I'll look it to it further.

Link to comment
Share on other sites

Hello everyone,

 

I cant find a solution for my problem on this thread. When i have SEO_G on i cannot add products to the cart. The cart still be empty when i add one. But when I exclude product_info.php then there is no problem. But de link will not be converted. it will show www.mycompany.com/product_info.php?products_id=

 

Is there a fix for this?

 

Thnx in advanced,

 

Ronald

Link to comment
Share on other sites

I need help please!! I just installed seo-g but I can't access my admin area, I get redirected to the cockie usage page. But I have cookies enabled. What gives? Please help!!

 

 

I found my error. I installed the first version of seo g. I reinstalled the latest version and it works great. I have only one question: in the configuration page I have double entries for master switch, extension, error header, redirect, parts separator, words separator, inner separator, and listing split. Although I think the settings are working (they are for master switch) I'm not sure if I should be concerned. Any thoughts. I ran the database script twice, once for the v1.0 and a second time for the latest version. Is this why there is a problem? I'm of the opinion if it ain't broken, don't fix it. However, I just hope there isn't a conflict later. Anyways, great contribution.

Link to comment
Share on other sites

Hi Max: I did that once, with Credit Class Gift Voucher. I had duplicate entries in Admin.

 

If you use Cpanel and can use PHPmyadmin.....login and select your database and then look at the configuration entries for SEO-G. Select and delete the duplicate(s).

 

I don't know enough to say whether or not it's a cosmetic issue or it's something that needs to be taken care of. I just figure...if I install something and I end up with duplicate entries in Admin...it needs to be fixed. So, I fix it.

 

Andrea

Link to comment
Share on other sites

Hi,

 

I lik ethe concept of this contrib, however after fully isnatlling it i go to the admin SEO-G and it just seems to be in an endless loop?

 

Also if i goto my admin/Orders i get sql error this latter error seems to do with orders so i am not sure why it has started after installation of SEO-G??

 



Customers Order Total Date Purchased Status Action  
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 '*) as total from (orders o left join orders_total ot on (o.orders_id = ot.order' at line 1

select count(distinct *) as total from (orders o left join orders_total ot on (o.orders_id = ot.orders_id), stores st, orders_status s ) where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' and o.orders_stores_id = st.stores_id   

Link to comment
Share on other sites

hi there, i just isntalled this: http://addons.oscommerce.com/info/4589 the CSS MENU

 

and now all my links when clicked on the menu, load to a page with this error:

 

Fatal error: Call to undefined function: read_cache() in /home/puregnet/public_html/shop/includes/classes/url_rewrite.php on line 215

 

 

(had to disable cache for the menu to work)

 

does anyone know what i can do to make this contribution work with SEOG?

 

 

thank you

Edited by pure11
Link to comment
Share on other sites

Are you sure you're using SEO-G?

 

I don't see any catalog>includes>classes>url_rewrite.php in my file structure at all.

 

Perhaps that's something related to what you installed recently?

 

I see no such file in my directory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...