Jump to content

Advice needed


Recommended Posts

Hi Guys,

 

I am looking to upgrade my CC5.2.2 installation (first to 5.2.3 then on to 5.2.4) by manually editing all the files listed in the file diffs uploaded by BSmither.

 

I know this will take time but i'm wondering if there is anything i need to do to upgrade / alter my database, e.g. is there a command i need to run after i have manually made my changes?

 

It's just that i noticed a new file in the list called /setup/db/upgrade/5.2.3.sql in the list and wondered if this changed anything and if i am doing manual changes i won't be running the setup wizard

 

Thanks for any enlightenment

Link to comment
Share on other sites

The SQL statements in that file modify the database structiure of contents to accommodate what was fixed or added in the code. In this case, a product's Google Category is is now in the database, and a coupon's status as "apply to subtotal only" is recorded.

 

You can enter those statements in CubeCart's Maintenance, Advanced tab, or feed them to your database via phpMyAdmin. (Take note if your database uses any prefix for the tables.)

 

When you get to CC524, there is a file named /setup/scripts/upgrade/5.2.5.php. In here is a PHP statement that deletes the /includes/lib/OFC folder. The Diff_File also has you removing this folder.

Link to comment
Share on other sites

  • 2 months later...

Hi Guys,

 

Finally got around to manually updating to 5.2.3 but when i tried the SQL statements i got the following message;

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE  `CubeCart_inventory` ADD  `google_category` VARCHAR( 250 ) NULL' at line 1

 

Can you shed any light on this for me? I tried it from my admin panel and also in PhpMyAdmin and i get the same message.

Link to comment
Share on other sites

I don't know if any newer versions of MySQL (after 5.1) can handle this, but I think the problem is that table names and table column names that do not yet exist or are used as operands in a function (such as ADD) cannot be enclosed in backticks (although I see this in plenty of other places, and the statement as is works fine on my MySQL 5.0). So, try:

 

ALTER TABLE  `CubeCart_inventory` ADD  google_category VARCHAR( 250 ) NULL;

 

Note the removed backticks that had enclosed google_category.

 

Does your CubeCart database use a table prefix?

Link to comment
Share on other sites

This part of the phrase:

the right syntax to use near 'ALTER

tells us that the problem is just in front of ALTER.

 

The only way I can see this happening is if you have copied something in front of where you saw ALTER, and that something is now on the clipboard with ALTER and gets pasted in the edit box where you have been trying to execute the statement. That something could be a file's Byte Order Mark (BOM), a TAB character (I ran into that once, but generally white space is ignored), a hard-space (character 160), some other control code that is otherwise invisible, etc.

 

You say you have already got this done, so trying other things is moot now.

 

Did you try to just simply manually keyboard the statement into the edit box?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...