Post by chrisgwynne » Wed Jan 30, 2019 9:46 pm

Hello

I've just upgraded to the latest version of OC from 2.3.0.2 - in 2.3.0.2 I have SEO URL filled out on 5000 products. Now on v3 they're blank. Have I made an error somewhere or doesn't this get converted over? How do I fix without manually redoing every URL?

Kind regards,
Chris

New member

Posts

Joined
Fri Nov 11, 2016 7:33 am

Post by xxvirusxx » Wed Jan 30, 2019 10:19 pm

Check seo_url table from phpMyAdmin to see if is empty.
If is empty you can easily convert url_alias(from 2.3.0.2) to seo_url(from 3.0.2.0) table using a text editor

Example:
url_alias

Code: Select all

(824, 'product_id=48', 'ipod-classic'),
seo_url

Code: Select all

(824, 0, 1, 'product_id=48', 'ipod-classic'),
If you made backup before :)

Opencart 2.3.0.2 Bugs Fix Added | Opencart 2.3.0.2 Custom Version | Opencart 3.0.3.1 Bugs Fix Added


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by brian47374 » Wed Nov 13, 2019 7:18 am

I have the exact same issue. However, I am not clear on what you are using the text editor for. Are you renaming the url_alias to seo_url? Would you be so kind as to elaborate on this process a little more in detail?

Thanks,

New member

Posts

Joined
Tue Sep 24, 2013 9:51 pm

Post by letxobnav » Wed Nov 13, 2019 11:17 pm

Well, upgrading OC always goes wrong.

For this particular issue:
V3 uses a different table name, different column names and added 2 columns for seo urls.

V2

Code: Select all

CREATE TABLE IF NOT EXISTS `oc_url_alias` (
  `url_alias_id` int(11) NOT NULL AUTO_INCREMENT,
  `query` varchar(255) NOT NULL,
  `keyword` varchar(255) NOT NULL,
  PRIMARY KEY (`url_alias_id`),
  KEY `query` (`query`),
  KEY `keyword` (`keyword`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
V3

Code: Select all

CREATE TABLE IF NOT EXISTS `oc_seo_url` (
  `seo_url_id` int(11) NOT NULL AUTO_INCREMENT,
  `store_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL,
  `query` varchar(255) NOT NULL,
  `keyword` varchar(255) NOT NULL,
  PRIMARY KEY (`seo_url_id`),
  KEY `query` (`query`),
  KEY `keyword` (`keyword`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
So, if you have an export of the V2 table, you need to edit that to conform to the V3 table before importing.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by brian47374 » Thu Nov 14, 2019 10:19 am

I exported the v2.0.3.2 (url_alias_id) to csv and then edited the table columns to be named the same and in order as the seo_url table. I then imported them into the 3.0.3.2 seo_url and the data imported. However, all of the store_id and language_id values are set to “0” which occurred when I imported the csv file.

Now, when I go to the products, I still do not see anything in the product tabs to display the change. Is there something that I am missing? Is there some sort of cache issue?

New member

Posts

Joined
Tue Sep 24, 2013 9:51 pm

Post by letxobnav » Thu Nov 14, 2019 1:21 pm

check what your language's language_id is (probably 1) and update the table seo_url setting language_id to that.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by brian47374 » Thu Nov 14, 2019 9:43 pm

Great! It worked!!! Saved me A LOT of work.

Thank you very much!

New member

Posts

Joined
Tue Sep 24, 2013 9:51 pm
Who is online

Users browsing this forum: No registered users and 6 guests