Jump to content
spidometrs

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

Recommended Posts

6 hours ago, Rwe said:

seems this url takes the system down and CHARSET cannot be found. ?

I agree with @azproThe log entry is definitely a hacking attempt. The CHARSET notice isn't caused by it., though  

Share this post


Link to post
Share on other sites
21 hours ago, Jack_mcs said:

Are you getting the notice in both languages? Are you using a new version of  this addon? It might be the last hook that was added. Try using the previous version. You will have to remove the hook file and add the code to the application_top file.

Yes Jack it was in both languages. I am going to upgrade to PHOENIX 1.0.6.0 and reinstall and will get back to you with the result. Thank you

Share this post


Link to post
Share on other sites

Hi dear;

After the update of latest ultimate seo url in phoenix 1.0.6.0, I am having a issue it is also reformatting the urls on the product info page and shopping cart URLS such that it removes all query string that starts with a ?xxxxxx and change them to a folder / type URL...

Any help or guidance will be deeply appreciated.

Thanks in advance for big help

Regds.

radhavallabh

Share this post


Link to post
Share on other sites

Please provide a better example (full url's but the domain can be fake). The way you describe it doesn't sound like it is for this addon.

Share this post


Link to post
Share on other sites

@Jack_mcs

I attach one example here-

Original URL of remove button on shopping cart is - https://xxxx/xxx/shopping_cart.php?products_id=4465{2}61&action=remove_product

After I turn on the module:-

Remove Icon shows this as the URL which does not work when i click-    https://xxx/xxxx/shopping_cart.php/products_id/4465{2}61/action/remove_product

After I turn off the module:-

Remove Icon shows this as the URL which does not work when i click-    https://xxx/xxxx/shopping_cart.php/products_id/4465{2}61/action/remove_product

One more thing i need too remove the SEO URL function from the html_output.php and reinstate the original to get them back to original which works.

Your help will be deeply appreciated;

Regds./

radhavallabh

Share this post


Link to post
Share on other sites

The format looks similar to the search engine url's controlled by a setting in older shops. That setting has been removed from Phoenix but it might be in your database. This addon should disable it if it is but maybe that is not working in Phoenix for some reason, if that is the reason. In any event, formatting the url like that is not something this addon does. It never formats the url as you show. The SEO 5 addon does do that so maybe that is the one you are using? 

Share this post


Link to post
Share on other sites
Posted (edited)

681568317_Screenshot_2020-05-20OSCOMCEPhoenixAdministrationTool.thumb.png.27026a19abba7faa28f20dec18dd6f92.png

6 minutes ago, Jack_mcs said:

The format looks similar to the search engine url's controlled by a setting in older shops. That setting has been removed from Phoenix but it might be in your database. This addon should disable it if it is but maybe that is not working in Phoenix for some reason, if that is the reason. In any event, formatting the url like that is not something this addon does. It never formats the url as you show. The SEO 5 addon does do that so maybe that is the one you are using? 

I installed this addon dear- https://apps.oscommerce.com/36rDo&ultimate-seo-urls

I have been using it since years :) ... But it is not working on Phoenix this time...

I use the database by Phoenix only...

Edited by radhavallabh

Share this post


Link to post
Share on other sites

I have it installed in a Phoenix 1.0.6.0 shop and it is working as expected. The url for when the delete button on the shopping cart is clicked doesn't look as you show it. But the shop I have it installed in doesn't use attributes and your url shows attributes are used so maybe that is the problem. Please try checking it on a product that does not have attributes.

Share this post


Link to post
Share on other sites
51 minutes ago, Jack_mcs said:

I have it installed in a Phoenix 1.0.6.0 shop and it is working as expected. The url for when the delete button on the shopping cart is clicked doesn't look as you show it. But the shop I have it installed in doesn't use attributes and your url shows attributes are used so maybe that is the problem. Please try checking it on a product that does not have attributes.

I will uninstall it completely and retry then... Hope issue goes away then..

Share this post


Link to post
Share on other sites
Posted (edited)

Dear I checked while reinstalling that the html_output function has changed alot in 1.0.6.0 it has completely removed the search engine safe url part-

// The HTML href link wrapper function
  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
    global $request_type, $session_started, $SID;

    $page = tep_output_string($page);

    if (!tep_not_null($page)) {
      die('<h5>Error!</h5><p>Unable to determine the page link!</p>');
    }

    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL) {
        $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
      } else {
        $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
      }
    } else {
      die('<h5>Error!</h5><p>Unable to determine connection method on a link!</p><p>Known methods: NONSSL SSL</p>');
    }

    if (tep_not_null($parameters)) {
      $link .= $page . '?' . tep_output_string($parameters);
      $separator = '&';
    } else {
      $link .= $page;
      $separator = '?';
    }

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( $add_session_id && $session_started && (SESSION_FORCE_COOKIE_USE == 'False') ) {
      if (isset($SID) && tep_not_null($SID)) {
        $_sid = $SID;
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && ENABLE_SSL ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
        if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
          $_sid = session_name() . '=' . session_id();
        }
      }
    }

    if (isset($_sid)) {
      $link .= $separator . tep_output_string($_sid);
    }

    while (strpos($link, '&&') !== false) $link = str_replace('&&', '&', $link);
    
    $link = str_replace('&', '&amp;', $link);

    return $link;
  }

