1
0
mirror of synced 2024-11-21 21:06:09 +03:00

Добавление переводов для программы лояльности (#356)

This commit is contained in:
Kocmonavtik 2024-08-08 09:47:15 +03:00 committed by GitHub
parent 10745c4c8d
commit 6a6a4545b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 542 additions and 216 deletions

View File

@ -1,3 +1,7 @@
## 2024-08-06 v.6.5.24
- Добавлены переводы текста в программе лояльности
- Установка функционала программы лоялности перенесена в настройки модуля
## 2024-08-06 v.6.5.23
- Исправлена ошибка с присвоением externalId при добавлении товара в заказ как разные товарные позиции из CRM

View File

@ -1 +1,2 @@
- Исправлена ошибка с присвоением externalId при добавлении товара в заказ как разные товарные позиции из CRM
- Добавлены переводы текста в программе лояльности
- Установка функционала программы лоялности перенесена в настройки модуля

View File

@ -0,0 +1,2 @@
<?php
$MESS ['USER_PROPERTY_NAME'] = "Name of the custom property block";

View File

@ -0,0 +1,29 @@
<?php
$MESS["main_register_sms"] = "Confirmation code from SMS:";
$MESS["PERSONAL_PHONE"] = "Phone";
$MESS["main_register_sms_send"] = "Send";
$MESS["UF_REG_IN_PL_INTARO"] = "Register in loyalty program";
$MESS["UF_AGREE_PL_INTARO"] = "loyalty programs:";
$MESS["I_AM_AGREE"] = "I agree to the terms and conditions";
$MESS["UF_PD_PROC_PL_INTARO"] = "personal data processing:";
$MESS["LP_CARD_NUMBER"] = "Loyalty program card number";
$MESS["SEND"] = "Send";
$MESS["TRY_AGAIN"] = "Try Again";
$MESS["VERIFICATION_CODE"] = "Confirmation Code";
$MESS["SEND_VERIFICATION_CODE"] = "Send confirmation code";
$MESS["REG_LP_MESSAGE"] = "Enter your phone number and loyalty program card number to complete your loyalty program registration.";
$MESS["YES"] = "Yes";
$MESS["BONUS_CARD_NUMBER"] = "Loyalty card number (if any):";
$MESS["SUCCESS_PL_REG"] = "You have successfully registered in the loyalty program.";
$MESS["LP_FIELDS_NOT_EXIST"] = "PL module installation error. UF fields for USER are missing.";
$MESS["REG_LP_ERROR"] = "Error of registration in the Loyalty Program";
$MESS["REGISTER_CONTINUE"] = "Fill out the form to complete your registration in the loyalty program.";
$MESS["UF_CARD_NUM_INTARO"] = "Loyalty card number (if any)";
$MESS["REGISTER_LP_TITLE"] = "Registration in the loyalty program";
$MESS["NOT_AUTHORIZED"] = "You are not logged in. To register, please follow the <a href=\"./lp-register\">link</a>";
$MESS["LP_NOT_ACTIVE"] = "Loyalty program is not active at the moment";
$MESS["SEC"] = "seconds";
$MESS["RESEND_SMS"] = "Send sms again";
$MESS["RESEND_POSSIBLE"] = "It is possible to resend sms via";
$MESS["LOYALTY_CONNECTION_ERROR"] = "There are problems connecting to the remote server. Try reloading the page.";
$MESS ["NO_VALID_EMAIL"] = "Check that your email is filled in correctly";

View File

@ -26,3 +26,4 @@ $MESS["SEC"] = "сек.";
$MESS["RESEND_SMS"] = "Отправить смс повторно";
$MESS["RESEND_POSSIBLE"] = "Повторная отправка смс возможна через";
$MESS["LOYALTY_CONNECTION_ERROR"] = "Возникли проблемы с подключением к удаленному серверу. Попробуйте перезагрузить страницу.";
$MESS ["NO_VALID_EMAIL"] = "Проверьте правильность заполнения email";

View File

@ -67,7 +67,7 @@ function activateAccount() {
)
if (emailViolation) {
$('#errMsg').text('Проверьте правильность заполнения email')
$('#errMsg').text(BX.message("NO_VALID_EMAIL"));
return;
}

View File

@ -0,0 +1,4 @@
<?php
$MESS ['COMP_MAIN_USER_SCORE_TITLE'] = "Personal cabinet of the RetailCRM loyalty program";
$MESS ['COMP_MAIN_USER_SCORE_DESCR'] = "Personal cabinet of the RetailCRM loyalty program participant";
$MESS ['MAIN_USER_GROUP_NAME'] = "User";

View File

@ -0,0 +1,11 @@
<?php
$MESS ['NOT_AUTHORIZED'] = 'You are not authorized on the site';
$MESS['YES'] = 'Yes';
$MESS['NO'] = 'No';
$MESS['CARD_NOT_LINKED'] = 'Card is not linked';
$MESS['TOP_LEVEL'] = 'you have reached the highest privilege level!';
$MESS['ERRORS'] = 'An error has been detected: ';
$MESS['LP_NOT_ACTUAL'] = 'Your membership ID was not detected in the loyalty program.';
$MESS['LOYALTY_CONNECTION_ERROR'] = 'There was a problem connecting to the remote server. Please reload the page.';
$MESS['MODULE_NOT_INSTALL'] = 'Loyalty program is unavailable. Probably, the module of integration with RetailCRM is not installed';

View File

@ -0,0 +1,2 @@
<?php
$MESS ['USER_PROPERTY_NAME'] = "Name of the custom property block";

View File

@ -0,0 +1,43 @@
<?php
$MESS['main_register_sms'] = 'Confirmation code from SMS:';
$MESS['PERSONAL_PHONE'] = 'Phone';
$MESS['main_register_sms_send'] = 'Send';
$MESS['UF_REG_IN_PL_INTARO'] = 'Register in loyalty program';
$MESS['UF_AGREE_PL_INTARO'] = 'loyalty program:';
$MESS['I_AM_AGREE'] = 'I agree to the terms and conditions';
$MESS['UF_PD_PROC_PL_INTARO'] = 'processing of personal data:';
$MESS['LP_CARD_NUMBER'] = 'Loyalty program card number';
$MESS['SEND'] = 'Send';
$MESS['VERIFICATION_CODE'] = 'Confirmation Code';
$MESS['SEND_VERIFICATION_CODE'] = 'Send Confirmation Code';
$MESS['REG_LP_MESSAGE'] = 'Enter your phone number and loyalty program card number to complete your loyalty program registration';
$MESS['YES'] = 'Yes';
$MESS['BONUS_CARD_NUMBER'] = 'Loyalty card number (if any):';
$MESS['SUCCESS_PL_REG'] = 'You have successfully registered in the loyalty program.';
$MESS['LP_FIELDS_NOT_EXIST'] = 'PL module installation error. UF fields for USER are missing';
$MESS['REG_LP_ERROR'] = 'Error of registration in the Loyalty Program';
$MESS['REGISTER_CONTINUE'] = 'Fill in the form to complete registration in the Loyalty Program.';
$MESS['UF_CARD_NUM_INTARO'] = 'Loyalty card number (if any)';
$MESS['REGISTER_LP_TITLE'] = 'Registration in the loyalty program';
$MESS['LOYALTY_LEVEL_ID'] = 'Participation ID';
$MESS['ACTIVE'] = 'Account Activity';
$MESS['LOYALTY_LEVEL_NAME'] = 'Current level name:';
$MESS['ORDERS_SUM'] = 'All-time purchase amount:';
$MESS['NEXT_LEVEL_SUM'] = 'Amount of purchases required to advance to the next level:';
$MESS['BONUS_COUNT'] = 'Bonuses on account:';
$MESS['CARD'] = 'Bonus card number:';
$MESS['PHONE'] = 'Phone number assigned:';
$MESS['REGISTER_DATE'] = 'Registration date:';
$MESS['LOYALTY_LEVEL_TYPE'] = 'Current level rules:';
$MESS['BONUS_PERCENT'] = 'Cashback from value';
$MESS['BONUS_CONVERTING'] = '1 bonus is awarded for every';
$MESS['PERSONAL_DISCOUNT'] = 'personalized discount';
$MESS['EACH_RUB'] = 'purchase rubles';
$MESS['SIMPLE_PRODUCTS'] = 'Common items:';
$MESS['SALE_PRODUCTS'] = 'Promotional items:';
$MESS['REMAINING_SUM'] = 'Amount remaining before moving to the next level:';
$MESS['ACTIVATE'] = 'Activate';
$MESS['STATUS'] = 'Participation Status';
$MESS['STATUS_NOT_CONFIRMED'] = 'not confirmed';
$MESS['STATUS_DEACTIVATED'] = 'deactivated';
$MESS['STATUS_ACTIVE'] = 'active';

View File

@ -0,0 +1,3 @@
<?
$MESS ['USER_PROPERTY_NAME'] = "Name of the custom property block";
?>

View File

@ -0,0 +1,3 @@
<?php
$MESS ['INTARO_NOT_INSTALLED'] = "Integration module with RetailCRM is not installed";

View File

@ -0,0 +1,85 @@
<?php
$MESS["AUTH_REGISTER"] = "Registration";
$MESS["REGISTER_CAPTCHA_TITLE"] = "Protection against automatic registration";
$MESS["REGISTER_CAPTCHA_PROMT"] = "Enter the word in the picture";
$MESS["AUTH_REQ"] = "Required fields.";
$MESS["USER_DONT_KNOW"] = "(unknown)";
$MESS["USER_MALE"] = "Male";
$MESS["USER_FEMALE"] = "Female";
$MESS["REGISTER_FIELD_LOGIN"] = "Login (min. 3 characters)";
$MESS["REGISTER_FIELD_EMAIL"] = "Email";
$MESS["REGISTER_FIELD_PASSWORD"] = "Password";
$MESS["REGISTER_FIELD_CONFIRM_PASSWORD"] = "Confirm Password";
$MESS["REGISTER_FIELD_TITLE"] = "Address";
$MESS["REGISTER_FIELD_NAME"] = "Name";
$MESS["REGISTER_FIELD_SECOND_NAME"] = "Patronymic";
$MESS["REGISTER_FIELD_LAST_NAME"] = "Last Name";
$MESS["REGISTER_FIELD_AUTO_TIME_ZONE"] = "Time Zone";
$MESS["REGISTER_FIELD_PERSONAL_PROFESSION"] = "Profession";
$MESS["REGISTER_FIELD_PERSONAL_WWW"] = "WWW page";
$MESS["REGISTER_FIELD_PERSONAL_ICQ"] = "ICQ";
$MESS["REGISTER_FIELD_PERSONAL_GENDER"] = "gender";
$MESS["REGISTER_FIELD_PERSONAL_BIRTHDAY"] = "Date of birth";
$MESS["REGISTER_FIELD_PERSONAL_PHOTO"] = "Photo";
$MESS["REGISTER_FIELD_PERSONAL_PHONE"] = "Phone";
$MESS["PERSONAL_PHONE"] = "Phone";
$MESS["REGISTER_FIELD_PERSONAL_FAX"] = "Fax";
$MESS["REGISTER_FIELD_PERSONAL_MOBILE"] = "Mobile";
$MESS["REGISTER_FIELD_PERSONAL_PAGER"] = "Pager";
$MESS["REGISTER_FIELD_PERSONAL_STREET"] = "Street, house";
$MESS["REGISTER_FIELD_PERSONAL_MAILBOX"] = "Mailbox";
$MESS["REGISTER_FIELD_PERSONAL_CITY"] = "City";
$MESS["REGISTER_FIELD_PERSONAL_STATE"] = "Region / Province";
$MESS["REGISTER_FIELD_PERSONAL_ZIP"] = "Zip Code";
$MESS["REGISTER_FIELD_PERSONAL_COUNTRY"] = "Country";
$MESS["REGISTER_FIELD_PERSONAL_NOTES"] = "Additional Notes";
$MESS["REGISTER_FIELD_WORK_COMPANY"] = "Company Name";
$MESS["REGISTER_FIELD_WORK_DEPARTMENT"] = "Department / Division";
$MESS["REGISTER_FIELD_WORK_POSITION"] = "Position";
$MESS["REGISTER_FIELD_WORK_WWW"] = "WWW page (job)";
$MESS["REGISTER_FIELD_WORK_PHONE"] = "Phone (job)";
$MESS["REGISTER_FIELD_WORK_FAX"] = "Fax (job)";
$MESS["REGISTER_FIELD_WORK_PAGER"] = "Pager (job)";
$MESS["REGISTER_FIELD_WORK_STREET"] = "Street, house (job)";
$MESS["REGISTER_FIELD_WORK_MAILBOX"] = "Mailbox (job)";
$MESS["REGISTER_FIELD_WORK_CITY"] = "City (job)";
$MESS["REGISTER_FIELD_WORK_STATE"] = "Region / Region (job)";
$MESS["REGISTER_FIELD_WORK_ZIP"] = "Postal code (job)";
$MESS["REGISTER_FIELD_WORK_COUNTRY"] = "Country (job)";
$MESS["REGISTER_FIELD_WORK_PROFILE"] = "Line of Business";
$MESS["REGISTER_FIELD_WORK_LOGO"] = "Company Logo";
$MESS["REGISTER_FIELD_WORK_NOTES"] = "Additional notes (job)";
$MESS["REGISTER_FIELD_PHONE_NUMBER"] = "Phone Number";
$MESS["REGISTER_EMAIL_WILL_BE_SENT"] = "A registration confirmation request will be sent to the email specified in the form.";
$MESS["MAIN_REGISTER_AUTH"] = "You are registered on the site and successfully authorized.";
$MESS["main_profile_time_zones_auto"] = "Automatically detect the time zone:";
$MESS["main_profile_time_zones_auto_def"] = "(default)";
$MESS["main_profile_time_zones_auto_yes"] = "Yes, detect by browser.";
$MESS["main_profile_time_zones_auto_no"] = "No, select from list";
$MESS["main_profile_time_zones_zones"] = "Time zone:";
$MESS["AUTH_SECURE_NOTE"] = "Before submitting the form, the password will be encrypted in the browser. This will prevent the password from being transmitted in the clear.";
$MESS["AUTH_NONSECURE_NOTE"] = "The password will be sent in plaintext. Enable JavaScript in your browser to encrypt the password before sending it.";
$MESS["main_register_sms"] = "Confirmation code from SMS:";
$MESS["main_register_sms_send"] = "Send";
$MESS["UF_REG_IN_PL_INTARO"] = "Register in loyalty program.";
$MESS["UF_AGREE_PL_INTARO"] = "loyalty programs:";
$MESS["I_AM_AGREE"] = "I agree to the terms and conditions";
$MESS["UF_PD_PROC_PL_INTARO"] = "personal data processing:";
$MESS["LP_CARD_NUMBER"] = "Loyalty program card number";
$MESS["SEND"] = "Send";
$MESS["VERIFICATION_CODE"] = "Confirmation Code";
$MESS["SEND_VERIFICATION_CODE"] = "Send confirmation code";
$MESS["REG_LP_MESSAGE"] = "Enter your phone number and loyalty program card number to complete your loyalty program registration.";
$MESS["YES"] = "Yes";
$MESS["BONUS_CARD_NUMBER"] = "Loyalty card number (if any):";
$MESS["SUCCESS_PL_REG"] = "You have successfully registered in the loyalty program.";
$MESS["LP_FIELDS_NOT_EXIST"] = "Ошибка установки модуля ПЛ. Отсутствуют UF поля для USER";
$MESS["REG_LP_ERROR"] = "Ошибка регистрации в Программе лояльности";
$MESS["REGISTER_CONTINUE"] = "Для завершения регистрации в программе лояльности заполните форму.";
$MESS["UF_CARD_NUM_INTARO"] = "Loyalty card number (if any).";
$MESS["SEC"] = "sec.";
$MESS["RESEND_SMS"] = "Resend SMS";
$MESS["RESEND_POSSIBLE"] = "It is possible to resend sms in";
$MESS["LOYALTY_CONNECTION_ERROR"] = "There are problems with connection to the remote server. Try reloading the page.";
$MESS['SUBSCRIBE_EMAIL'] = "I agree to receive promotional and informational emails.";
$MESS['NO_VALID_EMAIL'] = "Check if your email is filled in correctly";

View File

@ -82,3 +82,4 @@ $MESS["RESEND_SMS"] = "Отправить смс повторно";
$MESS["RESEND_POSSIBLE"] = "Повторная отправка смс возможна через";
$MESS["LOYALTY_CONNECTION_ERROR"] = "Возникли проблемы с подключением к удаленному серверу. Попробуйте перезагрузить страницу.";
$MESS["SUBSCRIBE_EMAIL"] = "Согласен на рекламно-информационные рассылки";
$MESS['NO_VALID_EMAIL'] = "Проверьте правильность заполнения email";

View File

@ -55,7 +55,7 @@ function activateAccount() {
)
if (emailViolation) {
$('#errMsg').text('Проверьте правильность заполнения email')
$('#errMsg').text(BX.message("NO_VALID_EMAIL"));
return;
}

View File

@ -0,0 +1,8 @@
<?php
$MESS['COUNT_FOR_WRITE_OFF'] = 'How many bonuses to spend?';
$MESS['VALIDATE_BONUS_ERROR'] = 'Invalid value entered';
$MESS['DATA_PROCESSING'] = 'Information processing';
$MESS['YOU_CANT_SPEND_MORE'] = 'You cant spend more ';
$MESS['BONUSES'] = 'bonuses';
$MESS ['INTARO_NOT_INSTALLED'] = "Integration module with RetailCRM is not installed";

View File

@ -1,138 +1,158 @@
<?
$MESS["ADDITIONAL_PROPS_DEFAULT"] = "Additional properties";
$MESS["ADD_DEFAULT"] = "Add";
$MESS["AUTH_BLOCK_NAME_DEFAULT"] = "Log in";
$MESS["AUTH_REFERENCE_1_DEFAULT"] = "Fields marked with \"*\" are required.";
$MESS["AUTH_REFERENCE_2_DEFAULT"] = "You will receive the notification message upon completing the registration.";
$MESS["AUTH_REFERENCE_3_DEFAULT"] = "Your personal information acquired upon registration, placing of an order, or by any other means will never be rented, sold or transferred to third parties unless required by legal authorities or court decision..";
$MESS["BACK_DEFAULT"] = "Back";
$MESS["BASKET_BLOCK_NAME_DEFAULT"] = "Shopping cart";
$MESS["BUYER_BLOCK_NAME_DEFAULT"] = "Customer";
$MESS["CAPTCHA_REGF_PROMT"] = "Type the characters you see on the picture";
$MESS["CAPTCHA_REGF_TITLE"] = "CAPTCHA";
$MESS["COUPON_DEFAULT"] = "Coupon";
$MESS["DELIVERY_BLOCK_NAME_DEFAULT"] = "Delivery";
$MESS["DELIVERY_CALC_ERROR_TEXT_DEFAULT"] = "Continue checkout. Our sales representative will contact you with delivery details.";
$MESS["DELIVERY_CALC_ERROR_TITLE_DEFAULT"] = "Cannot calculate delivery price.";
$MESS["ECONOMY_DEFAULT"] = "Save";
$MESS["EDIT_DEFAULT"] = "change";
$MESS["EMPTY_BASKET_HINT"] = "#A1#Click here#A2# to continue shopping";
$MESS["EMPTY_BASKET_TITLE"] = "Your cart is empty";
$MESS["FAIL_PRELOAD_TEXT_DEFAULT"] = "You previously shopped with us and we remember you, so we have taken the liberty to fill in the fields for you.<br />
Check the order information thoroughly and edit your order if required. Once you see everything is good, click \"#ORDER_BUTTON#\".
";
$MESS["FURTHER_DEFAULT"] = "Next";
$MESS["INNER_PS_BALANCE_DEFAULT"] = "Your balance:";
$MESS["NAV_BACK_DEFAULT"] = "Back";
$MESS["NAV_FORWARD_DEFAULT"] = "Next";
$MESS["NEAREST_PICKUP_LIST_DEFAULT"] = "Nearest locations:";
$MESS["ORDER_DEFAULT"] = "Checkout";
$MESS["ORDER_DESC_DEFAULT"] = "Order comments:";
$MESS["PAYMENT_BLOCK_NAME_DEFAULT"] = "Payment";
$MESS["PAY_SYSTEM_PAYABLE_ERROR_DEFAULT"] = "You'll be able to pay for the order after we verify that the items you have ordered are in stock. Once your order is fulfilled, you'll receive an email with payment instructions. You'll be able to complete the purchase inside your customer account.";
$MESS["PERIOD_DEFAULT"] = "Delivery time";
$MESS["PERSON_TYPE_DEFAULT"] = "Payer type";
$MESS["PICKUP_LIST_DEFAULT"] = "Pick-up locations:";
$MESS["PRICE_DEFAULT"] = "Price";
$MESS["PRICE_FREE_DEFAULT"] = "free";
$MESS["REGION_BLOCK_NAME_DEFAULT"] = "Delivery area";
$MESS["REGION_REFERENCE_DEFAULT"] = "Select your city from the list. If you cannot find your city, select \"other location\" and enter your city in the \"City\" field.";
$MESS["REGISTRATION_REFERENCE_DEFAULT"] = "Please register for better shopping experience and to keep your order history.";
$MESS["REG_BLOCK_NAME_DEFAULT"] = "Register";
$MESS["SALE_SADC_TRANSIT"] = "Delivery time";
$MESS["SELECT_FILE_DEFAULT"] = "Select";
$MESS["SELECT_PICKUP_DEFAULT"] = "Select";
$MESS["SELECT_PROFILE_DEFAULT"] = "Select profile";
$MESS["SOA_BAD_EXTENSION"] = "Invalid file type";
$MESS["SOA_DELIVERY"] = "Delivery service";
$MESS["SOA_DELIVERY_SELECT_ERROR"] = "Delivery service not selected";
$MESS["SOA_DISTANCE_KM"] = "km";
$MESS["SOA_DO_SOC_SERV"] = "Social login";
$MESS["SOA_ERROR_ORDER"] = "Error creating the order.";
$MESS["SOA_ERROR_ORDER_LOST"] = "Order no. #ORDER_ID# cannot be found.";
$MESS["SOA_ERROR_ORDER_LOST1"] = "Please contact the store administration or try again.";
$MESS["SOA_FIELD"] = "Field";
$MESS["SOA_INVALID_EMAIL"] = "E-mail is incorrect";
$MESS["SOA_INVALID_PATTERN"] = "does not match the pattern";
$MESS["SOA_LESS"] = "at least";
$MESS["SOA_LOCATION_NOT_FOUND"] = "Location was not found";
$MESS["SOA_LOCATION_NOT_FOUND_PROMPT"] = "Click #ANCHOR#add location#ANCHOR_END# so we know where you want to have your order shipped to";
$MESS["SOA_MAP_COORDS"] = "Map coordinates";
$MESS["SOA_MAX_LENGTH"] = "Max. field length";
$MESS["SOA_MAX_SIZE"] = "Max. file size exceeded";
$MESS["SOA_MAX_VALUE"] = "Max. field value";
$MESS["SOA_MIN_LENGTH"] = "Min. field length";
$MESS["SOA_MIN_VALUE"] = "Min. field value";
$MESS["SOA_MORE"] = "less than";
$MESS["SOA_NO"] = "no";
$MESS["SOA_NOT_CALCULATED"] = "not calculated";
$MESS["SOA_NOT_FOUND"] = "Not found";
$MESS["SOA_NOT_NUMERIC"] = "numbers only";
$MESS["SOA_NOT_SELECTED"] = "not selected";
$MESS["SOA_NOT_SELECTED_ALT"] = "Make location more specific if required";
$MESS["SOA_NOT_SPECIFIED"] = "not specified";
$MESS["SOA_NO_JS"] = "The ordering process requires that JavaScript is enabled on your system. JavaScript is disabled or not supported by your browser. Please change the browser settings and <a href=\"\">try again</a>.";
$MESS["SOA_NUM_STEP"] = "doesn't match";
$MESS["SOA_ORDER_COMPLETE"] = "Order has been completed";
$MESS["SOA_ORDER_PROPS"] = "Order properties";
$MESS["SOA_ORDER_PS_ERROR"] = "The selected payment method failed. Please contact the site administrator or select another method.";
$MESS["SOA_ORDER_SUC"] = "Your order <b>##ORDER_ID#</b> of #ORDER_DATE# has been created successfully.";
$MESS["SOA_ORDER_SUC1"] = "You can track your order in your <a href=\"#LINK#\">personal account</a>. You will be asked to enter your login and password to access your account.";
$MESS["SOA_OTHER_LOCATION"] = "Other location";
$MESS["SOA_PAY"] = "Order payment";
$MESS["SOA_PAYMENT_SUC"] = "Payment <b>##PAYMENT_ID#</b>";
$MESS["SOA_PAYSYSTEM_PRICE"] = "Extra COD:";
$MESS["SOA_PAY_ACCOUNT3"] = "You have sufficient credit to pay the order in full.";
$MESS["SOA_PAY_LINK"] = "If you don't see any payment information, click here: <a href=\"#LINK#\" target=\"_blank\">Pay and place order</a>.";
$MESS["SOA_PAY_PDF"] = "Click <a href=\"#LINK#\" target=\"_blank\">Download invoice</a> to get the invoice in PDF format.";
$MESS["SOA_PAY_SYSTEM"] = "Payment system";
$MESS["SOA_PICKUP_ADDRESS"] = "Address";
$MESS["SOA_PICKUP_DESC"] = "Description";
$MESS["SOA_PICKUP_EMAIL"] = "E-Mail";
$MESS["SOA_PICKUP_PHONE"] = "Phone";
$MESS["SOA_PICKUP_STORE"] = "Warehouse";
$MESS["SOA_PICKUP_WORK"] = "Business hours";
$MESS["SOA_PROP_NEW_PROFILE"] = "New profile";
$MESS["SOA_PS_SELECT_ERROR"] = "Payment system not selected";
$MESS["SOA_REQUIRED"] = "this field is required";
$MESS["SOA_SUM_DELIVERY"] = "Delivery:";
$MESS["SOA_SUM_DISCOUNT"] = "Discount";
$MESS["SOA_SUM_IT"] = "Total:";
$MESS["SOA_SUM_LEFT_TO_PAY"] = "Amount payable:";
$MESS["SOA_SUM_NAME"] = "Name";
$MESS["SOA_SUM_PAYED"] = "Paid:";
$MESS["SOA_SUM_PRICE"] = "Price";
$MESS["SOA_SUM_QUANTITY"] = "Quantity";
$MESS["SOA_SUM_SUMMARY"] = "Total price:";
$MESS["SOA_SUM_VAT"] = "Tax:";
$MESS["SOA_SUM_WEIGHT"] = "Weight";
$MESS["SOA_SUM_WEIGHT_SUM"] = "Total weight:";
$MESS["SOA_SYMBOLS"] = "symbols";
$MESS["SOA_YES"] = "yes";
$MESS["STOF_AUTH_REQUEST"] = "Please log in.";
$MESS["STOF_DO_AUTHORIZE"] = "Log in";
$MESS["STOF_DO_REGISTER"] = "Register";
$MESS["STOF_EMAIL"] = "E-mail";
$MESS["STOF_ENTER"] = "Log in";
$MESS["STOF_FORGET_PASSWORD"] = "Forgot your password?";
$MESS["STOF_LASTNAME"] = "Last name";
$MESS["SOA_NO"] = "no";
$MESS["SOA_DO_SOC_SERV"] = "Sign in with social media";
$MESS["SOA_NOT_FOUND"] = "Not Found";
$MESS["SOA_NOT_SPECIFIED"] = "not specified";
$MESS["SOA_NOT_SELECTED"] = "not selected";
$MESS["SOA_NOT_CALCULATED"] = "not calculated";
$MESS["SOA_PS_SELECT_ERROR"] = "Payment system not selected";
$MESS["SOA_DELIVERY_SELECT_ERROR"] = "Delivery service not selected";
$MESS["SOA_PICKUP_PHONE"] = "Phone";
$MESS["SOA_PICKUP_ADDRESS"] = "Address";
$MESS["SOA_PICKUP_WORK"] = "Work Mode";
$MESS["SOA_PICKUP_STORE"] = "Warehouse";
$MESS["SOA_PICKUP_EMAIL"] = "Email";
$MESS["SOA_PICKUP_DESC"] = "Description";
$MESS["SOA_MAP_COORDS"] = "Map coordinates";
$MESS["SOA_DISTANCE_KM"] = "km";
$MESS["SOA_ORDER_PROPS"] = "Order Properties";
$MESS["SOA_FIELD"] = "Field";
$MESS["SOA_REQUIRED"] = "required";
$MESS["SOA_INVALID_EMAIL"] = "Invalid e-mail entered";
$MESS["SOA_MIN_LENGTH"] = "Minimum field length";
$MESS["SOA_MAX_LENGTH"] = "Maximum field length";
$MESS["SOA_NOT_NUMERIC"] = "must be numeric";
$MESS["SOA_MIN_VALUE"] = "Minimum field value";
$MESS["SOA_MAX_VALUE"] = "Maximum field value";
$MESS["SOA_NUM_STEP"] = "does not match the step";
$MESS["SOA_LESS"] = "not less than";
$MESS["SOA_MORE"] = "not more than";
$MESS["SOA_SYMBOLS"] = "characters";
$MESS["SOA_INVALID_PATTERN"] = "does not match the template";
$MESS["SOA_PROP_NEW_PROFILE"] = "New Profile";
$MESS["SOA_PAY_SYSTEM"] = "Payment System";
$MESS["SOA_PAY_ACCOUNT3"] = "Funds are sufficient for full payment of the order.";
$MESS["SOA_DELIVERY"] = "Delivery service";
$MESS["SOA_ORDER_SUC"] = "Your order <b>№#ORDER_ID#</b> from #ORDER_DATE# has been successfully created.";
$MESS["SOA_PAYMENT_SUC"] = "Your payment number: <b>№#PAYMENT_ID#</b>";
$MESS["SOA_ORDER_SUC1"] = "You can follow the fulfillment of your order in <a href=\"#LINK#\">personalized section of the site</a>. Please note that you will need to enter your site user login and password to access this section.";
$MESS["SOA_PAY"] = "Order payment";
$MESS["SOA_PAY_LINK"] = "If the payment information window does not open automatically, click on the link <a href=\"#LINK#\" target=\"_blank\">Pay order</a>.";
$MESS["SOA_PAY_PDF"] = "To download the invoice in pdf format, click on the link <a href=\"#LINK#\" target=\"_blank\">Download Invoice</a>.";
$MESS["SOA_ERROR_ORDER"] = "Order formation error";
$MESS["SOA_ERROR_ORDER_LOST"] = "Order №#ORDER_ID# not found.";
$MESS["SOA_ERROR_ORDER_LOST1"] = "Please contact the administration of the online store or try to place your order again.";
$MESS["SOA_SUM_NAME"] = "Name";
$MESS["SOA_SUM_DISCOUNT"] = "Discount";
$MESS["SOA_SUM_WEIGHT"] = "Weight";
$MESS["SOA_SUM_QUANTITY"] = "Quantity";
$MESS["SOA_SUM_PRICE"] = "Price";
$MESS["SOA_SUM_WEIGHT_SUM"] = "Total weight:";
$MESS["SOA_SUM_SUMMARY"] = "Items per:";
$MESS["SOA_SUM_VAT"] = "VAT:";
$MESS["SOA_SUM_DELIVERY"] = "Shipping:";
$MESS["SOA_SUM_IT"] = "Total:";
$MESS["SOA_SUM_PAYED"] = "Paid:";
$MESS["SOA_SUM_LEFT_TO_PAY"] = "Remaining to be paid:";
$MESS["SOA_ORDER_COMPLETE"] = "Order formed.";
$MESS["CAPTCHA_REGF_TITLE"] = "Automatic Registration Protection";
$MESS["CAPTCHA_REGF_PROMT"] = "Enter the word in the picture";
$MESS["STOF_LOGIN"] = "Login";
$MESS["STOF_MY_PASSWORD"] = "Your login and password";
$MESS["STOF_NAME"] = "First name";
$MESS["STOF_NEXT_STEP"] = "Continue checkout";
$MESS["STOF_PASSWORD"] = "Password";
$MESS["STOF_PHONE"] = "Phone number";
$MESS["STOF_REMEMBER"] = "Remember me";
$MESS["STOF_ENTER"] = "Login";
$MESS["STOF_REGISTER"] = "Register";
$MESS["STOF_REG_HINT"] = "Please register for better shopping experience and to keep your order history.";
$MESS["STOF_REG_REQUEST"] = "Please register.";
$MESS["STOF_REG_SMS_REQUEST"] = "A confirmation code has been sent to your phone";
$MESS["STOF_REMEMBER"] = "Remember Me";
$MESS["STOF_RE_PASSWORD"] = "Repeat password";
$MESS["STOF_DO_AUTHORIZE"] = "Authorize";
$MESS["STOF_DO_REGISTER"] = "Register";
$MESS["STOF_AUTH_REQUEST"] = "Please Authorize";
$MESS["STOF_REG_REQUEST"] = "Please register";
$MESS["STOF_PHONE"] = "Phone number";
$MESS["STOF_REG_SMS_REQUEST"] = "An SMS with a confirmation code was sent to your number";
$MESS["STOF_SMS_CODE"] = "Confirmation code from SMS";
$MESS["STOF_SEND"] = "Send";
$MESS["STOF_SMS_CODE"] = "SMS confirmation code";
$MESS["STOF_REG_HINT"] = "If this is your first time on the site and you want us to remember you and keep all your orders,
please fill out the registration form.";
$MESS["STOF_FORGET_PASSWORD"] = "Forgot your password?";
$MESS["STOF_NEXT_STEP"] = "Continue Checkout";
$MESS["STOF_NAME"] = "First Name";
$MESS["STOF_LASTNAME"] = "Last Name";
$MESS["STOF_EMAIL"] = "E-mail";
$MESS["STOF_MY_PASSWORD"] = "Set login and password";
$MESS["STOF_RE_PASSWORD"] = "Repeat password";
$MESS["STOF_SYS_PASSWORD"] = "Generate login and password";
$MESS["SUCCESS_PRELOAD_TEXT_DEFAULT"] = "You previously shopped with us and we remember you, so we have taken the liberty to fill in the fields for you.<br />
If the information is correct, click \"#ORDER_BUTTON#\".
$MESS["SALE_SADC_TRANSIT"] = "Delivery time";
$MESS["SOA_NO_JS"] = "JavaScript must be enabled to place an order. It appears that JavaScript is either not supported by your browser or is disabled. Change your browser settings and then <a href=\"\">try again</a>.";
$MESS["SOA_PAYSYSTEM_PRICE"] = "Optional cash on delivery:";
$MESS["SOA_OTHER_LOCATION"] = "Other Location";
$MESS["SOA_LOCATION_NOT_FOUND"] = "Location not found";
$MESS["SOA_LOCATION_NOT_FOUND_PROMPT"] = "#ANCHOR#Select a location from the list#ANCHOR_END#, to let us know where to deliver your order.";
$MESS["SOA_NOT_SELECTED_ALT"] = "If you need to specify the location";
$MESS["SOA_ORDER_PS_ERROR"] = "Error of selected payment method. Please contact Site Administration or select another payment method.";
$MESS["AUTH_BLOCK_NAME_DEFAULT"] = "Authorization";
$MESS["REG_BLOCK_NAME_DEFAULT"] = "Registration";
$MESS["BASKET_BLOCK_NAME_DEFAULT"] = "Items in the order";
$MESS["REGION_BLOCK_NAME_DEFAULT"] = "Delivery Region";
$MESS["PAYMENT_BLOCK_NAME_DEFAULT"] = "Payment";
$MESS["DELIVERY_BLOCK_NAME_DEFAULT"] = "Delivery";
$MESS["BUYER_BLOCK_NAME_DEFAULT"] = "Buyer";
$MESS["BACK_DEFAULT"] = "Back";
$MESS["FURTHER_DEFAULT"] = "Next";
$MESS["EDIT_DEFAULT"] = "change";
$MESS["ORDER_DEFAULT"] = "Checkout";
$MESS["ADD_DEFAULT"] = "Add";
$MESS["PRICE_DEFAULT"] = "Price";
$MESS["PERIOD_DEFAULT"] = "Delivery time";
$MESS["NAV_BACK_DEFAULT"] = "Back";
$MESS["NAV_FORWARD_DEFAULT"] = "Forward";
$MESS["PRICE_FREE_DEFAULT"] = "free";
$MESS["ECONOMY_DEFAULT"] = "Economy";
$MESS["REGISTRATION_REFERENCE_DEFAULT"] = "If this is your first time on the site and you want us to remember you and keep all your orders, please fill out the registration form.";
$MESS["AUTH_REFERENCE_1_DEFAULT"] = "Required fields are marked with an \"asterisk\" (*).";
$MESS["AUTH_REFERENCE_2_DEFAULT"] = "After registration, you will receive an informational letter.";
$MESS["AUTH_REFERENCE_3_DEFAULT"] = "Personal information, received by the online store during registration or otherwise, will not be transferred to third organizations and persons without the permission of users, except in situations where required by law or court order.";
$MESS["ADDITIONAL_PROPS_DEFAULT"] = "Additional properties.";
$MESS["USE_COUPON_DEFAULT"] = "Apply Coupon";
$MESS["COUPON_DEFAULT"] = "Coupon";
$MESS["PERSON_TYPE_DEFAULT"] = "Payer Type";
$MESS["SELECT_PROFILE_DEFAULT"] = "Select a profile";
$MESS["REGION_REFERENCE_DEFAULT"] = 'Select your city from the list. If you dont find your city, select \"other location\", and put the city in the field \"City\"';
$MESS["PICKUP_LIST_DEFAULT"] = "Pickup locations:";
$MESS["NEAREST_PICKUP_LIST_DEFAULT"] = "Nearest locations:";
$MESS["SELECT_PICKUP_DEFAULT"] = "Select";
$MESS["INNER_PS_BALANCE_DEFAULT"] = "In your user account:";
$MESS["ORDER_DESC_DEFAULT"] = "Order Comments:";
$MESS["SELECT_FILE_DEFAULT"] = "Select";
$MESS["SUCCESS_PRELOAD_TEXT_DEFAULT"] = "You ordered from our online store, so we filled in all the data automatically.<br />
If everything is filled in correctly, press the button \"#ORDER_BUTTON#\".
";
$MESS["USE_COUPON_DEFAULT"] = "Apply coupon";
?>
$MESS["FAIL_PRELOAD_TEXT_DEFAULT"] = "You ordered from our online store, so we filled in all the data automatically.<br />
Pay attention to the detailed block with information about the order. Here you can make the necessary changes or
leave it as it is and click the button \"#ORDER_BUTTON#\".
";
$MESS["DELIVERY_CALC_ERROR_TITLE_DEFAULT"] = "Failed to calculate the shipping cost.";
$MESS["DELIVERY_CALC_ERROR_TEXT_DEFAULT"] = "You can continue placing your order, and later the store manager will contact you and clarify the delivery information.";
$MESS["EMPTY_BASKET_TITLE"] = "Your cart is empty";
$MESS["EMPTY_BASKET_HINT"] = "#A1#Click here#A2#, to continue shopping";
$MESS["SOA_BAD_EXTENSION"] = "Invalid file type";
$MESS["SOA_MAX_SIZE"] = "Maximum file size exceeded";
$MESS["PAY_SYSTEM_PAYABLE_ERROR_DEFAULT"] = "You will be able to pay for your order after the manager checks the availability of a full set of goods in stock. Immediately after checking you will receive an email with payment instructions. You will be able to pay for the order in the personal section of the site.";
$MESS["BONUS_PAYMENT"] = 'Pay with bonuses';
$MESS["HOW_MANY_BONUSES_TO_SPEND"] = 'How many bonuses to spend?';
$MESS["BONUS_TOTAL"] = 'Total bonuses:';
$MESS["YOU_CAN_SPEND"] = 'You can spend:';
$MESS["CHARGE_RATE"] = "Bonus rate: 1 bonus = %s %s";
$MESS["RUB"] = "rub.";
$MESS["CALCULATION_ERROR"] = 'Failed to calculate the number of available bonuses.';
$MESS["CONFIRM_MESSAGE"] = 'To complete the bonus debiting procedure, enter your verification code';
$MESS["SEND"] = 'Send';
$MESS["RESEND_POSSIBLE"] = "It is possible to resend sms through";
$MESS["RESEND_SMS"] = "Send sms again";
$MESS["BONUS_SUCCESS"] = "Bonuses have been successfully debited";
$MESS["BONUS_ERROR"] = "Error of bonus debiting";
$MESS["LOYALTY_CONNECTION_ERROR"] = "There were problems with connection to the remote server.
Loyalty program discounts were not applied. Try reloading the page.";
$MESS["PAYMENT_IN_BONUSES"] = 'Payment with bonuses:';
$MESS["PERSONAL_DISCOUNT"] = 'Personal discount: ';
$MESS["COMMON_DISCOUNT"] = 'Regular discount: ';
$MESS["WILL_CREDITED_BONUSES"] = 'Bonuses to be credited: ';

View File

@ -152,4 +152,7 @@ $MESS["BONUS_SUCCESS"] = "Бонусы успешно списаны";
$MESS["BONUS_ERROR"] = "Ошибка списания бонусов";
$MESS["LOYALTY_CONNECTION_ERROR"] = "Возникли проблемы с подключением к удаленному серверу.
Скидки программы лояльности не были применены. Попробуйте перезагрузить страницу.";
$MESS["PAYMENT_IN_BONUSES"] = 'Оплата бонусами:';
$MESS["PERSONAL_DISCOUNT"] = 'Персональная скидка: ';
$MESS["COMMON_DISCOUNT"] = 'Обычная скидка: ';
$MESS["WILL_CREDITED_BONUSES"] = "Будет начислено бонусов: ";

View File

@ -8324,25 +8324,25 @@ BX.namespace('BX.Sale.OrderAjaxComponent');
if (this.loyaltyDiscount !== undefined && this.loyaltyDiscount > 0) {
let loyaltyDiscount = this.bonusCurrency
.replace('#', this.loyaltyDiscount.toString());
this.totalInfoBlockNode.appendChild(this.createTotalUnit("Персональная скидка: ", loyaltyDiscount));
this.totalInfoBlockNode.appendChild(this.createTotalUnit(BX.message("PERSONAL_DISCOUNT"), loyaltyDiscount));
}
if (this.bitrixDiscount !== undefined && this.bitrixDiscount > 0) {
let defaultDiscount = this.bonusCurrency
.replace('#', this.bitrixDiscount.toString());
this.totalInfoBlockNode.appendChild(this.createTotalUnit("Обычная скидка: ", defaultDiscount));
this.totalInfoBlockNode.appendChild(this.createTotalUnit(BX.message("COMMON_DISCOUNT"), defaultDiscount));
}
if (this.result.TOTAL.BONUS_PAYMENT !== undefined && this.result.TOTAL.BONUS_PAYMENT > 0) {
let bonusPayment = this.bonusCurrency
.replace('#', this.result.TOTAL.BONUS_PAYMENT.toString());
this.totalInfoBlockNode.appendChild(this.createTotalUnit('Оплата бонусами:', bonusPayment));
this.totalInfoBlockNode.appendChild(this.createTotalUnit(BX.message("PAYMENT_IN_BONUSES"), bonusPayment));
}
if (this.result.TOTAL.WILL_BE_CREDITED !== undefined && this.result.TOTAL.WILL_BE_CREDITED > 0) {
this.totalInfoBlockNode.appendChild(this.createTotalUnit('Будет начислено бонусов: ', String(this.result.TOTAL.WILL_BE_CREDITED), {highlighted: true}));
this.totalInfoBlockNode.appendChild(this.createTotalUnit(BX.message("WILL_CREDITED_BONUSES"), String(this.result.TOTAL.WILL_BE_CREDITED), {highlighted: true}));
} else if (this.willBeCredited > 0) {
this.totalInfoBlockNode.appendChild(this.createTotalUnit('Будет начислено бонусов:', this.willBeCredited, {highlighted: true}));
this.totalInfoBlockNode.appendChild(this.createTotalUnit(BX.message("WILL_CREDITED_BONUSES"), this.willBeCredited, {highlighted: true}));
}
}

