Release 0.265: ShopPromotion date_from and edit save fix

This commit is contained in:
2026-02-13 22:44:07 +01:00
parent d824ba3909
commit 88e5673569
24 changed files with 1334 additions and 436 deletions

View File

@@ -28,7 +28,7 @@ class Promotion extends DbModel
if ( !$objectData )
{
$results = $mdb -> select( 'pp_shop_promotion', 'id', [ 'AND' => [ 'status' => 1, 'OR' => [ 'date_to' => null, 'date_to[>=]' => date( 'Y-m-d' ) ] ], 'ORDER' => [ 'id' => 'DESC' ] ] );
$results = $mdb -> select( 'pp_shop_promotion', 'id', [ 'AND' => [ 'status' => 1, 'OR #date_from' => [ 'date_from' => null, 'date_from[<=]' => date( 'Y-m-d' ) ], 'OR #date_to' => [ 'date_to' => null, 'date_to[>=]' => date( 'Y-m-d' ) ] ], 'ORDER' => [ 'id' => 'DESC' ] ] );
$cacheHandler -> set( $cacheKey, $results );
}
@@ -84,4 +84,4 @@ class Promotion extends DbModel
}
return $basket;
}
}
}