Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] SEO-G


Guest

Recommended Posts

a few things i've noticed about this contrib

 

- using the .htaccess with mod_rewrite directives in it is a bad idea b/c you need to AllowOverride All for that directory; you should configure mod_rewrite for the directory you need in your apache config and not do AllowOverride All since it's needlessly insecure; if you don't AllowOverride you'll probably have trouble with apache parsing the config settings in .htaccess but this might be openbsd specific

 

- if you use the paypal IPN contrib, make sure to use the G-Exclude list, remembering to turn Safe Mode to false, explicitly excluding the file ipn.php; had to copy ipn.php from catalog/ext/modules/payment/paypal_ipn to catalog/ to get it selectable in the G-Exclude dropdown; you probably want to exclude the various checkout_*.php scripts as well

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

I've just installed SEO-G and I'm having a number of problems.

 

Firstly in Admin->SEO-G->G-Controller all I get is a blank page.

Next, before the master switch is even activated the categories box in the left column in the catalogue isn't working, when you hover over a link it shows the appropriate URL but then it takes you to the mainpage when you click on it. However when the category is displayed elsewhere, for example in the breadcrumbs, then it takes you where you wanna go.

And finally, when I do turn on SEO-G the links don't work. You can hover over a link and see that they have changed but it can't find the destination when clicked "FILE NOT FOUND" but the original URLs still do locate the products.

 

Can anybody shed some light?

Thanks,

PDS

Link to comment
Share on other sites

powerdrive, do confirm you've installed the contrib correctly. check your server log for errors anytime you get a blank page, it will usually point you to a location where you've made a PHP editing error.

 

i had the same problem with the URL rewriting too: this was b/c the .htaccess files weren't being parsed for apache config settings until i changed the AllowOverride setting in the main apache config file. see my earlier post on why you should put the Rewrite directives into your apache config file if possible.

Link to comment
Share on other sites

powerdrive, do confirm you've installed the contrib correctly. check your server log for errors anytime you get a blank page, it will usually point you to a location where you've made a PHP editing error.

Right, not sure where to find the server log.

 

i had the same problem with the URL rewriting too: this was b/c the .htaccess files weren't being parsed for apache config settings until i changed the AllowOverride setting in the main apache config file. see my earlier post on why you should put the Rewrite directives into your apache config file if possible.

Thanks, I'll have a read and see what I can do.

Link to comment
Share on other sites

Hi again,

 

first off all I want to thank the author of this great contrib and more important:

to all off you who ask questions like 'I've lost my head, can you help me find it? Think I lost it.. hum.. somewhere'

 

Please RTFM! Read the f..ree manual and docs out there.

If you are to lazy to learn the basics you'll kill support for this contrib!

95% off your questions are allready answered, but now its hard to find them between these meaningless and unnecessary postings. blame yourself not enigma who does this all for free!

 

I'm shure enigma wants something like a privat life, dont you?

And if you want your own shop, but dont want to learn all that techy stuff, well then hire a professional

 

Sorry, but this needed to be said, an it looks like enigma is just to nice to do so ;)

 

Now coming to the manufacturers dropdown box problem...

I dont really understand whats going on, a local installation works like a charm, while online the manufacturers box allways leads to error page.

I tried a lot, even to understand regular expressions..

But then I thought of a solution the other way around..:

 

copy index.php and rename it to shop_by_manufacturer.php

 

add to catalog/includes/filenames.php

define('FILENAME_SHOP_BY_MANUFRACTURER', 'shop_by_manufracturer.php');

 

find in catalog/includes/boxes/manufacturers.php:

$boxContent = tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get');

and change to

$boxContent = tep_draw_form('manufacturers', tep_href_link(FILENAME_SHOP_BY_MANUFRACTURER, '', 'NONSSL', false), 'get');

 

add 'shop_by_manufracturer.php' to G-Exclude list

 

 

better than nothing, if you can't get this box to work

 

any idea why it works local on xampp but not online on lampp?

I'm shure there is a reason, but I didn't find it.

Edited by webandbeyond
Link to comment
Share on other sites

Installed SEO-G in my test environment and have the following questions...

 

First, I set both products and categories to Linkage 1 in G-Types

 

My goal is to have the following URL structure:

 

www.mydomain.com/category/subcategory/product.html

 

Currently, the links are generated this way, however when I navigate to a sub-category level, my page loses all style/images/etc.

 

So, these two links work correctly:

 

www.mydomain.com/category.html

www.mydomain.com/category/subcategory/product.html

 

But, this link has no styles, images:

 

www.mydomain.com/category/subcategory.html

 

Any idea why that would be?

 

Second question:

 

I have thousands of products - is there a way to auto generate all URLs or do I have to go page by page and category by category in G-Controller to generate these?

 

