Shveiauto commited on
Commit
f1118b2
·
verified ·
1 Parent(s): 63f993a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -714,40 +714,40 @@ def catalog():
714
  return;
715
  }
716
  let total = 0;
717
- let orderText = "🛍️ *Новый Заказ от Soola Cosmetics* 🛍️%0A%0A";
718
- orderText += "----------------------------------------%0A";
719
  orderText += "*Детали заказа:*%0A";
720
- orderText += "----------------------------------------%0A";
721
  cart.forEach((item, index) => {
722
  const itemTotal = item.price * item.quantity;
723
  total += itemTotal;
724
  const colorText = item.color !== 'N/A' ? ` (${item.color})` : '';
725
- orderText += `${index + 1}. *${item.name}*${colorText}%0A`;
726
- orderText += ` Кол-во: ${item.quantity}%0A`;
727
- orderText += ` Цена: ${item.price.toFixed(2)} ${currencyCode}%0A`;
728
- orderText += ` *Сумма: ${itemTotal.toFixed(2)} ${currencyCode}*%0A%0A`;
729
  });
730
- orderText += "----------------------------------------%0A";
731
- orderText += `*ИТОГО: ${total.toFixed(2)} ${currencyCode}*%0A`;
732
- orderText += "----------------------------------------%0A%0A";
733
 
734
  if (userInfo && userInfo.login) {
735
- orderText += "*Данные клиента:*%0A";
736
- orderText += `Имя: ${userInfo.first_name || ''} ${userInfo.last_name || ''}%0A`;
737
- orderText += `Логин: ${userInfo.login}%0A`;
738
  if (userInfo.phone) {
739
  orderText += `Телефон: ${userInfo.phone}%0A`;
740
  }
741
- orderText += `Страна: ${userInfo.country || 'Не указана'}%0A`;
742
- orderText += `Город: ${userInfo.city || 'Не указан'}%0A`;
743
  } else {
744
- orderText += "*Клиент не авторизован*%0A";
745
  }
746
- orderText += "----------------------------------------%0A%0A";
747
 
748
  const now = new Date();
749
  const dateTimeString = now.toLocaleString('ru-RU', { dateStyle: 'short', timeStyle: 'short' });
750
- orderText += `Дата заказа: ${dateTimeString}%0A`;
751
  orderText += `_Сформировано автоматически_`;
752
 
753
  const whatsappNumber = "996997703090";
 
714
  return;
715
  }
716
  let total = 0;
717
+ let orderText = "🛍️ *Новый Заказ от Soola Cosmetics* 🛍️";
718
+ orderText += "----------------------------------------";
719
  orderText += "*Детали заказа:*%0A";
720
+ orderText += "---------------------------------------- ";
721
  cart.forEach((item, index) => {
722
  const itemTotal = item.price * item.quantity;
723
  total += itemTotal;
724
  const colorText = item.color !== 'N/A' ? ` (${item.color})` : '';
725
+ orderText += `${index + 1}. *${item.name}*${colorText} `;
726
+ orderText += ` Кол-во: ${item.quantity} `;
727
+ orderText += ` Цена: ${item.price.toFixed(2)} ${currencyCode} `;
728
+ orderText += ` *Сумма: ${itemTotal.toFixed(2)} ${currencyCode} `;
729
  });
730
+ orderText += "----------------------------------------";
731
+ orderText += `*ИТОГО: ${total.toFixed(2)} ${currencyCode} `;
732
+ orderText += "---------------------------------------- ";
733
 
734
  if (userInfo && userInfo.login) {
735
+ orderText += "*Данные клиента: ";
736
+ orderText += `Имя: ${userInfo.first_name || ''} ${userInfo.last_name || ''} `;
737
+ orderText += `Логин: ${userInfo.login} `;
738
  if (userInfo.phone) {
739
  orderText += `Телефон: ${userInfo.phone}%0A`;
740
  }
741
+ orderText += `Страна: ${userInfo.country || 'Не указана'} `;
742
+ orderText += `Город: ${userInfo.city || 'Не указан'} `;
743
  } else {
744
+ orderText += "*Клиент не авторизован ";
745
  }
746
+ orderText += "---------------------------------------- ";
747
 
748
  const now = new Date();
749
  const dateTimeString = now.toLocaleString('ru-RU', { dateStyle: 'short', timeStyle: 'short' });
750
+ orderText += `Дата заказа: ${dateTimeString} `;
751
  orderText += `_Сформировано автоматически_`;
752
 
753
  const whatsappNumber = "996997703090";