fix : in category page, send products that have at least on variant

This commit is contained in:
morteza-mortezai
2025-10-26 13:15:25 +03:30
parent b955f89be0
commit 1e38c353f2
+2 -1
View File
@@ -1673,7 +1673,8 @@ export class ProductRepository extends BaseRepository<IProduct> {
{
$match: {
$expr: {
$or: [{ $gt: [{ $size: { $ifNull: ["$variants", []] } }, 0] }, { $eq: ["$category.theme", "noColor_noSize"] }],
// $or: [{ $gt: [{ $size: { $ifNull: ["$variants", []] } }, 0] }, { $eq: ["$category.theme", "noColor_noSize"] }],
$gt: [{ $size: { $ifNull: ["$variants", []] } }, 0],
},
},
},