Thank You and great contrib...

Link to comment
Share on other sites

Hi there,

super free script first off!

 

 

i downloaded the latest SEO-G yesterday, and i uploaded and overwrote all the files it came with in the specified directories

 

then i logged in cp admin, and saw the SEO-G Link, but when i click it i am getting this error:

 

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/puregnet/public_html/osc/admin/includes/functions/database.php:13) in /home/puregnet/public_html/osc/admin/includes/functions/database.php on line 13

 

 

can someone please help me?

 

thank you

Link to comment
Share on other sites

Awesome contrib! Just finished installing it....love it, love it, love it!

 

I have one question, though.

 

In Admin....when you go to SEO-G>Configuration>Minimum Words Length

 

The way I understand that field, is that if I have a word like SOAP in the title....and I set that field to 5....then words with less than 5 characters will be ignored, right? So, theoretically, if I set it to 5...a 4-letter word like SOAP should not be picked up in the new URL, correct?

 

It's not doing anything. Doesn't seem to matter what number I change it to. All words under 5 characters are still being picked up in the new .html URL.

 

The reason I'm asking about this is I have a little something I'd like to fix. Don't know that I can, really, but...

 

I use a HTML line break in my titles, because they're so long. For example:

 

When I create a new product listing, I'll type in: Soap Opera Magazine<br>Kim Zimmer-Robert Newman

 

The reason I do that is so the title will appear on the product_info screen as

 

Soap Opera Magazine

Kim Zimmer-Robert Newman

 

Rather than have it spread out onscreen in one looooong sentence...

 

The new URLS are picking up that <br> I'm inserting in the titles. So, a URL is turning out like this:

 

mywebsite.com/Soap-Opera-Magazine-br-Kim-Zimmer-Robert-Newman.html

 

Anything I can do to stop it from picking up that line break?

 

If you need to see my site, Click Here

Link to comment
Share on other sites

I have thousands of products - is there a way to auto generate all URLs or do I have to go page by page and category by category in G-Controller to generate these?

 

 

You are able to write, think you are able to read, too.

So read the documentation!!! Allready answered.

 

it's just unbelievable..

 

No more support for this contrib, thanks to scavenge and the other respectless people here.

Link to comment
Share on other sites

Anything I can do to stop it from picking up that line break?

 

I guess you have to add something like

$title = ereg_replace('<br>', '', $title); ( http://www.php.net/manual/en/function.ereg-replace.php )

to your catalog/admin/includes/classes/seo_products.php

 

2. guess:

try adding it after

$name = $this->create_safe_string($name); (line 41)

 

to make it clear:

if( $names_array = tep_db_fetch_array($name_query) ) {

$name = $names_array['products_name'];

$name = $this->create_safe_string($name);

$name = ereg_replace('<br>', '', $name);

}

return $name;

}

 

Haven't tried that, so if it works please tell us here.

 

edit:

If it works, you have to clear your (allready made) urls before you'll see a change

->admin -> seo-g -> reports

there it is possible to remove the br by hand, too

Edited by webandbeyond
Link to comment
Share on other sites

Hi Robert:

 

Thanks very much for the reply.

 

I tried that code change you suggested...created a new item, but...no difference. It's still picking up the <br>.

 

However, I then went into Admin, as you instructed, and took a look at the SEO-G > Reports and...wow! I can select multiple items at once and manually strip the -br- out of the line for each URL. If I were to sit down and spend some time manually editing 2500 URLS, would the change be permanent? Meaning...what I get rid of today won't come back tomorrow, will it?

 

On that note...what about all of these hyphens that are created in the URLs? I figure...if I'm going to sit down and spend the time manually deleting the -br- out of each URL...what about all of the other hyphens between keywords in the title?

 

Do those hyphens have any impact in search engines like Google, Yahoo and MSN?

 

For example, if someone were using Google to search for Soap Opera Digest...do those hyphens in Soap-Opera-Digest have any effect on whether or not the listing would be returned in Google search results? Just curious...:)

 

If I'm going to get rid of one thing in 2500 different URLs, I may as well get rid of another...you know?

Link to comment
Share on other sites

Think I might be being something of an idiot but you learn by asking questions right.

So I don't know what I'm doing with the htaccess file. Is it supposed to be ".htaccess"? Whenever I upload it with the dot it doesn't like it:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

When there's no dot the store loads properly, but when I turn on the SEO-G none of the links work; is that to do with the htaccess?

Link to comment
Share on other sites

Meaning...what I get rid of today won't come back tomorrow, will it?

 

Do those hyphens have any impact in search engines like Google, Yahoo and MSN?

 

For example, if someone were using Google to search for Soap Opera Digest...

 

