Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Could I get some info on what I have done wrong or what is going wrong?

 

I have SEO URLs 5 installed and Google Webmaster Tools is reporting Duplicate Title Tags for products, example is this. I have the cPath enabled obviously, is there a way to force the first version to the second?

 

store/hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html?cPath=27_28_29

Link to comment
Share on other sites

Hi there,

 

I've tried to sort this out again with no luck. I've removed usu5 and google checkout with zone shipping works ok. I've gone through the install again very carefully but still can't get this working.

 

Any advice?

 

There must be an aspect of the google checkout code that uses the tep_href_link wrapper incorrectly perhaps passing a path to file rather than a file name.

Link to comment
Share on other sites

Could I get some info on what I have done wrong or what is going wrong?

 

I have SEO URLs 5 installed and Google Webmaster Tools is reporting Duplicate Title Tags for products, example is this. I have the cPath enabled obviously, is there a way to force the first version to the second?

 

store/hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html?cPath=27_28_29

 

For backwards compatibility I kept this admin setting exactly the same as the old series 2. Add cPath to urls is the setting. However as you have noticed this can create duplicate content, perhaps you should add KissMT to your site which includes canonical elements which would solve this issue.

Link to comment
Share on other sites

USU5 has no problems but header tags SEO cannot handle path based uris. Therefore with rewrite uris selected header tags should have no problems but with standard uris it breaks.

 

For the record I recommend KissMT over header tags.

 

OK, then I understand.

 

I've sent you a PM.

 

//Johga

Link to comment
Share on other sites

For backwards compatibility I kept this admin setting exactly the same as the old series 2. Add cPath to urls is the setting. However as you have noticed this can create duplicate content, perhaps you should add KissMT to your site which includes canonical elements which would solve this issue.

 

I do have KissMT installed at this time along with KissER and SEO Urls 5.

Link to comment
Share on other sites

I do have KissMT installed at this time along with KissER and SEO Urls 5.

 

If you have KissMT installed the canonical element for ..

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html?cPath=27_28_29

 

Would be ...

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html

 

thereby eradicating any duplicate content.

Link to comment
Share on other sites

If you have KissMT installed the canonical element for ..

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html?cPath=27_28_29

 

Would be ...

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html

 

thereby eradicating any duplicate content.

 

Yeah that's not happening, it is displaying the cPath for all items. I have "Output canonical tags for SEO" set to true in KissMT on the admin side.

Link to comment
Share on other sites

I got this error:

 

Installer Messages: Stage - 1
Below you will see some checks - if none are red then we are ready to install.


   * At least one of the configuration values already exists!
   * Tables look good to insert.
   * No tables to alter it seems.
   * No fields to insert it seems.
   * No fields to alter it seems.


There was at least one error, we therefore cannot install.

Database name_test has not been touched.

Please check database name_test against the contribution for conflicts.

 

Any help on what I can do?

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Link to comment
Share on other sites

I got this error:

 

Installer Messages: Stage - 1
Below you will see some checks - if none are red then we are ready to install.


   * At least one of the configuration values already exists!
   * Tables look good to insert.
   * No tables to alter it seems.
   * No fields to insert it seems.
   * No fields to alter it seems.


There was at least one error, we therefore cannot install.

Database name_test has not been touched.

Please check database name_test against the contribution for conflicts.

 

Any help on what I can do?

 

^ Despite this error it still works. Now when I use the .htaccess I get a 500 error. My host says I am able to use rewrite rules..any suggestions on what I can do to get it to work using mod rewrite? All I did was add the .htaccess AS IS.

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Link to comment
Share on other sites

Hi Robert,

 

Previously (on March 5) you had answered a post regarding redirecting before the USU5 404 kicks in. The question was regarding where to place the code.

I have a lot of products changing and i get a lot of 404 that i would like to redirect to a new product, i understand where the code needs to be placed, but i am not able to come up with that code, can you help? It would be greatly appreciated.

 

Thanks.

Link to comment
Share on other sites

Hello and thanks for that nice contribution !

 

