281281 }
282282 .modal-content {
283283 background : var (--dark-gray );
284- padding : 30px ; border-radius : 15 px ;
284+ padding : 30px ; border-radius : 50 px ;
285285 border : 2px solid var (--gold );
286286 width : 90% ; max-width : 450px ;
287287 text-align : center;
294294 }
295295 .modal-btn {
296296 background : var (--gold ); color : var (--black ); font-size : 1.1rem ;
297- border : none; padding : 12 px 24 px ; border-radius : 8px ;
298- cursor : pointer; font-weight : bold; margin : 5 px ;
297+ border : none; padding : 10 px 5 px ; border-radius : 8px ;
298+ cursor : pointer; font-weight : bold; margin : 0 px ;
299299 }
300300 .modal-btn .close { background : # 555 ; color : white; }
301301
@@ -938,18 +938,22 @@ <h2>منتجاتنا النسائية المميزة</h2>
938938 </ div >
939939
940940 < div id ="cartModal " class ="modal ">
941- < div class ="modal-content " style ="max-width: 700px ; ">
941+ < div class ="modal-content " style ="max-width: 100% ; ">
942942 < h3 > سلة التسوق</ h3 >
943- < div id ="cart-items-container " style ="max-height: 400px ; overflow-y: auto; padding: 10px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); margin-bottom: 20px ; min-height: 100px ; ">
943+ < div id ="cart-items-container " style ="max-height: 300px ; overflow-y: auto; padding: 10px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); margin-bottom: 10px ; min-height: 5px ; ">
944944 < p id ="empty-cart-msg "> سلتك فارغة حالياً.</ p >
945945 </ div >
946946 < div id ="cart-summary " style ="text-align: left; padding: 0 10px; ">
947947 < h4 > الإجمالي: < strong id ="cart-total-price "> 0 ريال</ strong > </ h4 >
948948 </ div >
949- < hr style ="border-color: var(--gold); opacity: 0.2; margin: 20px 0; ">
950- < input type ="text " id ="cartCustomerNameInput " placeholder ="الرجاء إدخال اسمك الكريم لإتمام الطلب " required >
951- < button id ="cart-checkout-btn " class ="modal-btn "> < i class ="fab fa-facebook-messenger "> </ i > إتمام الطلب عبر ماسنجر</ button >
952- < button class ="modal-btn close "> متابعة التسوق</ button >
949+ < hr style ="border-color: var(--gold); opacity: 0.2; margin: 5px 0; ">
950+ < input type ="text " id ="cartCustomerNameInput " placeholder ="إدخل اسمك الكريم الثلاثي لإتمام الطلب " required >
951+ < input type ="number " id ="cartCustomerNumberInput " placeholder ="إدخل رقم هاتفك المحمول لإتمام الطلب " required >
952+ < input type ="text " id ="cartCustomerAddressInput " placeholder ="إدخل عنوان تسليم الطلب لإتمام الطلب " required >
953+ < input type ="text " id ="cartCustomerBankInput " placeholder ="إسم البنك الذي تتعامل معه (رقم حوالة) لإتمام الطلب " required >
954+ < button id ="cart-checkout-btn " class ="modal-btn "> < i class ="fab fa-facebook-messenger "> </ i > إتمام الطلب </ button >
955+ < button class ="modal-btn close "> الرجوع لتسوق</ button >
956+ < hr style ="border-color: var(--gold); opacity: 5px; margin: 20px 0; ">
953957 </ div >
954958 </ div >
955959
@@ -1139,7 +1143,7 @@ <h3>${product.name}</h3>
11391143 <input type="number" class="quantity-input" value="1" min="1" readonly>
11401144 <button class="quantity-plus">+</button>
11411145 </div>
1142- <div class="total-price">الإجمالي: <span class="total-price-value">${ product . price . toLocaleString ( ) } </span> ريال</div>
1146+ <div class="total-price"> 🎁 الإجمالي: <span class="total-price-value">${ product . price . toLocaleString ( ) } </span> ريال 🎁 </div>
11431147 <button class="add-to-cart-btn" data-product-id="${ product . id } " data-product-name="${ product . name } " data-product-price="${ product . price } ">أضف إلى السلة</button>
11441148 <div class="floating-share2-buttons">
11451149 <a href="https://www.facebook.com/sharer/sharer.php?u=${ encodeURIComponent ( product . name + ' انصحك بهذا العطر\nفي قسم - العطور النسائية \n\nرابط العطر↓\n ' + window . location . href + ' الأيقونة للعطور - جودة وأصالة\n\nعطور رجاليه ونسائيه واجود انواع البخور\n\nيوجد لدينا التوصيل الى جميع المحافظات اليمنيه\n\n↓روابط الأيقونة للعطور↓\nموقع الويب↓\nhttps://talalye1.github.io/Icon-perfumes\n\nتطبيق المتجر↓\nhttps://talalye1.github.io/Icon-perfumes/الأيقونة.apk\n\nفيسبوك↓\nhttps://facebook.com/@alayqwnt.ll.twr\n\nانستجرام↓\nhttps://www.instagram.com/lyqwn_lltwr\n\nللطلب والإستفسارات راسلنا على الماسنجر↓\nhttps://m.me/alayqwnt.ll.twr ' ) } " target="_blank" class="facebook"><i class="fab fa-facebook-f"></i></a>
@@ -1213,7 +1217,7 @@ <h4>${item.name}</h4>
12131217 discountAmount = subtotal * 0.05 ;
12141218 finalTotal = subtotal - discountAmount ;
12151219 discountMessage = `
1216- <h5 style="color: #ff6b6b;">خصم 5% لفترة محدودة: -${ discountAmount . toLocaleString ( ) } ريال</h5>
1220+ <h5 style="color: #ff6b6b;"> 🎁 خصم 5% لفترة محدودة: -${ discountAmount . toLocaleString ( ) } ريال</h5>
12171221 ` ;
12181222 }
12191223
@@ -1263,7 +1267,22 @@ <h4 style="color: var(--gold); border-top: 1px solid var(--gold); padding-top: 5
12631267 cartCheckoutBtn . onclick = ( ) => {
12641268 const customerName = document . getElementById ( 'cartCustomerNameInput' ) . value . trim ( ) ;
12651269 if ( ! customerName ) {
1266- alert ( 'الرجاء إدخال اسمك لإتمام الطلب.' ) ;
1270+ alert ( 'الرجاء إدخال اسمك الثلاثي لإتمام الطلب.' ) ;
1271+ return ;
1272+ }
1273+ const customerNumber = document . getElementById ( 'cartCustomerNumberInput' ) . value . trim ( ) ;
1274+ if ( ! customerNumber ) {
1275+ alert ( 'الرجاء إدخال رقم هاتفك لإتمام الطلب.' ) ;
1276+ return ;
1277+ }
1278+ const customerAddress = document . getElementById ( 'cartCustomerAddressInput' ) . value . trim ( ) ;
1279+ if ( ! customerAddress ) {
1280+ alert ( 'الرجاء إدخل عنوان التسليم لإتمام الطلب.' ) ;
1281+ return ;
1282+ }
1283+ const customerBank = document . getElementById ( 'cartCustomerBankInput' ) . value . trim ( ) ;
1284+ if ( ! customerBank ) {
1285+ alert ( 'الرجاء إدخل اسم البنك الذي تتعامل معه (ورقم الحوالة ان وجدت) لإتمام الطلب.' ) ;
12671286 return ;
12681287 }
12691288 if ( cart . length === 0 ) {
@@ -1280,16 +1299,16 @@ <h4 style="color: var(--gold); border-top: 1px solid var(--gold); padding-top: 5
12801299 if ( now < discountEndDate ) {
12811300 const discountAmount = subtotal * 0.05 ;
12821301 finalTotal = subtotal - discountAmount ;
1283- discountInfo = `\nالإجمالي قبل الخصم: ${ subtotal . toLocaleString ( ) } ريال\nخصم 5%: -${ discountAmount . toLocaleString ( ) } ريال` ;
1302+ discountInfo = `\nالإجمالي قبل الخصم 💵 : ${ subtotal . toLocaleString ( ) } ريال\nخصم 🎁 5%: -${ discountAmount . toLocaleString ( ) } ريال` ;
12841303 }
12851304
1286- let message = `مرحباً مبيعات الأيقونة للعطور،\nأنا ${ customerName } ، وأرغب في طلب المنتجات التالية:\n\n` ;
1305+ let message = `👋 مرحباً مبيعات الأيقونة للعطور،\n\n👤انا ${ customerName } ، \nرقم هاتفي 📱: ${ customerNumber } ، \nعنوان تسليم الطلبية 🏘️: ${ customerAddress } ، \nإرسال قيمة الشراء عبر 🏦: ${ customerBank } ، \n\nأرغب في طلب شراء المنتجات التالية 🔎 :\n\n` ;
12871306 cart . forEach ( item => {
1288- message += `المنتج: ${ item . name } \ nالكمية: ${ item . quantity } \nالسعر: ${ ( item . price * item . quantity ) . toLocaleString ( ) } ريال\n \n` ;
1307+ message += `المنتج 📦 : ${ item . name } \n\nفي قسم العطور النسائية:\nرابط القسم 🔗:\n ${ window . location . href } \ nالكمية ✨ : ${ item . quantity } \nالسعر 💵 : ${ ( item . price * item . quantity ) . toLocaleString ( ) } ريال\n` ;
12891308 } ) ;
12901309
1291- message += `${ discountInfo } \n\nالسعر الإجمالي للطلب: ${ finalTotal . toLocaleString ( ) } ريال\n` ;
1292- message += `\nالرابط المرجعي: ${ window . location . href } \n\nشكراً لكم.` ;
1310+ message += `${ discountInfo } \n\nالسعر الإجمالي للطلب 💵 : ${ finalTotal . toLocaleString ( ) } ريال\n` ;
1311+ message += `\nالرابط المرجعي الرئيسي 🔗 : ${ window . location . href } \n\nشكراً لكم ❤️ .` ;
12931312
12941313 const messengerLink = `https://m.me/alayqwnt.ll.twr?text=${ encodeURIComponent ( message ) } ` ;
12951314 window . open ( messengerLink , '_blank' ) ;
0 commit comments