View Issue Details

IDProjectCategoryView StatusLast Update
0005216OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2013-11-13 09:10
Status resolvedResolutionduplicate 
Product Version4.5.11 revision 46050 
Target VersionFixed in Version 
Summary0005216: incorrect date in oxinsert column in oxorderarticles
Descriptionin oxid 4.5.11 EE

incorrect date is saved in oxinsert column in oxorderticles on order.

oxorder->execute calls oxorder::_setOrderArticles which calls oxOrderArticles::copyThis($oProduct)

oxOrderArticles::copyThis appears to copy oxarticle__oxinsert to oxorderarticle_oxinsert, which it should not do.

oxorderarticle_oxinsert should be current date

date in oxarticle__oxinsert is in t.m.Y format when loaded with german locale
but on save date needs to be in Y-m-t format.

this happens because oxarticle::load() gets oxarticles__oxinsert with current locale

$this->oxarticles__oxinsert = new oxField(oxUtilsDate::getInstance()->formatDBDate( $this->oxarticles__oxinsert->value));

when this information is copied to oxorderarticles it is not converted back to US format before save.

therefore we get dates in the future, dates in the past... lots of strange stuff...

I've included a fix for this bug as a module


Steps To ReproduceMake an order with German locale

MySql with US locale

Additional Informationfix as module:

 * CM
 * fix for incorrect date in oxinsert column in oxorderarticles
class soloxOrderArticle extends soloxOrderArticle_parent
    public function save(){
        //oxinsert should not be modified on update
            $simpleDateFormat = oxLang::getInstance()->translateString(
            $simpleDate = oxUtilsDate::getInstance()->formatDBDate(
            $this->oxorderarticles__oxinsert = new oxField(

        $blRet = parent::save();
        return $blRet;
TagsNo tags attached.
PHP Version5.3
Database Versionany


related to 0000704 resolvedrimvydas_paskevicius OXINSERT is zero 



2013-06-19 16:13

reporter   ~0008798

this bug appears to be related to issue 0000704

How exactly was this bug fixed way back when? There appears to be no change log for 4.1.0 revision 17976

as far as i can tell oxinsert values are correct in oxarticles but i don't really understand why.


2013-11-13 09:10

reporter   ~0009264

From quick look to code, currently fix is in method - copyThis()

if ( $sFieldName == "oxorderarticles__oxinsert" ) {
 oxDb::getInstance()->convertDBDate( $this->$sFieldName, true );