I have a small problem since a few hours. I have installed google sitemap seo urls. The xml file is ok, but, i don't know why, after setting the cache folder rights (changed to chmod 777 to allow the cache file) in SEO module, the rewritting is gone.

 

I mean I had this before:

 

www.domain.com/myproduct-c-28.html (rewrite mode)

 

now i have:

 

www.domain.com/shop.php(renamed index file)/myproduct-c-28 (like a standard mode)

 

the naming of index.php into shop.php is ok in the htaccess rewritting rules.

 

So I would like to get back my domain.com/product urls mode...

 

The rewritte mode is enabled in the admin control, that's what i don't understand.

 

Thanks for your help, I would like to ask googlebot to visit me asap and showing clean urls

Edited by korben83
Link to comment
Share on other sites

Fabulous Contribution!

 

Thank you so much for the superb documentation and ease of installation, a truly professional job!

 

 

Can you help me understand as to when (under what criteria) we should use the new module that you so graciously and kindly included in the Extras Folder.

 

I created additional landing pages, based on manufacturers_id for my store where I send an action and

the manufacturers id and the resulting dynamic urls are consistent with oscommerce and are like so:

 

<pre>http://www.domain.com/brand_name?action=brand_info&manufacturers_id=22</pre>

 

I have also created several additional product listings based on product listing.

 

I would very much like to integrate my pages (which still work and display just fine) into your code so that I can imrprove those urls.............

 

Incidentally, using the Database Option has improved my site's speed significantly.

 

Thanks for your time

wyCODEiwyg

 

 

New Entry- I hope I am posting this properly, that is, replying to a portion of my own post to give more details after my further research.

 

The contribution is performing flawlessly. I have a relatively "clean" site with very few contributions.

Search Engine Friendly URL contribution has never been installed

No Header Tag contributions or other SEO-like contributions, except Dynamic sitemap.

 

I am in need of a little information. This post may seem long but it is only because I am trying to let you know what research I have done to expedite the process.

 

I am trying to get pages which follow normal osc conventions: where..........

<pre> www.domain.com/brandname.php?action&manufacturers_id-xx </pre>(just like product_info, except product_info is action and product id)

is appended to the url, to also be seo friendly. (note these pages are complete pages and not part of index.php).

 

After further research of your code, I believe my pages should already be handled and there is no need for me to create another module (although I tried this solution).

 

This is what I think I see happening in your code, but I am writing asking for any clarification.

 

SEARCH_ENGINE_FRIENDLY_URLS is the switch that osc put out there "for future use" pending a search engine friendly contribution to come along.

 

Mine is set to false in admin/configuration as I have not added any contributions for this.

 

in Usu_General_Functions.php in function osc_href_link, we have this check......

 

<pre>if ( ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) && ( $search_engine_safe == true ) ) {

while ( strstr( $link, '&&' ) ) $link = str_replace( '&&', '&', $link );

 

$link = str_replace( '?', '/', $link );

$link = str_replace( '&', '/', $link );

$link = str_replace( '=', '/', $link );

 

$separator = '?';

} </pre>

 

 

My osc url is not falling into this code and I think it perhaps should be.

 

What seems inconsistent (but may be perfectly accurate) is that in Usu.php we do the following:

construct, then load the registry, we set the cache, check if the defines are available and then initiate.

 

In that initiate step , in usu.php, prior to the SEARCH_ENGINE_FRIENDLY_URLS check I just noted, we:

turn off any broken URLs providing seo_urls_enabled is turned on, which it is, of course, as shown here:

<pre>

if ( SEO_URLS_ENABLED != 'false' ) {

// ensure that the broken search engine safe urls are set to off

$this->turnOffBrokenUrls();

$this->getUsuModules();

$this->validate();

}

 

</pre>

 

In the turn off broken Urls function (shown below) we actually update the configuration table, turning 'SEARCH_ENGINE_FRIENDLY_URLS' off, if they were on,

which means they are mutually exclusive - we can not run Ultimate SEO Urls 5 with this switch on, which makes sense to me (mine was already off) but leaves me puzzled.

 

<pre> /**

* Automatically turn off osC Search-Engine Safe URLs (still in development)

*/

