{ "main_coupon": null, "coupons": [ { "t

← العودة
Blog Post

عنوان المحادثة: { "main_coupon": null, "coupons": [ { "type": "percentage", ...

التاريخ: 22.11.2025

التصنيف: 🛒 التجارة الإلكترونية والتسويق

إجمالي الرسائل: 2 | ياسر: 0 | M: 2

المحادثة الكاملة - 22.11.2025
M
{ "main_coupon": null, "coupons": [ { "type": "percentage", "value": 5.0, "max_discount": 100.0, "name": "Mira" }, { "type": "fixed", "value": 15.0, "name": "mira" } ]}
22.11.2025 00:28
M
# حساب السعر النهائي مع الخصومات if coupon_percent > 0 and has_main_coupon and channel_code: # حساب السعر مع كلا الخصمين temp_price = new_p_int * (1 - channel_discount/100) # خصم القناة أولاً final_price = temp_price * (1 - coupon_percent/100) # خصم الكوبون ثانياً text += f"✨ وزيادة على كذا…\nمع {discount_description} وكودي {channel_code} ينزل السعر لـ {int(final_price)} ريال" elif has_main_coupon and channel_code: # خصم القناة فقط (بدون كوبون منتج) final_price_channel = new_p_int * (1 - channel_discount/100) text += f"✨ وزيادة على كذا…\nمع كودي {channel_code} ينزل السعر لـ {int(final_price_channel)} ريال" else: # بدون كوبون منتج - عرض الكود إذا كان موجود if has_main_coupon and channel_code: try: final_price_channel = new_p_int * (1 - channel_discount/100) text += f"✨ وزيادة على كذا…\nمع كودي {channel_code} ينزل السعر لـ {int(final_price_channel)} ريال" except: pass
22.11.2025 00:38
← العودة إلى الرئيسية