Your changes are stored in the mysql database. So they remain there unless you delete them in seo-g reports or (!) if the server goes to hell or gets hacked or you delete your database

So best is you make a backup before you change 2500 urls on server and on your computer, and again after you changed them.

Both possible in shop admin, Tools -> Database Backup

hope this was not too late.. :)

 

The hyphens have no impact, they are the best way to do it.

for google Soap-Opera-Digest is Soap Opera Digest, so it count for soap, opera, digest and any combination of these 3.

Soap_Opera_Digest is in googles eyes just Soap_Opera_Digest, no hits for soap, opera etc..

 

@Powerdrive

Internal Server Error

.htaccess is purly documented and I cant remember that there is an answer to your question in this thread, so asking is ok :)

It needs to be '.htaccess' to work

but if there is an error inside you get an internal server error

 

#-MS- SEO-G Added

Options +FollowSymLinks

RewriteEngine On

# Next line must be changed to match your osCommerce folder - the relative path

RewriteBase /shopfolder/

# or if in root just:

#/

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

#-MS- SEO-G Added EOM

 

if (this is checked) && (all rules above that section have a # in front) {

try:

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

}

problem is server dependend but I think this should help

 

if someone has a problem with creating a .htaccess file on windows in explorer... open your texteditor (not word!) and safe as textfile named .htaccess

if you really want to understand the ^(.*) things.... buy a good book from oreilly... This will be my next step.

 

regards

Edited by webandbeyond
Link to comment
Share on other sites

Hi there,

super free script first off!

i downloaded the latest SEO-G yesterday, and i uploaded and overwrote all the files it came with in the specified directories

 

then i logged in cp admin, and saw the SEO-G Link, but when i click it i am getting this error:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/puregnet/public_html/osc/admin/includes/functions/database.php:13) in /home/puregnet/public_html/osc/admin/includes/functions/database.php on line 13

can someone please help me?

 

thank you

 

 

hi, does anyone know why im getting this error please, i really would like to have this work, anyone have any ideas?

 

i already did this:

Solution

 

Upload the correct file to the languages/*/ directory where * is the name of the language you are using.

 

and it did not help

Edited by pure11
Link to comment
Share on other sites

hi, does anyone know why im getting this error please, i really would like to have this work, anyone have any ideas?

 

i already did this:

Solution

 

Upload the correct file to the languages/*/ directory where * is the name of the language you are using.

 

and it did not help

 

 

sorry i tried to edit the post above but it didnt let me

 

i also have tried this:

 

To fix this, change the require('includes/application_top.php'); at the top of the index.php and product_info.php files to say

CODE

require_once('includes/application_top.php');

 

and it did not work

Link to comment
Share on other sites

have had this running for a bit over a week now and, for the most part, it works great. the G-report shows over 4500 rewritten URLs, which makes me happy :).

 

however, there is a nasty little problem with the "Continue Shopping" button after customers add products to their cart and want to return to the previous page. it correctly returns to the previous page but the URL rewriting screws up and links on the page it returns to are all "degenerate" and read the same thing, but every link will deposit one or two items that were not selected into the user's cart. i am starting to pick apart the PHP right and would really appreciate help on this from the contrib author as i do a lot of business through this site.

 

please PM me if you have some time to assist with this. fyi, i'm very reasonable with compensation.

 

cheers,

jake

Link to comment
Share on other sites

sorry i tried to edit the post above but it didnt let me

 

i also have tried this:

 

To fix this, change the require('includes/application_top.php'); at the top of the index.php and product_info.php files to say

CODE

require_once('includes/application_top.php');

 

and it did not work

 

 

in seo_zones_config file i edited: required('includes/application_top.php');

to require_once('includes/application_top.php');

 

 

and now i am receiving this error:

Fatal error: Cannot instantiate non-existent class: box in /home/puregnet/public_html/osc/admin/includes/boxes/catalog.php on line 32

 

 

can someone help

 

PS something really weird happened, i had reloaded the page and the page SEO loaded! but then i reloaded again, and it gave me this error again

 

thanks

Link to comment
Share on other sites

in seo_zones_config file i edited: required('includes/application_top.php');

to require_once('includes/application_top.php');

and now i am receiving this error:

Fatal error: Cannot instantiate non-existent class: box in /home/puregnet/public_html/osc/admin/includes/boxes/catalog.php on line 32

can someone help

 

PS something really weird happened, i had reloaded the page and the page SEO loaded! but then i reloaded again, and it gave me this error again

 

thanks

 

 

i wish i could edit my posts, sorry for posting again, but i have fixed the problem! file was edited using wrong program and it messed up the file , re-uploaded seo_zones_config file and it works now!!

 

thanks!!

Link to comment
Share on other sites