private function turnOffBrokenUrls() {

if ( defined( 'SEARCH_ENGINE_FRIENDLY_URLS' ) && ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) ) {

$sql = "UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = 'false' WHERE configuration_key = 'SEARCH_ENGINE_FRIENDLY_URLS'";

tep_db_query( $sql );

}

}</pre>

 

 

If we insure that 'SEARCH_ENGINE_FRIENDLY_URLS' is set to false by changing the database if it was true, how could anything ever fall in to the function osc_href_link, code snippet above?

Am I missing something? I certainly could be. What is the purpose of checking if SEARCH_ENGINE_FRIENDLY_URLS == 'true' if we have already insured it is turned off and could this be preventing a regular osc url from getting its link rebuilt with slashes instead of question mark and ampersand?

 

thanks for your valuable time,

 

p.s. if I messed up how one should reply or post or insert code, someone please let me know...I am new to the oscommerce forum.

wycodeiwyg

Link to comment
Share on other sites

If we insure that 'SEARCH_ENGINE_FRIENDLY_URLS' is set to false by changing the database if it was true, how could anything ever fall in to the function osc_href_link, code snippet above?

 

Am I missing something? I certainly could be. What is the purpose of checking if SEARCH_ENGINE_FRIENDLY_URLS == 'true' if we have already insured it is turned off and could this be preventing a regular osc url from getting its link rebuilt with slashes instead of question mark and ampersand?

 

thanks for your valuable time,

 

p.s. if I messed up how one should reply or post or insert code, someone please let me know...I am new to the oscommerce forum.

wycodeiwyg

 

The SEF urls thing is a standard osCommerce function that is still experimental because it most often simply doesn't work.

 

You are quite correct that USU5 automatically turns it off if it is on to avoid compatibility problems.

 

Why is there code in place to handle these SEF urls when the script automatically turns it off?

 

This is simple to explain .. the configuration values from the configuration table are loaded as defines early on in the bootstrap application_top.php, therefore whether USU5 turns these urls off or not on the first run the defines would be in place if they were set as on .. therefore there is code in place to handle them.

Link to comment
Share on other sites

The SEF urls thing is a standard osCommerce function that is still experimental because it most often simply doesn't work.

 

You are quite correct that USU5 automatically turns it off if it is on to avoid compatibility problems.

 

Why is there code in place to handle these SEF urls when the script automatically turns it off?

 

This is simple to explain .. the configuration values from the configuration table are loaded as defines early on in the bootstrap application_top.php, therefore whether USU5 turns these urls off or not on the first run the defines would be in place if they were set as on .. therefore there is code in place to handle them.

 

Thanks for the quick reply,

 

re: experimental function......Understood--one reason I never installed.

re: why USU5 handles them.....understood. I see the code in application_top you refer to, and see why it is good to insure it is turned off in USU5 code, no further questions here.

 

But what I still don't understand is how any code could fall into these statements in Usu_General_Functions.php in function osc_href_link:

<pre>if ( ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) && ( $search_engine_safe == true ) ) {

while ( strstr( $link, '&&' ) ) $link = str_replace( '&&', '&', $link );

 

$link = str_replace( '?', '/', $link );

$link = str_replace( '&', '/', $link );

$link = str_replace( '=', '/', $link );

 

$separator = '?';

} </pre>

 

NOTHING would ever hit this code, woud it?

 

Well technically, I can think of one situation but that's going out on a tangent. Let's put it this way.....assuming you have USU5 installed and want to continue running it, because it's awesome,

I don't know what code would fall into it and I think this is the code I need my url:

<pre> www.domain.com/brandname.php?action&manufacturers_id-xx </pre>

 

to fall into in order to change it to: <pre> www.domain.com/brandname.php/action/manufacturers_id/xx </pre>

 

which, admittedly is not "pretty" but it at least gets me started in the right direction.

 

I do so much appreciate your time,

wycodeiwyg

Link to comment
Share on other sites

Thanks for the quick reply,

 

re: experimental function......Understood--one reason I never installed.