View File

@ -1,6 +1,6 @@
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php');
$APPLICATION->SetTitle('Регистрация');
$APPLICATION->SetTitle(GetMessage('REGISTER_LOYALTY'));
?>
<?php $APPLICATION->IncludeComponent(

View File

@ -0,0 +1,2 @@
<?php
$MESS['REGISTER_LOYALTY'] = "Registration";

View File

@ -0,0 +1,2 @@
<?php
$MESS['REGISTER_LOYALTY'] = "Регистрация";

View File

@ -1,6 +1,6 @@
<?php
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetTitle("Бонусный счет");
$APPLICATION->SetTitle(GetMessage('BONUS_ACCOUNT'));
?>
<?php $APPLICATION->IncludeComponent(

View File

@ -0,0 +1,2 @@
<?php
$MESS['BONUS_ACCOUNT'] = "Bonus account";

View File

@ -0,0 +1,2 @@
<?php
$MESS['BONUS_ACCOUNT'] = "Бонусный счет";

View File

@ -1,6 +1,6 @@
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php');
$APPLICATION->SetTitle('Регистрация');
$APPLICATION->SetTitle(GetMessage('REGISTER'));
?>
<?php $APPLICATION->IncludeComponent(

View File

@ -0,0 +1,2 @@
<?php
$MESS['REGISTER'] = "Registration";

View File

@ -0,0 +1,2 @@
<?php
$MESS['REGISTER'] = "Регистрация";

View File

@ -15,13 +15,13 @@ use Bitrix\Sale\EventActions;
use Bitrix\Sale\Internals\OrderTable;
use Intaro\RetailCrm\Component\ConfigProvider;
use Intaro\RetailCrm\Component\Constants;
use Intaro\RetailCrm\Component\Installer\InstallerTrait;
use Intaro\RetailCrm\Service\CurrencyService;
use Intaro\RetailCrm\Service\OrderLoyaltyDataService;
use RetailCrm\ApiClient;
use RetailCrm\Exception\CurlException;
use RetailCrm\Http\Client;
use RetailCrm\Response\ApiResponse;
use Intaro\RetailCrm\Component\Advanced\InstallerTrait;
use Intaro\RetailCrm\Component\Advanced\LoyaltyInstaller;
Loader::IncludeModule('highloadblock');
@ -30,7 +30,7 @@ if (class_exists('intaro_retailcrm')) {
return false;
}
include (__DIR__ . '/../lib/component/installer/installertrait.php');
include (__DIR__ . '/../lib/component/advanced/installertrait.php');
class intaro_retailcrm extends CModule
{
@ -203,17 +203,22 @@ class intaro_retailcrm extends CModule
include($this->INSTALL_PATH . '/../lib/service/currencyservice.php');
include($this->INSTALL_PATH . '/../lib/component/factory/clientfactory.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/clientadapter.php');
include($this->INSTALL_PATH . '/../lib/component/advanced/loyaltyinstaller.php');
$this->CopyFiles();
/* $this->CopyFiles();
$this->addEvents();
$this->addAgreement();
$this->addUserFields();
$this->createCustomPropertyFile();
$this->addUserFields();*/
OrderLoyaltyDataService::createLoyaltyHlBlock();
$this->installExport();
$this->subscriptionSetup();
//$this->createCustomPropertyFile();
/* OrderLoyaltyDataService::createLoyaltyHlBlock();
$service = new OrderLoyaltyDataService();
$service->addCustomersLoyaltyFields();
$service->addCustomersLoyaltyFields();*/
if ($step == 11) {
$arResult['arSites'] = RCrmActions::getSitesList();
@ -1121,8 +1126,6 @@ class intaro_retailcrm extends CModule
30
);
$this->CopyFiles();
COption::RemoveOption($this->MODULE_ID, Constants::CRM_CATALOG_BASE_PRICE);
if (
@ -1315,7 +1318,9 @@ class intaro_retailcrm extends CModule
}
$this->deleteFiles();
$this->deleteLPEvents();
$loyalty = new LoyaltyInstaller();
$loyalty->deleteLPEvents();
UnRegisterModule($this->MODULE_ID);

View File

@ -1,6 +1,6 @@
<?php
$arModuleVersion = [
'VERSION' => '6.5.23',
'VERSION_DATE' => '2024-08-06 11:00:00'
'VERSION' => '6.5.24',
'VERSION_DATE' => '2024-08-06 14:30:00'
];

View File

@ -0,0 +1,109 @@
<?php
namespace Intaro\RetailCrm\Component\Advanced;
use Bitrix\Main\ArgumentException;
use Bitrix\Main\EventManager;
use Bitrix\Main\ObjectPropertyException;
use Bitrix\Main\SystemException;
use Bitrix\Main\Type\DateTime;
use CUserTypeEntity;
use Intaro\RetailCrm\Component\Constants;
trait InstallerTrait
{
public function installExport()
{
$pathFrom = $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . Constants::MODULE_ID . '/install';
CopyDirFiles(
$pathFrom . '/export/bitrix/php_interface/include/catalog_export',
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/include/catalog_export',
true,
true,
false
);
$path = $_SERVER['DOCUMENT_ROOT'] . '/local/';
CheckDirPath($path);
$file = new \Bitrix\Main\IO\File($path . 'icml_property_retailcrm.txt', $siteId = null);
if (!$file->isExists()) {
$file->putContents("");
}
}
public function subscriptionSetup()
{
$pathFrom = $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . Constants::MODULE_ID . '/install';
CopyDirFiles(
$pathFrom . '/export/sub-register',
$_SERVER['DOCUMENT_ROOT'] . '/sub-register',
true,
true,
false
);
$templateNames = [
'default_subscribe' => [
0 => [
'name' => 'sale.personal.section',
'templateDirectory' => '.default'
],
1 => [
'name' => 'main.register',
'templateDirectory' => '.default_subscribe'
]
]
];
foreach ($templateNames as $directory => $templates) {
foreach ($templates as $template) {
$this->copy($directory, $template);
}
}
$property = [
'ENTITY_ID' => 'USER',
'FIELD_NAME' => 'UF_SUBSCRIBE_USER_EMAIL',
'USER_TYPE_ID' => 'boolean',
'MULTIPLE' => 'N',
'MANDATORY' => 'N',
'EDIT_FORM_LABEL' => ['ru' => GetMessage('UF_SUBSCRIBE_USER_EMAIL_TITLE')],
];
$obUserField = new CUserTypeEntity();
$dbRes = CUserTypeEntity::GetList([], ['FIELD_NAME' => 'UF_SUBSCRIBE_USER_EMAIL'])->fetch();
if (!$dbRes['ID']) {
$obUserField->Add($property);
}
}
private function copy($directory, $template): void
{
$templatePath = $_SERVER['DOCUMENT_ROOT']
. '/local/templates/.default/components/bitrix/' . $template['name'] . '/'. $directory
;
if (!file_exists($templatePath)) {
$pathFrom = $_SERVER['DOCUMENT_ROOT']
. '/bitrix/modules/intaro.retailcrm/install/export/local/components/intaro/'
. $template['name']
. '/templates/' . $template['templateDirectory']
;
CopyDirFiles(
$pathFrom,
$templatePath,
true,
true,
false
);
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Intaro\RetailCrm\Component\Installer;
namespace Intaro\RetailCrm\Component\Advanced;
use Bitrix\Main\ArgumentException;
use Bitrix\Main\EventManager;
@ -17,7 +17,7 @@ use RCrmActions;
IncludeModuleLangFile(__FILE__);
trait InstallerTrait
class LoyaltyInstaller
{
/**
* Создание событий для программы лояльности
@ -67,7 +67,7 @@ trait InstallerTrait
CopyDirFiles(
$pathFrom . '/export',
$_SERVER['DOCUMENT_ROOT'],
true,
false,
true,
false
);
@ -86,17 +86,6 @@ trait InstallerTrait
'name' => 'main.register',
'templateDirectory' => '.default'
],
],
'default_subscribe' => [
0 => [
'name' => 'sale.personal.section',
'templateDirectory' => '.default'
],
1 => [
'name' => 'main.register',
'templateDirectory' => '.default_subscribe'
]
]
];
@ -108,7 +97,7 @@ trait InstallerTrait
}
/**
* Добавление полей пользователя для ПЛ и подписки
* Добавление полей пользователя для ПЛ
*/
public function addUserFields(): void
{
@ -150,10 +139,6 @@ trait InstallerTrait
[
'name' => 'UF_EXT_REG_PL_INTARO',
'title' => GetMessage('UF_EXT_REG_PL_INTARO_TITLE'),
],
[
'name' => 'UF_SUBSCRIBE_USER_EMAIL',
'title' => GetMessage('UF_SUBSCRIBE_USER_EMAIL_TITLE')
]
]
);
@ -232,23 +217,10 @@ trait InstallerTrait
}
}
public function createCustomPropertyFile(): void
{
$path = $_SERVER['DOCUMENT_ROOT'] . '/local/';
CheckDirPath($path);
$file = new \Bitrix\Main\IO\File($path . 'icml_property_retailcrm.txt', $siteId = null);
if (!$file->isExists()) {
$file->putContents("");
}
}
/**
* delete loyalty program events handlers
*/
private function deleteLPEvents(): void
public function deleteLPEvents(): void
{
$eventManager = EventManager::getInstance();
@ -279,7 +251,7 @@ trait InstallerTrait
CopyDirFiles(
$pathFrom,
$templatePath,
true,
false,
true,
false
);

View File

@ -0,0 +1,20 @@
<?php
$MESS['REG_COMPLETE'] = 'Account in the loyalty program is created and activated';
$MESS['FIELD_ERROR'] = 'To activate participation in the loyalty program, the following fields should be filled in for the customer:';
$MESS['ACTIVATE_YOUR_ACCOUNT'] = 'Account in the loyalty program is created, but not activated. Please fill out the form to activate it.';
$MESS['ACTIVATE'] = 'Activate';
$MESS['SMS_VERIFICATION'] = 'To activate your account you need to enter the verification code that was sent to your phone';
$MESS['SEND'] = 'Send';
$MESS['COMPLETE_YOUR_REGISTRATION'] = 'To complete the registration in the Loyalty Program, you need to fill out the form.';
$MESS['CREATE'] = 'Create';
$MESS['TRY_AGAIN'] = 'Try Again';
$MESS['INVITATION_TO_REGISTER'] = 'To register for the Loyalty Program, fill out the form.';
$MESS['REGISTER_ERROR'] = 'Error of registration in the Loyalty Program';
$MESS['ACTIVATE_ERROR'] = 'Error of account activation in the Loyalty Program.';
$MESS['DEBITING_BONUSES_ERROR'] = 'Error writing off bonuses.';
$MESS['RUB'] = 'rub.';
$MESS['BONUS_MESSAGE'] = '. Payment with bonuses: ';
$MESS['NEW_BONUS_EVENT'] = 'The number of bonuses in the order has been changed to ';
$MESS['LP_BONUS_INFO'] = 'Loyalty program bonuses';
$MESS['RUB'] = 'rub.';
$MESS['BONUSES'] = 'bonuses';

View File

@ -16,8 +16,11 @@ use Intaro\RetailCrm\Service\CurrencyService;
use Intaro\RetailCrm\Service\OrderLoyaltyDataService;
use Intaro\RetailCrm\Service\Utils as RetailCrmUtils;
use RetailCrm\Exception\CurlException;
use Intaro\RetailCrm\Component\Advanced\LoyaltyInstaller;
IncludeModuleLangFile(__FILE__);
include (__DIR__ . '/lib/component/advanced/loyaltyinstaller.php');
$mid = 'intaro.retailcrm';
$uri = $APPLICATION->GetCurPage() . '?mid=' . htmlspecialchars($mid) . '&lang=' . LANGUAGE_ID;
@ -41,6 +44,7 @@ if (!empty($_GET['ok']) && $_GET['ok'] === 'Y') {
$arResult = [];
$enabledCustom = false;
$loyaltySetup = new LoyaltyInstaller();
if (file_exists($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/intaro.retailcrm/classes/general/config/options.xml')) {
$options = simplexml_load_file($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/intaro.retailcrm/classes/general/config/options.xml');
@ -586,12 +590,19 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
if (isset($_POST['loyalty_toggle']) && $_POST['loyalty_toggle'] === 'on') {
try {
$loyaltySetup->CopyFiles();
$loyaltySetup->addEvents();
$loyaltySetup->addAgreement();
$loyaltySetup->addUserFields();
$hlName = RetailCrmUtils::getHlClassByName(Constants::HL_LOYALTY_CODE);
if (empty($hlName)) {
OrderLoyaltyDataService::createLoyaltyHlBlock();
$service = new OrderLoyaltyDataService();
$service->addCustomersLoyaltyFields();
}
} catch (LoaderException | SystemException $exception) {
} catch (Exception $exception) {
RCrmActions::eventLog(
'intaro.retailcrm/options.php', 'OrderLoyaltyDataService::createLoyaltyHlBlock',
$e->getCode() . ': ' . $exception->getMessage()

View File

@ -1182,29 +1182,6 @@ function update()
Loader::includeModule('highloadblock');
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v5');
(new LoyaltyProgramUpdater())
->updateBonusInfoFieldForLp()
->updateBonusFieldsTypeInHl()
->updateDefDiscountFieldTypeInHl();
UnRegisterModuleDependences("main", "OnBeforeProlog", 'intaro.retailcrm', "RetailCrmPricePrchase", "add");
UnRegisterModuleDependences("main", "OnBeforeProlog", 'intaro.retailcrm', "RetailCrmDc", "add");
UnRegisterModuleDependences("main", "OnBeforeProlog", 'intaro.retailcrm', "RetailCrmCc", "add");
(new UpdateSubscribe())
->CopyFiles()
->addEvent()
->addCustomUserField()
;
COption::SetOptionString(
'intaro.retailcrm',
'custom_fields_toggle',
'N'
);
createCustomPropertyFile();
}
function createCustomPropertyFile()