Jump to content
Sign in to follow this  
enigma1

[Contribution] SEO-G

Recommended Posts

so the request type should be:

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

in both application_top.php and root.php just comment the other lines out and use it as shown above. Then re-enable the ssl in the configure.php and test the checkout. I think it should go through without problems because the $request_type variable is identified properly.

Unfortunately, after making these changes, I am still redirected to cookie_usage.php instead of going to index.php from checkout_success.php continue button.

Share this post


Link to post
Share on other sites
Unfortunately, after making these changes, I am still redirected to cookie_usage.php instead of going to index.php from checkout_success.php continue button.

how about using this instead?

 

$request_type = ($_SERVER['SERVER_PORT'] == '443') ? 'SSL' : 'NONSSL';

Do you still see the same problem? If you do, wait for the next version where I added some other handling to determine if a redirection takes place from the host in certain cases. I will release it in the next couple of days so we can see if it makes a difference.

Share this post


Link to post
Share on other sites
how about using this instead?

$request_type = ($_SERVER['SERVER_PORT'] == '443') ? 'SSL' : 'NONSSL';

Do you still see the same problem? If you do, wait for the next version where I added some other handling to determine if a redirection takes place from the host in certain cases. I will release it in the next couple of days so we can see if it makes a difference.

No change. Thanks for all of your efforts. I will check back for the new release and let you know if it resolves this issue.

Share this post


Link to post
Share on other sites
Yes, I know, that's what I saw which indicates some sort of redirection when the rewriterule is executed with the script your host has. Because I checked the request_uri before the rule executed and was correct. Afterwards it changed. So again your host should have a answer about it. None of the server variables had the originally typed url in.

 

 

The only thing I have heard from the Host so far is that they are investigating the reported problem. The work around you did seems to have solved the problem. Both Url's and products are correctly displayed on the pages now. This is a teriffic contribution to the OSC community and I'm sure your fix for this will help a lot of people on my server and other servers with the same setup who would like to use SEO-G for their store. Thank You for all the work you've done on this.

 

Webberman

Share this post


Link to post
Share on other sites

Mark

 

I have added a link in my header to go to the admin panel for login. When I have SEO-G activated it goes to the site login and not the admin login. (I have the admin with access installed)

 

Any ideas?

 

Thanks

Share this post


Link to post
Share on other sites
No change. Thanks for all of your efforts. I will check back for the new release and let you know if it resolves this issue.

Ok one other thing you could check is your catalog\includes\configure.php file, If you post it here exclude the database sensitive info. However the paths, server, domains should be set correctly. In particular:

 

  define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');

should both show the same path (in this example /catalog/). I've seen cases where the secure path is different than the non-ssl one. Differences in the paths will cause problems.

Share this post


Link to post
Share on other sites
Mark

 

I have added a link in my header to go to the admin panel for login. When I have SEO-G activated it goes to the site login and not the admin login. (I have the admin with access installed)

 

Any ideas?

 

Thanks

There were a couple of posts earlier to set the admin\.htaccess so it overrides the settings of the catalog in case those are inherited. This can be server dependent but try in your admin\.htaccess to add the following:

 

RewriteEngine on

RewriteRule ^(.*)$ $1 [L]

 

See if this overrides the parent's directory settings.

Share this post


Link to post
Share on other sites

v1.12 is available with the following changes:

 

- Modified .htaccess rewrite rule to cover a wider range of server configurations.

- Added REQUEST_URI validator.

- Fix to update QUERY_STRING variable through the root.php

- Added error display if an SEO-G url cannot be processed or redirected.

Share this post


Link to post
Share on other sites

After discovering a couple of issues with v1.12 I released 1.13 to fix them:

 

- Fix for GET global arrays

- Added Linkage option under the SEO-G Types. This enhances the SEO-G URLs as unique links can be created in cases where the category path and products id was mixed. With different linkage values the lowest one overrides the rest.

- Added osC URL check to speed-up SEO-G URLs building process. If the osC URL is already recorded the equivalent seo url is returned without further processing.

- Removed default prefixes for types (mfc_, category_, product_) from the seo_g.sql to reduce link size by default. Prefix functionality remains as previously documented..

- Database update see (seo_g.sql) tables seo_url and seo_types changed. seo_types default rows also changed

 

Due to the .htaccess change with v1.12, the GET array was not properly setup. So it is important to use v1.13 instead.

In addition the new linkage option offers unique URLs for the store's products. Nick asked for it earlier and after some thought I was able to at least give this option. When properly setup the seo links should be shorter. To check the linkage option set different linkage values for the types having the product type with the lowest linkage value. Then landing on the products info page only the product name should show with the link and the categories names will be truncated creating a shorter link.

Edited by enigma1

Share this post


Link to post
Share on other sites

The actual page query string get array support (ie. they are being replaced by the database get parameters) is broken for me in this latest version, because of this keywords for the quick search do not work.

 

A solution such as this maybe?

 

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

