feat(inventory): link online order reservations to database hold and sync numerical stock in RSS/Torob feeds
Deploy Canina / deploy (push) Successful in 3m44s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s

This commit is contained in:
devops committed 2026-10-12 20:24:49 +00:00
1 parent 01de33ff2b
commit d6a2136c70
3 files changed
+28 -8

No files matched your search

@@ -153,11 +153,14 @@ export async function GET(request: NextRequest) {
: `${baseUrl}${proxied.startsWith('/') ? proxied : `/${proxied}`}`;
}
const isInStock =
product.stockStatus !== 'OUT_OF_STOCK' &&
product.stockStatus !== 'out_of_stock' &&
product.stockStatus !== 'DISCONTINUED' &&
product.inStock !== false;
const isOutOfStock =
product.stockStatus === 'OUT_OF_STOCK' ||
product.stockStatus === 'out_of_stock' ||
product.stockStatus === 'DISCONTINUED' ||
product.inStock === false ||
(typeof product.stock === 'number' && product.stock <= 0);
const isInStock = !isOutOfStock;
const price = Number(product.priceValue || product.price || 0);
const oldPrice = Number(product.oldPrice || product.priceValue || product.price || 0);