die musterdenker

Update OXID eShop from PE 3.X to PE 4.1.5 SQL issues

Tags: , , ,

I recently did an update from an old OXID eShop Version PE 3.0.4 to the newest Version of PE 4.1.5.

Although most of the things went well I ran into several problems. Sharing the solutions here might help you and will for sure help me for the next update :)

1. no cumulative updates: As there are no cumulative updates you are forced to do each update step separately from Version 4.0.0.0 to 4.1.5. As there is only an updatescript from 3.0.4. to 4.0.0.0 you are forced to do all 9! updates afterwards. OXID promised that there will be cumulative updates in the future so you’ll be able to say “give me a patch from 4.0.0.0 to 4.1.X and you’ll get a single file. But as we are not living in the future (yet) here is a simple list of 9 SQL scripts you have to execute to come from freshly updated 4.0.0.0 to version 4.1.5. Be aware that there are also 2 PHP files you have to copy to doc root and execute after the according SQL has been executed.
Download all OXID update SQLs at once.

2. OXACTIVE > 1 in oxarticles table: The oxactive field in oxarticle table is responsible to activate/deactivate an article. Allowed values are 0 and 1. But after update it may happen that you have a lot of “2″s as values, leading to “half active” articles. I can tell you, thats quite confusing ;) . Here is the accorind note by OXID and with the following SQL you can fix it:

UPDATE oxarticles SET oxactive = 0 WHERE oxactive > 1

3. Old orders have sum of 0 and all articles of an old order have thr price of 0. Nearly all entries in the order overview in admin might become “0″ after an update. The reasons are new fields in oxorder and oxorderarticles tables. These fields might not be filled. Thats why you’ll need the following SQL:

update oxorderarticles set oxbprice = oxprice where oxbprice = 0 and oxprice <> 0

update oxorderarticles set oxnprice = ((oxprice*100) / (100 + oxvat)) where oxnprice = 0 and oxprice <> 0

UPDATE `oxorder` AS _main SET _main.oxtotalordersum = _main.oxdelcost + _main.oxpaycost + _main.oxwrapcost – _main.oxdiscount + ( SELECT SUM( oxbrutprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ), _main.oxtotalbrutsum = ( SELECT SUM( oxbrutprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ), _main.oxtotalnetsum = ( SELECT SUM( oxnetprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ) WHERE _main.oxtotalnetsum = 0 AND _main.oxtotalbrutsum = 0 AND _main.oxtotalordersum = 0;

An according note by OXID about the third of these SQLs. The first two I build myself.

Of course all the files and SQLs are without ANY warranty and you use them at your own risk! Don’t forget a backup before you do anything!

Please leave feedback :)

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BlinkList
  • LinkedIn
  • MisterWong
  • MySpace
  • Netvibes
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Yigg

Tags: , , ,

2 Responses to “Update OXID eShop from PE 3.X to PE 4.1.5 SQL issues”


  1. Update OXID eShop from PE 3.X to PE 4.1.5 SQL issues « die … | 7Dollar
    on Sep 23rd, 2009
    @ 11:56

    [...] from:  Update OXID eShop from PE 3.X to PE 4.1.5 SQL issues « die … Share and [...]


  2. Replica jerseys
    on Jul 31st, 2010
    @ 04:45

    hey,you have posted such a effectful article that it will certainly help me.

Leave a Reply

© 2009 die musterdenker. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.