Post by Qphoria » Wed Aug 29, 2012 2:51 am

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

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Michel » Thu Aug 30, 2012 1:27 am

Thanks, Qphoria!
V2 did the trick, ;)

Vriendelijke groet,

Michel


New member

Posts

Joined
Sat Oct 01, 2011 5:06 pm
Location - Utrecht, The Netherlands

Post by i2Paq » Thu Aug 30, 2012 2:28 am

Works great!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

UPGRADE to 2.x: Contemplate before thou begins!

Our FREE search: Find your answer FAST!.

BUGs?: Known BUGS for All OC Versions.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by MattW » Tue Sep 18, 2012 11:10 pm

Perfect! ;)

Image


User avatar
New member

Posts

Joined
Sat Aug 28, 2010 11:37 am
Location - Sheffield

Post by Greetings » Thu Sep 27, 2012 5:48 am

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.

Newbie

Posts

Joined
Mon Aug 13, 2012 11:13 am

Post by Greetings » Thu Sep 27, 2012 12:32 pm

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

Attachments

Tags on Products.JPG

Products have the tags back but when clicked on nothing shows up - Tags on Products.JPG (51.54 KiB) Viewed 61150 times

No search for product tags.JPG

Has no search results for the product tags - No search for product tags.JPG (60.47 KiB) Viewed 61150 times


Newbie

Posts

Joined
Mon Aug 13, 2012 11:13 am

Post by ADD Creative » Fri Sep 28, 2012 11:11 pm

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

ADD Creative - Web development and e-commerce development, Milton Keynes or Christchurch, UK
ADD Filtration - HVAC Panel Filters, Bag Filters and HEPA Filters


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am

Post by Greetings » Sat Sep 29, 2012 2:32 pm

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?

Newbie

Posts

Joined
Mon Aug 13, 2012 11:13 am

Post by ADD Creative » Sun Sep 30, 2012 3:26 am

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.

ADD Creative - Web development and e-commerce development, Milton Keynes or Christchurch, UK
ADD Filtration - HVAC Panel Filters, Bag Filters and HEPA Filters


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am

Post by ProfiSale » Sat Oct 20, 2012 5:08 am

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.

Newbie

Posts

Joined
Sat Oct 20, 2012 4:58 am

Post by POS » Wed Oct 24, 2012 2:53 pm

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

POS
Newbie

Posts

Joined
Tue Mar 22, 2011 11:34 pm

Post by nikythebest » Tue Nov 06, 2012 4:14 am

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

New member

Posts

Joined
Thu Sep 15, 2011 3:54 am

Post by ForgetfulGuru » Sun Nov 18, 2012 6:18 am

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.

Life is for the taking. It's everything else you need to pay for.
Anne Makes Lovely Candles


User avatar
New member

Posts

Joined
Sun Jul 22, 2012 11:12 pm
Location - Left hand corner as you enter the room, better feng shui.

Post by mongkolbest » Tue Nov 20, 2012 12:47 pm

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?

Newbie

Posts

Joined
Tue Jul 12, 2011 8:55 am

Post by Qphoria » Thu Nov 22, 2012 10:20 pm

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.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by digidude » Wed Nov 28, 2012 3:33 am

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?

Newbie

Posts

Joined
Wed Nov 28, 2012 2:01 am

Post by Qphoria » Wed Nov 28, 2012 1:07 pm

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.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dynamictemplate » Thu Dec 20, 2012 2:58 pm

Thanks. Good work!

Professional OpenCart Themes and OpenCart Templates at Dynamic Template


User avatar
New member

Posts

Joined
Thu Dec 13, 2012 6:52 pm


Post by coolksa » Fri Mar 08, 2013 1:14 pm

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

Newbie

Posts

Joined
Fri Mar 08, 2013 1:09 pm
Who is online

Users browsing this forum: No registered users and 31 guests