Advertisement:

Author Topic: Help Please - remove underscore from links.. Possible?  (Read 660 times)

merry88

  • Newbie
  • *
  • Posts: 13
Help Please - remove underscore from links.. Possible?
« on: July 20, 2018, 01:53:07 pm »
I would like to implement this:
Quote
    So to change these underscores to hyphen, you need to go to your osclass database and run SQL query with following:

UPDATE oc_t_category_description
SET s_slug = REPLACE(s_slug, '_', '-')

And that’s it. All categories and subcategories have now hyphens in between.   

I need step guide from a good Samaritan here on where exactly to replace code. Thanks

Does this even work?

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Help Please - remove underscore from links.. Possible?
« Reply #1 on: July 20, 2018, 03:18:29 pm »
Hello,

I will try to write a short guide for this but be careful, you don't want to mess something in the database.

  • Login to your cPanel.
  • Open phpMyAdmin
  • Click on osclass database on the left sidebar, if you don't know which one is it, open config.php from FTP and look for the database name.
  • Now you should see a list of tables in the sidebar, tables are named like this 'prefixt_item' for example. Remember the prefix, the part before 't_'
  • Click on the SQL tab.
  • Paste this code and replace 'prefix' with a prefix you found in step above.
Code: [Select]
UPDATE prefixt_category_description SET s_slug = REPLACE(s_slug, '_', '-')
    [/li]
  • Click on run.
  • If you got a tick icon, it means it changed the underscores and it's done. If you get a cross icon, there is an error, you probably put wrong table name - the wrong prefix.

Regards.

merry88

  • Newbie
  • *
  • Posts: 13
Re: Help Please - remove underscore from links.. Possible?
« Reply #2 on: July 21, 2018, 08:21:32 am »
Thank very much!