Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SEO Friendly Urls - a new approach


gadlol

Recommended Posts

On 5/18/2019 at 11:51 AM, gadlol said:

Hi Richard @freakystreak

Thank you for your good words.

Can you please tell me which version of oscommerce you have installed and using? This is strange, it was never mentioned to me such kind of problem...

From what I can understand is that when you navigate for example to mystore.com/admin/ there must be a something that prevents admin backend to load because my seo class thinks that is also another page. Although it is a folder.

So first I would make sure that the admin backend does not call seo_friendly_urls.php which is the normal thing and then I would check the apache - server configuration.

I have checked the admin backend and I can't see any call to 'seo_friendly_urls.php. Can you advise me as to what I should look out for regarding the Apache Server configuration?

 

Thank you.

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Gadiol, hope you are well.

Been struggling to find an answer to this problem I still have logging into my admin using your fine contribution. I have double checked to see if your class, seo_friendly_urls is called and the answer is no. I'm at a loss now as to where to go from here. I can access the site admin but I said in my previous post, have to disable your add-on, log in and then re-enable your add on again. The version of PHP has changed. Could this effect anything? Is there anything specific I should look-out for in my Apache Server Configuration? Many thanks.

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

On 6/3/2019 at 2:43 PM, freakystreak said:

Hi Gadiol, hope you are well.

Been struggling to find an answer to this problem I still have logging into my admin using your fine contribution. I have double checked to see if your class, seo_friendly_urls is called and the answer is no. I'm at a loss now as to where to go from here. I can access the site admin but I said in my previous post, have to disable your add-on, log in and then re-enable your add on again. The version of PHP has changed. Could this effect anything? Is there anything specific I should look-out for in my Apache Server Configuration? Many thanks.

Hi Richard... Can you please send me some more info such as your website url e.t.c. so to go from there... Please send them to p.m. and lets continue from there... and once we solve the problem we will post the solution here... Thank you ..

Check out the great Alternative Administration System addon for osCommerce!

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Hi @gadlol

 

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/xxx/public_html/includes/classes/seo_friendly_urls.php on line 380

 

while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){

What is the best approach to replace the each? Versions from 7.0 get that warning.. Really wanted to upgrade PHP to the new version.

Also for the alias pages is there any way to add a functionality for multilingual alias?

Best regards

Link to comment
Share on other sites

1 hour ago, sinopia said:

Hi @gadlol

 

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/xxx/public_html/includes/classes/seo_friendly_urls.php on line 380

 

while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){

What is the best approach to replace the each? Versions from 7.0 get that warning.. Really wanted to upgrade PHP to the new version.

Also for the alias pages is there any way to add a functionality for multilingual alias?

Best regards

Hi @sinopia 

about the while loop there is not an easy way to do it with just foreach  loops and without having the need to use recursive function. However I have code it and update it so no need of each so no deprecated messages and plus the class runs faster now. Send me p.m. for more details.

About the "Also for the alias pages is there any way to add a functionality for multilingual alias?" do you mean for example: www.mystore.com/specials.php to www.mystore.com/es/specials/ ?

Regards,

John

Check out the great Alternative Administration System addon for osCommerce!

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...
  • 5 months later...

Hello all, just a quick question. Is it possible to change the url of a product from: https://mysite.com/abk10-advent-black-compatible-inkjet-cartridge.html

to: https://mysite.com/abk10.html.

I just want the model number in the url and not the product name. Been looking through trying to find out where the url is generated from but can't find anything that helps. I understand that this is quite old now but my website (2.3.4.1 -Frozen) is working well otherwise and I am using the PRO version of the app.

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...
On 10/25/2019 at 1:37 PM, sinopia said:

Hi @gadlol

 

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/xxx/public_html/includes/classes/seo_friendly_urls.php on line 380

 

while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){

What is the best approach to replace the each? Versions from 7.0 get that warning.. Really wanted to upgrade PHP to the new version.

Also for the alias pages is there any way to add a functionality for multilingual alias?

Best regards

Change while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){

TO while ( $loop && ( ( $option = each_new( $children[$parent] ) ) || ( $parent > $root_id ) ) ){

and add new function

    function each_new(&$arr) {
        $key = key($arr);
        if ($key === null) return false;
        $val = current($arr);
        next($arr);
        return [1 => $val, 'value' => $val, 0 => $key, 'key' => $key];
    }

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