re: why USU5 handles them.....understood. I see the code in application_top you refer to, and see why it is good to insure it is turned off in USU5 code, no further questions here.

 

But what I still don't understand is how any code could fall into these statements in Usu_General_Functions.php in function osc_href_link:

<pre>if ( ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) && ( $search_engine_safe == true ) ) {

while ( strstr( $link, '&&' ) ) $link = str_replace( '&&', '&', $link );

 

$link = str_replace( '?', '/', $link );

$link = str_replace( '&', '/', $link );

$link = str_replace( '=', '/', $link );

 

$separator = '?';

} </pre>

 

NOTHING would ever hit this code, woud it?

 

Well technically, I can think of one situation but that's going out on a tangent. Let's put it this way.....assuming you have USU5 installed and want to continue running it, because it's awesome,

I don't know what code would fall into it and I think this is the code I need my url:

<pre> www.domain.com/brandname.php?action&manufacturers_id-xx </pre>

 

to fall into in order to change it to: <pre> www.domain.com/brandname.php/action/manufacturers_id/xx </pre>

 

which, admittedly is not "pretty" but it at least gets me started in the right direction.

 

I do so much appreciate your time,

wycodeiwyg

 

Firstly it is important to note that function osc_href_link() is not USU5 code but a total and complete replication of the original osCommerce function tep_href_link(). This function is called when USU5 decides it should not be handling the link as an seo link.

 

Re: your "add on" you would need to create a new module.

 

Let's say the manufacturers id is 35 and the manufacturers name is aardwark you could end up with a link like ..

www.mysite.com/brandname.php/aardwark-bn-35

Link to comment
Share on other sites

OK, great. I can do that.

 

Actually I did do that already but it didn't quite work. I'm sure it was because I didn't properly add in the 'action' dependency. Your instructions were complete though I just didn't see an example passing 'action'. The examples I saw were all database fields. My actions are dynamically built but static in nature: such as: manufacturer_info, photo_gallery, expanded_sorts - nothing complicated and no multiple paths or db fields to go after, etc.

 

Since my other parameter is manufacturers_id I was able to compare to use the other modules for comparison as I stepped through your directions changing the xxx's .

 

Now that I know creating an additional module is indeed the right direction, I will review my new module and if necessary I might have to post another question with regard to how to get action in there correctly as a dependency.

 

Again, thanks.

 

wycodeiwyg

Link to comment
Share on other sites

If you have KissMT installed the canonical element for ..

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html?cPath=27_28_29

 

Would be ...

hawk-dtc30-06-civic-si-rear-hb145w570-p-37.html

 

thereby eradicating any duplicate content.

Yeah that's not happening, it is displaying the cPath for all items. I have "Output canonical tags for SEO" set to true in KissMT on the admin side.

Link to comment
Share on other sites

Hello and thanks for that nice contribution !

 

I have a small problem since a few hours. I have installed google sitemap seo urls. The xml file is ok, but, i don't know why, after setting the cache folder rights (changed to chmod 777 to allow the cache file) in SEO module, the rewritting is gone.

 

I mean I had this before:

 

www.domain.com/myproduct-c-28.html (rewrite mode)

 

now i have:

 

www.domain.com/shop.php(renamed index file)/myproduct-c-28 (like a standard mode)

 

the naming of index.php into shop.php is ok in the htaccess rewritting rules.

 

So I would like to get back my domain.com/product urls mode...

 

The rewritte mode is enabled in the admin control, that's what i don't understand.

 

Thanks for your help, I would like to ask googlebot to visit me asap and showing clean urls

 

Sorry to make a "up", but I do really need help. My sitemap is generated with rewritten urls, but seo doesn't seem rewritting them...

Link to comment
Share on other sites

Robert,

Hey! Thanks for all your past help, hope the compensation served well. I had sent you a couple of emails and not got any replies.

 

If you forgot, my site is www.burgersmarketpc.com/catalog

 

I installed the paypal express/pro module, you can see my post over there. One problem is the columns or tables are jacked up, but I dont think you worked on that part. One part that you did work on was the USU5. Im getting this error when trying to order an item. Please advise! Thanks!

 

