Page 1 of 2

[TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FIXED

Posted: Wed Aug 29, 2012 2:51 am
by Qphoria
Fixed Script!

If you upgraded from a previous version of OpenCart, you will notice that OpenCart v1.5.4 doesn't show your product tags anymore. OpenCart no longer uses the old "product_tag" table. I didn't get a chance to add a conversion to the upgrade script that came with 1.5.4, but not to worry, the old table wasn't deleted, just ignored. Tags are now stored in the product_description table in the new "tags" column.

This attached script will convert the tags from the old table to the new.
1. Upload the attached file to your opencart root directory
2. Open it in your browser. (http://mysite.com/tags-v154v2.php)
3. Wait for "Tags Converted"

This was tested briefly but should work on larger stores. Let me know if there are any issues.

It will copy the old tags for each product to the new column for each product.
It will also convert all tags to "lowercase" as required by 1.5.4.x. Be sure to update any hard links. tags should be lowercase anyway.
In this version, I have disabled the dropping of the product_tag table. This way nothing will be lost in case of any problems.

FYI. If your 1.5.4 products already have new tags, the old tags will OVERWRITE the new.

I will be sure to drop the product_tag table when I merge this script into v1.5.5's upgrade script

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Aug 30, 2012 1:27 am
by Michel
Thanks, Qphoria!
V2 did the trick, ;)

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Aug 30, 2012 2:28 am
by i2Paq
Works great!

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Tue Sep 18, 2012 11:10 pm
by MattW
Perfect! ;)

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Sep 27, 2012 5:48 am
by Greetings
Qphoria wrote:Fixed Script!

If you upgraded from a previous version of OpenCart, you will notice that OpenCart v1.5.4 doesn't show your product tags anymore. OpenCart no longer uses the old "product_tag" table. I didn't get a chance to add a conversion to the upgrade script that came with 1.5.4, but not to worry, the old table wasn't deleted, just ignored. Tags are now stored in the product_description table in the new "tags" column.