Is this difference causing this issue for me.. in SEO class file??

Edited by radhavallabh

Share this post


Link to post
Share on other sites
10 minutes ago, radhavallabh said:

Is this difference causing this issue for me.. in SEO class file??

No. The code checks if it exists before doing anything with it. Since it doesn't exist, the code in the class file just skips it.

Share this post


Link to post
Share on other sites
Posted (edited)
9 minutes ago, Jack_mcs said:

No. The code checks if it exists before doing anything with it. Since it doesn't exist, the code in the class file just skips it.

Ok I reupload everything after uninstalling it from admin;

It works on the remove button now :), but update qty button is posing issues if i try using it twice or thrice...it stops updating

Edited by radhavallabh

Share this post


Link to post
Share on other sites

If something is wrong in the shop, as with the last problem, then it might appear to be this addon but this addon can't be the cause since it has nothing to do with the shopping cart. I suggest you install a clean, new shop and install this addon. If it works correctly, which it should, then you can compare the two shops to find the cause of the problem.

Share this post


Link to post
Share on other sites
Posted (edited)

Works perfect now dear just need one more help please :)

 

I need to urlencode the product url like I did in original shopping cart module product listing--  as my host does not allow phrases(due to attributes) in URLS.

<a href="' . tep_href_link('product_info.php', 'products_id=' . urlencode($product['id'])) .'">' . $product['name'] . '</a>'

So how to urlencode the URL- with Seourls as it stops working the way it should when i have the module turned on.

Can you guide me where to add the urlencode in SEO.class file please.

Regds./

radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites

You can try this change but I've not tested it.  Around line 700 in the seo.class.php file, find this line

$parameters = str_replace('&amp;', '&', $parameters);

and add this after it

$parameters = urlencode($parameters);

 

Share this post


Link to post
Share on other sites
15 hours ago, Jack_mcs said:

You can try this change but I've not tested it.  Around line 700 in the seo.class.php file, find this line


$parameters = str_replace('&amp;', '&', $parameters);

and add this after it


$parameters = urlencode($parameters);

 

Hi dear this returns a blank page... :(

Share this post


Link to post
Share on other sites

I'm sorry but I can't spend any time working on a problem specific to a certain host. Maybe someone else will have an answer for you. For what it's worth, I think the Phoenix developers are working on a built-in url rewriter. It might be better to just turn this one off and wait to see what they come up with.

Share this post


Link to post
Share on other sites
3 minutes ago, Jack_mcs said:

I think the Phoenix developers are working on a built-in url rewriter.

I can tell you that we are not. 

There is a third party who wrote a slug-based URL rewriter that might be adaptable into something integrated with mod_rewrite.  But I don't know if that is going to launch and would not be built-in. 

 


Always back up before making changes.

Share this post


Link to post
Share on other sites

@radhavallabh - whatever solution approach you arrived at when you raised this four years ago should still work. If you struggle to get it working on this version, create your own thread to get help on it.

 


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
31 minutes ago, BrockleyJohn said:

@radhavallabh - whatever solution approach you arrived at when you raised this four years ago should still work. If you struggle to get it working on this version, create your own thread to get help on it.

 

Thank you for guiding me back dear; It did help :) You are really superb to find that golden script from the past....🙏🙏

It did help me achieve the links to redirect to the product page BUT without attribute selection; 😔

On default Phoenix it redirects to product URL with attributes selected.... Can we achieve the similar way of working??

 

Also I noticed it does not correctly parse the URLS of the Navbar Shopping cart on default Phoenix 1.0.6.1 too please can you help fix it.. It is not the urlencode error, it actually does not parse the product urls on it..

 

Your help will be deeply appreciated ;

Regds./

radhavallabh

Share this post


Link to post
Share on other sites

Hi ,

The module is not correctly creating the navbar shopping cart product url in Phoenix 1.0.6.1..

It creates the URL of the product without the name like this for example- https://xxx/xxx/-p-4466{2}61.html

As you can see it does not create the name before the -p-

Kindly help;

Regds./

radhavallabh

 

Share this post


Link to post
Share on other sites

It gets the name from the name of the product or, if you have Header Tags SEO installed,  from its title. In the case of the latter, you have to fill in the names.

Share this post


Link to post
Share on other sites
Posted (edited)
15 minutes ago, Jack_mcs said:

It gets the name from the name of the product or, if you have Header Tags SEO installed,  from its title. In the case of the latter, you have to fill in the names.

I do not use Header Tags SEO.. and SEO URLS module works fine all across store only the Navbar Shopping cart does not fetch the names...

Edited by radhavallabh

Share this post


Link to post
Share on other sites

Then I don't know why that might be happening. I've checked it here in several shops and it works in each. 

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

×