Fatal error: Cannot redeclare usu5_base_filename() (previously declared in /home/jscb/public_html/catalog/includes/application_top.php:50) in /home/jscb/public_html/catalog/includes/application_top.php on line 69

Link to comment
Share on other sites

Hello.

Thank you for this great contribution.

 

Currently I have a problem because we change a lot some titles and tags addapting the products names and descriptions to campaings, and resseting the cache.

So, google is fast but not fast enought to pay attention as fast as we need.

The result is a 404 customized by FWRMedia.

 

I have my own 404 page.

Could you please explain me how to use my own 404 instead of yours?

 

better than a 404 could be capturing the terms in the url, and perhaps send to the advanced_search.php, returning google a 301....

 

Thank you

Link to comment
Share on other sites

Hello.

Thank you for this great contribution.

 

Currently I have a problem because we change a lot some titles and tags addapting the products names and descriptions to campaings, and resseting the cache.

So, google is fast but not fast enought to pay attention as fast as we need.

The result is a 404 customized by FWRMedia.

 

I have my own 404 page.

Could you please explain me how to use my own 404 instead of yours?

 

better than a 404 could be capturing the terms in the url, and perhaps send to the advanced_search.php, returning google a 301....

 

Thank you

 

catalog/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php

 

Find ..

 

    // we have decided the page does not exist so we will show our custom 404 error page and header
   private function error404(){
     session_write_close();
     header( "HTTP/1.0 404 Not Found" );
     include_once usu::$usuPath . 'includes' . DIRECTORY_SEPARATOR . 'notfound_404.php';
     exit;
   }

 

Then do two things ..

 

1) Move a copy of your existing 404 file to catalog/includes/modules/ultimate_seo_urls5/includes/

 

2) Then change the following line to reflect your own file name.

 

include_once usu::$usuPath . 'includes' . DIRECTORY_SEPARATOR . 'notfound_404.php';

 

Bear in mind that the 404 header has already been sent so you don't need it in your file.

Edited by FWR Media
Link to comment
Share on other sites

Robert,

Hey! Thanks for all your past help, hope the compensation served well. I had sent you a couple of emails and not got any replies.

 

If you forgot, my site is www.burgersmarketpc.com/catalog

 

I installed the paypal express/pro module, you can see my post over there. One problem is the columns or tables are jacked up, but I dont think you worked on that part. One part that you did work on was the USU5. Im getting this error when trying to order an item. Please advise! Thanks!

 

Robert,

 

Please forgive me on that, I confused you with another. Can you advise to my problem though?

Link to comment
Share on other sites

Robert,

 

Please forgive me on that, I confused you with another. Can you advise to my problem though?

 

Fatal error: Cannot redeclare usu5_base_filename() (previously declared in /home/jscb/public_html/catalog/includes/application_top.php:50) in /home/jscb/public_html/catalog/includes/application_top.php on line 69

 

Means that the function usu5_base_filename() is being called twice. It should only be called once in application_top.php, perhaps you have an old version where this function is in includes/functions/general.php?

Link to comment
Share on other sites

Robert,

 

I have upgraded from the oldest version to the newest version of your mod. In the old version you gave me some code that let me put the manufacturers_name in front of the product name. After I updated I reapplied the same code and thought everything was great. Except in my Google Webmaster Tools I have 100+ duplicate tiles / descriptions.

 

Example: Duplicate title / description

/prowl-sunglasses-tortoise-demi-shiny-blackgrad-brown-flash-mirror-p-930.html ( Link 1 )

/sundog-prowl-sunglasses-tortoise-demi-shiny-blackgrad-brown-flash-mirror-p-930.html ( Link 2 )

Observations:

Link 1 is missing manufacturers_name

Link 2 is the correct format (Manufacturers_name + products_name)

Link 1 always redirects to Link 2 in a web browser. I would assume then that Link 1 returns a 301 redirect to Google.

In my sitemap the links are being sent over correctly.

What can I do? We are in the biggest part of the shopping season for golf and I have been having this problem for over a week now sad.gif

Thanks for any help!

Edited by 32 Degrees
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...