Jump to content
Sign in to follow this  
enigma1

[Contribution] SEO-G

Recommended Posts

has anybody installed this on osc RC1? I was able to get everything working on the latest milestone, but can not get it to work with RC1

you will have to port the new application_top.php into the root.php. Just follow the manual instructions. If you see errors you need to specify what is the error.

Share this post


Link to post
Share on other sites

Its weird, I installed this on a clean copy of RC1 and keep getting errors saying it could not read the database table, each time its a different table, and now all I am just getting 404 errors. and no more of the database errors.

 

like I said weird, but I am gonna go through all my edits again and see what happens


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites
Its weird, I installed this on a clean copy of RC1 and keep getting errors saying it could not read the database table, each time its a different table, and now all I am just getting 404 errors. and no more of the database errors.

 

like I said weird, but I am gonna go through all my edits again and see what happens

ok FYI is fully operational with RC1 I have integrated the code. The only thing was to change the root.php to use the updated section from the RC1 application_top.php Everything else stays the same.

 

New installations require the SEO-G .htaccess mods so don't forget that step.

Share this post


Link to post
Share on other sites

okay well I got everything straight, site corrected itself...... weird.....

 

1 question though as I noticed this on my install with osc MS 2.2 as well as RC1 some of the urls do not generate properly meaning instead of swat-3-close-quarters-battle.htm instead of swat_3_close_quarters_battle.htm is this because the words are too long?

 

In the config section I have it set to _


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites
okay well I got everything straight, site corrected itself...... weird.....

 

1 question though as I noticed this on my install with osc MS 2.2 as well as RC1 some of the urls do not generate properly meaning instead of swat-3-close-quarters-battle.htm instead of swat_3_close_quarters_battle.htm is this because the words are too long?

 

In the config section I have it set to _

if you change the separators while products, categories, manufacturers etc are already recorded you will have to rebuild them. So use the G-Controller and delete the products, categories etc as well as the reports. Once you do that you should see the current configured separators working.

Edited by enigma1

Share this post


Link to post
Share on other sites
ok FYI is fully operational with RC1 I have integrated the code. The only thing was to change the root.php to use the updated section from the RC1 application_top.php Everything else stays the same.

 

to do this just copy all the code in the application.php file in between the SE0-G code to the root.php file?


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites
to do this just copy all the code in the application.php file in between the SE0-G code to the root.php file?

here is an example

seog_rc1.jpg

Share this post


Link to post
Share on other sites

Thanks for all the help, I just wanted to make sure before I did anything. This is a great contrib and everybody should be using it

Edited by Eighteen48

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites

I ported the new code from the application.php file to the root.php file and now the cookie usage page is showing, but when I used the root.php without the added code it works fine.

 

Do you have any ideas?


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites

I had the cookie usage page too. Copied the original code from application_top.php and then inserted it into the root.php but still the same problem.

Share this post


Link to post
Share on other sites

here's an oddity...

 

When I add a product with attributes to the cart, the link generated in the shopping cart box has the attribute compiling info in it, instead of being the product name. An example would look like "mysite.com/shop/product_info.php?products_id=165{2}137" Is this because I'm running QTPro? I'm not too worried about fixing it but it does look a bit odd, lol.

Edited by trogette

Share this post


Link to post
Share on other sites
I had the cookie usage page too. Copied the original code from application_top.php and then inserted it into the root.php but still the same problem.

 

I ported the new code from the application.php file to the root.php file and now the cookie usage page is showing, but when I used the root.php without the added code it works fine.

 

Do you have any ideas?

 

Doesn't the document state to also modify the root.php (item-9b)

In addition the $request_type variable must be identified for SEO-G to function correctly. This is server dependent. The default osC code implements the following test:

And it is also noted at the top of the root.php

Share this post


Link to post
Share on other sites
here's an oddity...

 

When I add a product with attributes to the cart, the link generated in the shopping cart box has the attribute compiling info in it, instead of being the product name. An example: http://mysite.com/shop/product_info.php?pr...ts_id=165{2}137 Is this because I'm running QTPro? I'm not too worried about fixing it but it does look a bit odd, lol.

It's how it works at the moment. I thought of adding attributes to the links but they're not viewable by spiders so there is no point. Spiders cannot add items to the shopping cart. And the link is not translated when safe mode is on. When it's off it shows just the products link

Share this post


Link to post
Share on other sites
It's how it works at the moment. I thought of adding attributes to the links but they're not viewable by spiders so there is no point. Spiders cannot add items to the shopping cart. And the link is not translated when safe mode is on. When it's off it shows just the products link

 

:) yes the only point would be so that the customer isn't going 'huh?' if they click on the link in the cart and check their address bar.

Share this post


Link to post
Share on other sites
:) yes the only point would be so that the customer isn't going 'huh?' if they click on the link in the cart and check their address bar.

It's what spiders can index. They cannot index links from the shopping cart because if they try to add something they should be redirected to the cookies usage page. And the product_info.php page contains a form to add items. Forms won't be translated. Bu default, a regular customer will see the original osC url from within the shopping cart.

Share this post


Link to post
Share on other sites
It's what spiders can index. They cannot index links from the shopping cart because if they try to add something they should be redirected to the cookies usage page. And the product_info.php page contains a form to add items. Forms won't be translated. Bu default, a regular customer will see the original osC url from within the shopping cart.

 

Uhm... But I'm looking at it as if I'm a regular customer and that's the link that's appearing in the shopping cart infobox, so yes that is what my customer would see. Have added my site addy to my profile so you can see.

