move from SQLite to MariaDB

This commit is contained in:
2025-12-28 14:20:04 +01:00
parent 5d30577232
commit ac492b1301
7 changed files with 421 additions and 387 deletions
+1 -1
View File
@@ -699,7 +699,7 @@ function getCartItemCount(itemId) {
//check if item can be added to cart (if item_stock > cart_item_count)
async function canAddToCart(itemId) {
const item_stock = await getItemStock(itemId);
const item_stock = (await getItemStock(itemId)) || 0;
const cart_item_count = getCartItemCount(itemId);
return item_stock > cart_item_count;
}