// Synchronize global arrays.
$HTTP_GET_VARS = $_GET = $tmp_array;
unset($tmp_array);

 

Scott


no outside links please

Share this post


Link to post
Share on other sites
The actual page query string get array support (ie. they are being replaced by the database get parameters) is broken for me in this latest version, because of this keywords for the quick search do not work.

 

A solution such as this maybe?

 

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

// Synchronize global arrays.
$HTTP_GET_VARS = $_GET = $tmp_array;
unset($tmp_array);

 

Scott

 

goto your osc Admin->SEO-G->G-Exclude.

 

Add the advanced_search_results.php

 

Goto the G-Reports page delete the advanced_search_results.html entry. This is temporary as I am looking at it.

Share this post


Link to post
Share on other sites

ok yea what you posted there is good. I will update it with the next version. Initially I though of duplicated keys in the query string but the array_merge function takes care of it. Also the order is correct as far I can tell, in other words the $tmp_array overrides common keys (if exist) in the _GET array. I will test it a bit more in the meantime if you see anything else wrong let me know

 

Thank you very much.

Share this post


Link to post
Share on other sites

Hiya

 

First off, looks like a fantastic contribution. Also the install was a lot easier than I was expecting, although I am having an issue post install.

 

I can go in to my admin and see the new box, with all the headings (all of which work).

 

I followed the instructions and disabled the search engine safe URL's and disabled spider sessions.

 

I then tried to open my catalog (home page), but am getting the following error :

 

Parse error: parse error, unexpected $ in <directory>/includes/application_top.php on line 518

 

The application_top file ends on row 517, so I am at a loss as to where to begin to look for the problem.

 

Everything was working fine until I installed this contribution. It was a vanilla install several hours ago and had so far installed the following contributions :

 

Register Globals

Custom Meta Tags

Fast Easy Checkout

Googlesitemap

Xsell

 

On top of that I made some layout changes was all (moving infoboxes about etc), but none of this involved any major changes to source code.

 

Oh - and I am now getting that same error with SEO-G enabled or disabled

 

Any ideas please?

 

link to my catalog area is http://www.toptiara.com/development

 

Thanks

Edited by toptiara

Hand made jewellery and tiaras on our website

 

Please bear with me. Im an osC noobie!

Share this post


Link to post
Share on other sites
Hiya

 

First off, looks like a fantastic contribution. Also the install was a lot easier than I was expecting, although I am having an issue post install.

 

I can go in to my admin and see the new box, with all the headings (all of which work).

 

I followed the instructions and disabled the search engine safe URL's and disabled spider sessions.

 

I then tried to open my catalog (home page), but am getting the following error :

 

Parse error: parse error, unexpected $ in <directory>/includes/application_top.php on line 518

 

The application_top file ends on row 517, so I am at a loss as to where to begin to look for the problem.

 

Everything was working fine until I installed this contribution. It was a vanilla install several hours ago and had so far installed the following contributions :

 

Register Globals

Custom Meta Tags

Fast Easy Checkout

Googlesitemap

Xsell

 

On top of that I made some layout changes was all (moving infoboxes about etc), but none of this involved any major changes to source code.

 

Oh - and I am now getting that same error with SEO-G enabled or disabled

 

Any ideas please?

Thanks

recheck the install instructions, (for application_top.php is item-8). Just one curly bracket missing or incorrectly placed, is enough to cause it. If in doubt, try with the included stock application_top.php

Share this post


Link to post
Share on other sites
Ok one other thing you could check is your catalog\includes\configure.php file, If you post it here exclude the database sensitive info. However the paths, server, domains should be set correctly. In particular:

 

  define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');

should both show the same path (in this example /catalog/). I've seen cases where the secure path is different than the non-ssl one. Differences in the paths will cause problems.

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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://74.220.202.241'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://74.220.202.241'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '74.220.202.241');
 define('HTTPS_COOKIE_DOMAIN', '74.220.202.241');
 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_NAV', DIR_WS_IMAGES . 'nav/');
 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', '/home/74.220.202.241/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'
?>

You had mentioned it would take a coupe of days so I just now checked back to find that I am two versions behind. I will update to the most recent and let you know if it resolves the checkout_success.php redirect issue.

 

There may still be a problem with my configure.php file as you suggested. I get the "?osCsid=9402de7f58c7ea4e507bd9b76ddd6514" tacked on to the end of each URL when using Netscape. I had this same problem before in Iternet Explorer and you told me to check 'HTTP_COOKIE_DOMAIN' in the configure file to resolve the issue. I changed from domain name to IP because I am not migrating the domain name until the site is complete. Doing this resolved the issue in Internet Explorer but I still get the ID tacked on when using the Netscape browser.

Share this post


Link to post
Share on other sites
In addition the new linkage option offers unique URLs for the store's products. Nick asked for it earlier and after some thought I was able to at least give this option. When properly setup the seo links should be shorter. To check the linkage option set different linkage values for the types having the product type with the lowest linkage value. Then landing on the products info page only the product name should show with the link and the categories names will be truncated creating a shorter link.
Shorter how? Do the category names have to be truncated or is there a setting to allow complete category names to show as they did in previous versions so I can get the full SEO benifits of the category names in the URLs?