Share this post


Link to post
Share on other sites
Uhm... But I'm looking at it as if I'm a regular customer and that's the link that's appearing in the shopping cart infobox, so yes that is what my customer would see. Have added my site addy to my profile so you can see.

yes I understand. The primary target of SEO-G are the search engines. Anything SEs cannot see can be a regular link. Don't forget the XML map that is generated from recorded URLs so that can count as duplicated urls if it was recorded due to the way osC processes the product attributes (ie there are no page content differences).

Share this post


Link to post
Share on other sites

returning to the problem with cookie usage page continuously showing, does it mean that I messed up something in root.php (though I double checked and sure I inserted right from aplication_top.php) ? or is it something else?

Share this post


Link to post
Share on other sites
returning to the problem with cookie usage page continuously showing, does it mean that I messed up something in root.php (though I double checked and sure I inserted right from aplication_top.php) ? or is it something else?

you may have to post the root.php, the .htaccess from the osc catalog and configure.php (minus dbase info). These are the files that if not properly setup can likely cause the problem.

Share this post


Link to post
Share on other sites

OK here is root.php

 

[size="1"]//----------------------------------------------------------------------------
 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;
 }
//----------------------------------------------------------------------------
// Also note the $request_type has to be determined accurately between
// SSL and NON-SSL pages.
// See also documentation for details for this line:
//  $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
//----------------------------------------------------------------------------
*/
//----------------------------------------------------------------------------
//-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('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.');
 }

// 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 = ($_SERVER['SERVER_PORT'] == '443') ? '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', 173); // how wide the boxes should be in pixels (default: 125)
define('BOX_WIDTH_RIGHT', 151); // 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[/size]

 

 

this is .htaccess

 

[size="1"]# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
 <IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
		 nokeepalive ssl-unclean-shutdown \
		 downgrade-1.0 force-response-1.0
 </IfDefine>
</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
#
# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#
#<IfModule mod_php4.c>
#  php_value session.use_trans_sid 0
#  php_value register_globals 1
#</IfModule>
#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On
# Next line must be changed to match your osCommerce folder - the relative path 
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}
#-MS- SEO-G Added EOM[/size]

 

and this is configure.php

 

// Define the webserver and path parameters

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

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

define('HTTP_SERVER', 'http://www.xxx.org.ua'); // 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', 'www.xxx.org.ua');

define('HTTPS_COOKIE_DOMAIN', '');

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

define('DIR_FS_CATALOG', '/home/domains/xxx.org.ua/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'public_html/');

Share this post


Link to post
Share on other sites

ok the first problem is here (from root.php code)

 

  if ($request_type == 'NONSSL') {
define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
 } else {
define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
 }

 

This is not good. You need to put the code to setup the seo-g variables. There should be comments inside the root.php file (beginning of file).

Share this post


Link to post
Share on other sites
returning to the problem with cookie usage page continuously showing, does it mean that I messed up something in root.php (though I double checked and sure I inserted right from aplication_top.php) ? or is it something else?

 

It took awhile but I was able to get it straightened out, if you look at the code that you just inserted into the root.php file find this line

 

  if ($request_type == 'NONSSL') {
   define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
 } else {
   define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
 }

 

and replace it with this code

 

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

 

Look at the pic in this post I used that to compare that my root.php with the general one that has been used with RC1 it would be the same if you are using any of the MS versions of osc 2.2.

 

The instructions in the readme and the root.php file states this

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

// catalog\includes\application_top.php and then set the $g_relpath, $g_server

// variables in this file such that:

 

It maybe use that are dense and did not understand it correctly or is written wrong, but it seems only a few of us are having this problem so it could be use. Although I must admit, saying set the variables is kinda confusing. I think it should read Add the following lines after this code here and here.

 

Hope this helps as it has helped me and I no longer have the cookie usgae error.


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites

yeah I put this code instead and it worked!!! Thanks man, this is realy amazing contrib.

 

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;

}

 

 

Sorry for being so annoying, but the last question: when I enter product details it has a link like: http://www.xxx.com/very--her.html

how can I put manufacturers name in the middle of it so it has a link like: http://www.xxx.com/manufacturers name/very--her.html ?

Share this post


Link to post
Share on other sites
yeah I put this code instead and it worked!!! Thanks man, this is realy amazing contrib.

 

Sorry for being so annoying, but the last question: when I enter product details it has a link like: http://www.xxx.com/very--her.html

how can I put manufacturers name in the middle of it so it has a link like: http://www.xxx.com/manufacturers name/very--her.html ?

 

I dont think you have been as annoying as me with this contrib... :lol:

 

now if I understood your question right you want your url to be displayed like http://mysite.com/manufactuersname/productsname.html or http://mysite.com/catergory/manufactuersna...oductsname.html ?

 

the way I have my site set-up right now is http://mysite.com/main_cat_name/sub_cat_na...oduct_name.html as well as http://mysite.com/main_cat_name/sub_cat_na...oduct_name.html depending on if I have a manufacturer listed.

 

I have my settings set to

SEO-G Parts Separator / Info

SEO-G Words Separator _ Info

SEO-G Inner Separator / Info


Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Share this post


Link to post
Share on other sites

OOPs I`m a big noob, where is it?

 

I have my settings set to 

SEO-G Parts Separator / Info 
SEO-G Words Separator _ Info 
SEO-G Inner Separator / Info

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×