have had this running for a bit over a week now and, for the most part, it works great. the G-report shows over 4500 rewritten URLs, which makes me happy :).

 

however, there is a nasty little problem with the "Continue Shopping" button after customers add products to their cart and want to return to the previous page. it correctly returns to the previous page but the URL rewriting screws up and links on the page it returns to are all "degenerate" and read the same thing, but every link will deposit one or two items that were not selected into the user's cart. i am starting to pick apart the PHP right and would really appreciate help on this from the contrib author as i do a lot of business through this site.

 

well, turning "Safe Mode" back on fixed this issue. the rewriting of the "Buy Now" buttons became munged once the "Continue Shopping" button is used from the shopping cart.

Link to comment
Share on other sites

@Powerdrive

Internal Server Error

.htaccess is purly documented and I cant remember that there is an answer to your question in this thread, so asking is ok :)

It needs to be '.htaccess' to work

but if there is an error inside you get an internal server error

 

#-MS- SEO-G Added

Options +FollowSymLinks

RewriteEngine On

# Next line must be changed to match your osCommerce folder - the relative path

RewriteBase /shopfolder/

# or if in root just:

#/

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

#-MS- SEO-G Added EOM

 

if (this is checked) && (all rules above that section have a # in front) {

try:

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

}

problem is server dependend but I think this should help

 

if someone has a problem with creating a .htaccess file on windows in explorer... open your texteditor (not word!) and safe as textfile named .htaccess

if you really want to understand the ^(.*) things.... buy a good book from oreilly... This will be my next step.

 

regards

 

All I have in my .htaccess is this:

 

#-MS- SEO-G Added

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

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

#-MS- SEO-G Added EOM

 

I'm just trying to understand, .htaccess is used for rewritting the URLs, that's it's job so I didn't have one before SEO-G and I don't need anything else in it.

As I'm getting an internal error which line would it be more likely to be on, the one with ^(.*) , so I may want to do some research into how that kinda thing works?

Link to comment
Share on other sites

All I have in my .htaccess is this:

 

#-MS- SEO-G Added

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

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

#-MS- SEO-G Added EOM

 

I'm just trying to understand, .htaccess is used for rewritting the URLs, that's it's job so I didn't have one before SEO-G and I don't need anything else in it.

As I'm getting an internal error which line would it be more likely to be on, the one with ^(.*) , so I may want to do some research into how that kinda thing works?

 

yes, the .htaccess controls the rewriting

^(.*) are called regular expressions, but they dont cause your problem.

seo-g controls the rules with root.php and passes them to .htaccess (just to make clear) you can define your own rules with redular expression in .htaccess for smaller projects.

 

but your problem is that you only have this single seo-g block in your .htaccess I guess..

this is my standard .htaccess

 

# 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)
#
# try to comment out the following if you get internal server errors
#<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 /shopfolder/
# or if in root just:
#/
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}
#-MS- SEO-G Added EOM

 

hope it helps

Link to comment
Share on other sites

When I'm in Admin looking at SEO-G>Reports...

 

Something strange is happening...I'm not even sure how to describe it.

 

I'm seeing at least 2....sometimes 3...different OSC urls for one product. Like this:

 

www.mysite.com/product_info.php?products_id=1516

www.mysite.com/product_info.php?cPath=65_68&products_id=1516

www.mysite.com/product_info.php?cPath=25_48&products_id=1516

 

I am 99.9% positive that I edited that first URL yesterday and stripped it of it's -br- (html line break) reference that you see below. But, it's back today with the -br- in it. The next two URLs were not there yesterday. They only showed up today. And, they do NOT have the -br- reference in them. The SEO-G URLs (generated from the links above) read like this, in order:

 

www.mysite.com/1-2-01-cbs-soaps-in-depth-br-eileen-davidson-rick-hearst.html

www.mysite.com/1-2-01-cbs-soaps-in-depth-eileen-davidson-rick-hearst.html

www.mysite.com/1-2-01-cbs-soaps-in-depth-eileen-davidson-rick-hearst_cpath-25_48.html

 

If I edit the first one and take out that -br- the entire entry for that one will disappear from the Reports screen when I click to Update. ??? It will be gone after I edit and update. It didn't disappear yesterday when I edited it and took the -br- out. Why is it disappearing now?

 

Also, I don't understand why the 2nd OSC URL with cPath=65_68 is not showing that in the SEO url but that 3rd one, referencing cPath=25_48 IS appearing on the end of the SEO url that is generated. All 3 of the SEO links are valid. They'll all take you to the same product listing. I just don't understand why my Reports section is filled with so much stuff! Is this normal? Why are there so many links?

 

Do I have a mess or do I just not understand how this thing works?

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.
Note: Your post will require moderator approval before it will be visible.

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...