We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb89b25 commit d2a7a8dCopy full SHA for d2a7a8d
src/CommunityStore/Product/ProductList.php
@@ -425,7 +425,14 @@ public function finalizeQuery(\Doctrine\DBAL\Query\QueryBuilder $query)
425
}
426
if (!$this->showOutOfStock) {
427
$query->andWhere("pQty > 0 OR pQtyUnlim = 1");
428
+
429
+ $query->andWhere($query->expr()->or('pDateAvailableStart IS NULL',
430
+ $query->expr()->lte('pDateAvailableStart', $query->createNamedParameter(date('Y-m-d H:i:s')))));
431
432
+ $query->andWhere($query->expr()->or('pDateAvailableEnd IS NULL',
433
+ $query->expr()->gte('pDateAvailableEnd', $query->createNamedParameter(date('Y-m-d H:i:s')))));
434
435
436
if ($this->activeOnly) {
437
$query->andWhere("pActive = 1");
438
0 commit comments