This attached script will convert the tags from the old table to the new.
1. Upload the attached file to your opencart root directory
2. Open it in your browser. (http://mysite.com/tags-v154v2.php)3. Wait for "Tags Converted"

This was tested briefly but should work on larger stores. Let me know if there are any issues.

It will copy the old tags for each product to the new column for each product.
In this version, I have disabled the dropping of the product_tag table. This way nothing will be lost in case of any problems.

FYI. If your 1.5.4 products already have new tags, the old tags will OVERWRITE the new.

I will be sure to drop the product_tag table when I merge this script into v1.5.5's upgrade script

Page not found. My tags are all gone.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Sep 27, 2012 12:32 pm
by Greetings
Okay,

I got as far as going to the point of tags converted. However when I click on a tag at the bottom of the page. I get nothing coming up in the search.

Does anyone know a fix for this?

1.5.4

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Fri Sep 28, 2012 11:11 pm
by ADD Creative
It's a case sensitive problem. I think because the tag Column has a Collation of utf8_bin in the database, OpenCart's search will not find it as it converts the search term to lower case and then does a case sensitive search (MATCH AGAINST on utf8_bin) against the tags. As your tags have a capital letter they can't be found.

There will also be a problem if the tags are less than 4 characters long (assuming MySQL default).

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Sat Sep 29, 2012 2:32 pm
by Greetings
HI Thanks Add creative,

Now if I change all my tags to lower case, they should start working again?

Also my search feature in the product description doesn't work whether in capts or not. It doesn't seem to find anything. for example. If I search silver (small letters) it finds exactly the same if I search Silver with a capital. Now the problem of the search feature is that it doesn't find anything. (well only product out of 290 plus)

What does this mean? I can't have capitals in the product description?

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Sun Sep 30, 2012 3:26 am
by ADD Creative
Changing your tags to lower case should get around the problem.

There also does seem to be a similar sort of problem with the description search as well.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Sat Oct 20, 2012 5:08 am
by ProfiSale
Tags have appeared, but not the sort to him.
If the tag looks like "tag1", then everything works. Sought only to products that have the tag "tag1".
If the tag of goods "tag Item 1", shows all the products in the category.
Thus, does not work, if the tags are more than one word.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Wed Oct 24, 2012 2:53 pm
by POS
I can confirm that tags that either/or have:

- space ( a phrase in stead of a single word)
- special caracter (æ ø å are special caracters, supported by UTF-8)

the tags will not work. But they worked flawlessly in 1.4.9

What is the fix for this? Any ideas?


EDIT: No, it's not always like that. I investigated a little more, and now some phrases work too. (with space) But some phrases (most) do not work...

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Wed Oct 24, 2012 4:21 pm
by ADD Creative
There is more about this issue in the 1.5.4 bug thread.
http://forum.opencart.com/viewtopic.php ... 80#p348880

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Tue Nov 06, 2012 4:14 am
by nikythebest
Hello,
I tried to use your script but i've got this: product_tag table not found. Perhaps you already ran this script
I want to tell you that i installed 1.5.4 but i got old sql table by table from 1.5.1 and where was missing a column i created it. Please tell me what i have to do.

Thank you

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Sun Nov 18, 2012 6:18 am
by ForgetfulGuru
Hi, upgrading at last. trying out your script for moving the tags and I get an error

Code: Select all

Notice: Error: Unknown column 'tag' in 'field list'
Error No: 1054
UPDATE product_description SET tag = '12floz,bedtime bathtime,calming,status jar' WHERE product_id = '51' in /****/*******/******/system/database/mysql.php on line 49
Is this an error at my end or should I wait for an updated update script. Worst case would be rewriting tags I only got a few hundred products anyway...

Okay how do I get rid of the script or consequences of the script. Product pages now showing this error

Code: Select all

Notice: Undefined index: tag in /home/c20amlc/public_html/catalog/model/catalog/product.php on line 23
for every product.

Okay fixed. Had to manually edit tables in the db, somehow they got missed or wiped or something.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Tue Nov 20, 2012 12:47 pm
by mongkolbest
in my opinion

why do you use this?

description table in 1.5.3 is very large already but if you use plus tag data with it .
it will be insane gigantic data at one table !!!

(i have more >> 50 MB in description table size alone not include tags)

please enlighten user why you use this method?

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Nov 22, 2012 10:20 pm
by Qphoria
This is the wrong area for this question.
This is simply a mod to convert from the old tags table to the new tags table. I don't make the rules.. I'm just helping people get converted.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Wed Nov 28, 2012 3:33 am
by digidude
i have used opencart for a while, and have been happy with 1.4.9.3 (i think) for a while, but, after seeing a new theme pack, and buying it, i found out that i also needed to update opencart istelf, and this is where my problems began.

last year, i moved servers, so had to move my opencart from one domain to another, which i managed to complete, so, i also had the old setup to practice this upgrade on, and following the instructions contained within the opencart package, managed to completley destroy my old setup. after a few hours on google, i found that its not as easy as the included update instructions made out, and that my old shop was now beyond repair, so, i copied my new shop, to the old location, and it was running again (after database exports, imports, etc) just to use to test things on
in the last 6 weeks, i have become a MASTER at moving opencart from one srver to another, editing the required configs, importing and exporting databases, but, i am still stuck on 1.4.9.3, as EVERY way i have tried to update my shop, ends up in a page of messed up text

im on the verge of abandoning my old shop, and 'starting over' as i have spent the last 8 hours solid, FTP'ing my backup, importing my database, and trying again, with EVERY version of opencart, to try and get up to date, and now see that theres an issue between 1.5.x versions???

is it worth me even trying to keep up to date?

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Wed Nov 28, 2012 1:07 pm
by Qphoria
First, Why are you hijacking this topic ?
Second, what "issues" are in 1.5.x?
Get 1.5.4.1 fix the 3 or 4 bugs shown in the bug thread... they are like 2 second line edits
and stay there for a while. There will always be some new feature and some new bug... this should not have any effect on the outcome of your upgrades. I would suggest 1.5.4.1 as that is the most stable 1.5.x version and has the largest mod base.

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Thu Dec 20, 2012 2:58 pm
by dynamictemplate
Thanks. Good work!

Re: [TAGS] 1.5.x to 1.5.4 Product Tag Conversion Script - FI

Posted: Fri Mar 08, 2013 1:14 pm
by coolksa
i have test it on my opencart 1.5.5.1, and it's working perfectly.

thought i am using Arabic language and the tag search is not working, i think it may need to be modified from tag search to regular search until the Dev team figure a solution for it.

regards