diff --git a/admin/products.php b/admin/products.php
index a54dc8e..6a04893 100644
--- a/admin/products.php
+++ b/admin/products.php
@@ -21,6 +21,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) {
$promo_discount_percent = !empty($_POST['promo_discount_percent']) ? (float)$_POST['promo_discount_percent'] : null;
$promo_date_from = !empty($_POST['promo_date_from']) ? $_POST['promo_date_from'] : null;
$promo_date_to = !empty($_POST['promo_date_to']) ? $_POST['promo_date_to'] : null;
+ $is_loyalty = isset($_POST['is_loyalty']) ? 1 : 0;
$image_url = null;
if ($id) {
@@ -201,7 +202,14 @@ include 'includes/header.php';
-
= htmlspecialchars($product['name']) ?>
+
+ = htmlspecialchars($product['name']) ?>
+
+
+ Loyalty
+
+
+
= htmlspecialchars($product['name_ar'] ?? '') ?>
@@ -339,15 +347,14 @@ include 'includes/header.php';
-
-
+
Promotion Settings
@@ -399,6 +406,7 @@ function prepareEditForm(p) {
document.getElementById('productPromoDiscount').value = p.promo_discount_percent || '';
document.getElementById('productPromoFrom').value = p.promo_date_from || '';
document.getElementById('productPromoTo').value = p.promo_date_to || '';
+ document.getElementById('productIsLoyalty').checked = p.is_loyalty == 1;
if (p.image_url) {
const preview = document.getElementById('productImagePreview');
@@ -448,4 +456,4 @@ async function translateTo(targetLang) {
-
+
\ No newline at end of file