Osclass forums
Support forums => Tips, tricks, and tutorials => Topic started by: merry88 on July 20, 2018, 01:53:07 pm
-
I would like to implement this:
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?
-
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.
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.
-
Thank very much!