Jump to content
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

Recommended Posts

As mentioned previously, the conversion works for me. Perhaps it is something specific to your site/server? I don't have any way to reproduce it so I can't offer any help.

Share this post


Link to post
Share on other sites

hmm maybe you can tell me what you get when you put:

function strip($string){

if (CHARSET == 'utf-8') {

$string = iconv("ISO-8859-1", "UTF-8", $string); <- this in my web, do nothing.

}

print_r($string); <---- This in that function (line 1843). If you will have question marks it would be known, the problem is in database? Am i correct?

Share this post


Link to post
Share on other sites

I've install this plugin, but I'm trying to have custom URLs per product. For example.

 

Black Backpack - I don't want it to be: black-backpack-p-21.html. I'd like to rewrite it to /black-backpack.

 

Is not possible to specify a custom URL per product? Like a custom a slug?

Share this post


Link to post
Share on other sites

Problem with special characters is because of using SEO_DataBase class, function mysql_connect is not using correctly utf8 also this function is deprecated, more information wrote this user: http://pl1.php.net/manual/en/function.mysql-connect.php#108721

When i've done that, all of my urls was without text, someone else wrote that all data needs to be converted through utf8_encode(string) but that, i didn't tried. I will try to rewrite this to use oscommerce database functions or maybe someone already did it ?

Share this post


Link to post
Share on other sites

Just thought I'd mention, the seo_class.php is not compatible with PHP5.5 and you will get error messages


"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Share this post


Link to post
Share on other sites

I've install this plugin, but I'm trying to have custom URLs per product. For example.

 

Black Backpack - I don't want it to be: black-backpack-p-21.html. I'd like to rewrite it to /black-backpack.

 

Is not possible to specify a custom URL per product? Like a custom a slug?

 

 

You could try this module - I havent installed it - but it seems like this is what you looking for

 

http://addons.oscommerce.com/info/8206


"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Share this post


Link to post
Share on other sites

Just thought I'd mention, the seo_class.php is not compatible with PHP5.5 and you will get error messages

 

Both the Ultimate SEO Urls and the Google XML Sitemap module which uses Chemo's  MySQL database class does not work in PHP 5.5.26


"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Share this post


Link to post
Share on other sites

Hi,

 

Is it possible to add the category into the url looking the same as an subfolder?

 

category-product-p-1.html -> category/product-p-1.html

 

Thanks!

Share this post


Link to post
Share on other sites

@@lbdublb I seem to recall someone posting a change that will allow that somewhere in this thread. Though I've no idea how long ago it was or even if it works.

Share this post


Link to post
Share on other sites

We installed this contribution and it works great on the main pages.  However, the admin sections no longer works.  Going to admin takes the user to a blank page (no error message).  If I leave out step 5 from the install instructions, it works fine.

 

This may be because we've renamed the admin directory and password protected the entire directory for security reasons.

 

Below is the code added in step 5:

 

// Function to reset SEO URLs database cache entries
// Ultimate SEO URLs v2.2d
function tep_reset_cache_data_seo_urls($action){       
  switch ($action){
    case 'reset':
    case 'uninstall':
       tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'");
       tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");

       if ($action == 'reset') break;
   
       tep_db_query("DELETE FROM configuration_group WHERE configuration_group_title LIKE '%seo_urls%'");
      tep_db_query("DELETE FROM configuration WHERE configuration_key LIKE 'SEO%' OR configuration_key LIKE 'USE_SEO%'");
    break;   
    default:
    break;
  }
  # The return value is used to set the value upon viewing
  # It's NOT returining a false to indicate failure!!
  return 'false';
}

Share this post


Link to post
Share on other sites

The code you show is just a function being added. Unless it was added incorrectly it couldn't cause a failure by itself. There is another change made in admin to the categories.php file (step 4). Since you didn't mention it maybe you missed it? Blank pages generally mean the code was added incorrectly or to the wrong file so you should recheck both of those.

Share this post


Link to post
Share on other sites

I did check step 4 and it looks like this is right.  Here is what I have:

 

 require('includes/application_top.php');

  require(DIR_WS_CLASSES . 'currencies.php');
  $currencies = new currencies();

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
 
 // Ultimate SEO URLs v2.2d
// If the action will affect the cache entries
   if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');

  // PSM BEGIN 4a
  if(!empty($_POST)){
 if(!empty($_POST['shipping_methods'])){
  $shipping_methods = implode(';',$_POST['shipping_methods']);
   }else{
  $shipping_methods = NULL;
 }
  }
  // PSM END 4a

 

Are there any other recommendations you have?  We have a lot of other contributions installed so I wonder if there could be a conflict.  Let me know if you have any other thoughts.  Thanks!

Share this post


Link to post
Share on other sites

The original code block would look something like this on a standard as you can see you have a modification there did you remember to upload the

admin/includes/reset_seo_cache.php forgetting would cause a blank page done myself :D

require('includes/application_top.php');

  require(DIR_WS_CLASSES . 'currencies.php');
  $currencies = new currencies();

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Ultimate SEO URLs v2.2d
// If the action will affect the cache entries
   if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');

  if (tep_not_null($action)) {
    switch ($action) {
      case 'setflag':
        if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
          if (isset($HTTP_GET_VARS['pID'])) {
            tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
          }

          if (USE_CACHE == 'true') {
            tep_reset_cache_block('categories');
            tep_reset_cache_block('also_purchased');
          }
        }


Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

@@johnwurzbacher The code change you show is correct. It might be that when you added the function that you added it within another function. Try removing the change from the functions file, and maybe the one from the categories file. If the pages still fail to load it is something else not related to this addon since those are the only changes made by it. You could also ask your host to check if the admin is showing any errors in the error log. That would help isolate the problem if there is.

Share this post


Link to post
Share on other sites

Hi All,

I am using ULTIMATE Seo Urls in one of my website with German language.

I have a problem with the url that is having the German mutated vowels: ö ä ü.

Currently all this german vowels are removed from the links. I want to make it visibal in the url.
So can anyone guide me how to do this?

 

I have read through the forum help but did not find exact solution.

I have tried it on admin settings with "Enter special character conversions" to something like ä=>ae but its not working, its still removing the special char. instead of "ae".

 

Is it right format for special character conversion?

Or where can i setup it using file? where i can mention all special characters to be converted accordingly.

Thanks in advance.

Regards
Tejas

Share this post


Link to post
Share on other sites

My SEO Url stopped working  - only on product pages, i.e when you click on the single product it returns 404 error.

 

Not sure if this has something to do but I installed wordpress recently, in a folder of my shop domain www.myshopdomain/blog

Could this cause htacces conflict?

 

I now deleted the wordpress htaccess but it didn't help. Had to switch of Ultimate SEO for now.

Share this post


Link to post
Share on other sites

The WP change shouldn't have caused a problem unless it changed the .htaccess file in the shops root directory. You should make sure that file has the correct contents. If so, try using the uninstall setting in Ultimate SEO and refreshing the home page to re-install it.

Share this post


Link to post
Share on other sites

Thanks.

 

Strange, but I change wp blog domain, so it is no longer inside my shop in subfolder and links work again.

 

I created a subdomain of my shop domain and pointed subdomain to folder with wp, so wp and shop are on separate domains now.

Share this post


Link to post
Share on other sites

@@De Dokta

 

@Tsimi
 
Hi Lambros,
 
are you sure that you are running this SEO tool? I can't find a seo.class.php in this addon, but in this one: Ultimate SEO URLs.

 

Solution for that: http://forums.oscommerce.com/topic/154166-contribution-ultimate-seo-urls-v21-by-chemo/page-345#entry1692222 (and following)

 

J.J.

 

(w00t) ......... :lol: ........... :blush: ........... :ph34r:

 

wrong topic! lol

 

Thanks J.J. for pointing me to the right direction/topic.

According to Mort-lemur the fix "could" interfere with some payment methods? Do you have more info on that issue?

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@Tsimi

 

No, I couldn't reproduce this error.  :unsure:    After Mort-Lemur reported this problem I tested several payment moduls - they all worked without any problems. I have no idea how this changes could have implications on payment modules at all!?

 

BTW: These days we discussed in the German forum to replace the old functions in seo.class.php by the default osc tep_db_ functions. This can be done but requires further changes of the installation functions, while the replacement of mysql_ by mysqli_ does not require further modifications. The easiest way is what I have done - the best way probably would be to use the tep_db_ functions.... :-

 

J.J.

Share this post


Link to post
Share on other sites

for PHP 5 some ideas

seo.class.php

 

find:

ereg_replace
replace:

preg_replace

find:

if ( eregi('cPath', $params) ){

replace:

if (preg_match('/' . cPath .'/i', $params)) {

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

×