Share this post


Link to post
Share on other sites
Shorter how? Do the category names have to be truncated or is there a setting to allow complete category names to show as they did in previous versions so I can get the full SEO benifits of the category names in the URLs?

nothing different than previous versions, linkage just offers greater flexibility for links generation. See what Nick suggested here along with my response at the time...

http://forums.oscommerce.com/index.php?s=&...t&p=1070177

Share this post


Link to post
Share on other sites
recheck the install instructions, (for application_top.php is item-8). Just one curly bracket missing or incorrectly placed, is enough to cause it. If in doubt, try with the included stock application_top.php

 

 

Spot on :) Thanks. Now works nicely.

 

However, I do now have another issue... When I switch this contribution on, the 'tell a friend' function stops working. I click on a product, fill out friend information click send, but then I get a message that the product si not found. If I switch this contribution off, it works fine, so I am assuming that the product id is being lost as part of the combine.

 

Any ideas how to fix please?


Hand made jewellery and tiaras on our website

 

Please bear with me. Im an osC noobie!

Share this post


Link to post
Share on other sites
Spot on :) Thanks. Now works nicely.

 

However, I do now have another issue... When I switch this contribution on, the 'tell a friend' function stops working. I click on a product, fill out friend information click send, but then I get a message that the product si not found. If I switch this contribution off, it works fine, so I am assuming that the product id is being lost as part of the combine.

 

Any ideas how to fix please?

yes I think this problem is due to what mentioned few posts earlier in the previous page

http://forums.oscommerce.com/index.php?s=&...t&p=1072898

 

make sure you have that fix. I will included it with v1.14.

Edited by enigma1

Share this post


Link to post
Share on other sites
yes I think this problem is due to what mentioned few posts earlier in the previous page

http://forums.oscommerce.com/index.php?s=&...t&p=1072898

 

make sure you have that fix. I will included it with v1.14.

 

Wow! Brilliant :) All now appears to work.

 

Thank you v much for your help :)


Hand made jewellery and tiaras on our website

 

Please bear with me. Im an osC noobie!

Share this post


Link to post
Share on other sites
ok yea what you posted there is good. I will update it with the next version. Initially I though of duplicated keys in the query string but the array_merge function takes care of it. Also the order is correct as far I can tell, in other words the $tmp_array overrides common keys (if exist) in the _GET array. I will test it a bit more in the meantime if you see anything else wrong let me know

 

Thank you very much.

 

Hey Mark,

 

First, I want to thank you for this contribution. As someone who's transferring a store, you've made it possible to keep the same urls. Give me your address and I'll send you a couple shirts of your choice.

 

For the most part, this contribution is working okay. I've really only got two problems:

 

-- I used to be able to have visitors go to a custom HTML homepage just by adding that page into my public_html folder on my webserver. Now, it bypasses the index.html page I upload and uses the index.php. Do you know how I might change that, so that people will see my custom home page?

 

-- When I log in to the admin, and try to use any of the pages, I get the cookies error page. I can fix this by replacing my htaccess file with my back up, then adding in the new code. The problem is that I have to do that every day. Any thoughts?

 

You should note that I'm still using version 1.04, if that has any effect on these problems.

 

Thank you again,

 

Chris

Share this post


Link to post
Share on other sites
Hey Mark,

 

First, I want to thank you for this contribution. As someone who's transferring a store, you've made it possible to keep the same urls. Give me your address and I'll send you a couple shirts of your choice.

 

For the most part, this contribution is working okay. I've really only got two problems:

 

-- I used to be able to have visitors go to a custom HTML homepage just by adding that page into my public_html folder on my webserver. Now, it bypasses the index.html page I upload and uses the index.php. Do you know how I might change that, so that people will see my custom home page?

 

-- When I log in to the admin, and try to use any of the pages, I get the cookies error page. I can fix this by replacing my htaccess file with my back up, then adding in the new code. The problem is that I have to do that every day. Any thoughts?

 

You should note that I'm still using version 1.04, if that has any effect on these problems.

 

Thank you again,

 

Chris

Use version 1.13 plus the fix shown in post #217 of this thread. I believe it should fix this issue and you will have edit capability at the url level.

Share this post


Link to post
Share on other sites

Hi Mark,

I've just added TinyMCE and have held back from letting products go live until I've jazzed them up with a lick of HTML.

I've got all the raw products in one holding category and the process is

1) move product to appropriate category;

2) edit product - applying HTML;

3) save and change from out of stock to in stock status.

When I run the shop and find the product in the catagory list (page 2), and click on the product, I am returned to page 1, not taken to the product description page. It doesn't like the path.

However, if I search for the product and click on that, all is well.

Do I need to refresh SEO-G to catch all the products added after this contribution was added ?

Thanks Mark,

Paul

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  

×