1
0
Fork 0
mirror of synced 2025-04-04 14:23:33 +03:00

ref #91040 Добавлен шаблон для подписки пользователями

This commit is contained in:
Ivan Chaplygin 2023-07-12 14:02:37 +03:00
parent a9fefc4fb8
commit c09a17fca8
54 changed files with 1232 additions and 1 deletions

View file

@ -11,6 +11,7 @@ use Intaro\RetailCrm\Service\OrderLoyaltyDataService;
use Intaro\RetailCrm\Service\LoyaltyService;
use Intaro\RetailCrm\Service\LoyaltyAccountService;
use Intaro\RetailCrm\Service\CustomerService;
use Intaro\RetailCrm\Service\SubscriberService;
use Intaro\RetailCrm\Vendor\Doctrine\Common\Annotations\AnnotationReader;
use Intaro\RetailCrm\Vendor\Doctrine\Common\Annotations\AnnotationRegistry;
use \Intaro\RetailCrm\Component\Builder\Api\CustomerBuilder;
@ -42,7 +43,8 @@ ServiceLocator::registerServices([
LoyaltyService::class,
CustomerService::class,
OrderLoyaltyDataService::class,
CustomerBuilder::class
CustomerBuilder::class,
SubscriberService::class
]);
$arJsConfig = [

View file

@ -0,0 +1,90 @@
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)
{
die();
}
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @var PersonalOrderSection $component */
/** @var array $arParams */
/** @var array $arResult */
use Bitrix\Main\Localization\Loc;
global $USER;
if ($arParams['SHOW_ACCOUNT_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams['SET_TITLE'] === 'Y')
{
$APPLICATION->SetTitle(Loc::getMessage("SPS_TITLE_ACCOUNT"));
}
if ($arParams["MAIN_CHAIN_NAME"] !== '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ACCOUNT"));
if ($arParams['SHOW_ACCOUNT_COMPONENT'] !== 'N')
{
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.account",
"bootstrap_v4",
[
"SET_TITLE" => "N",
"AUTH_FORM_IN_TEMPLATE" => 'Y',
],
$component
);
}
if ($arParams['SHOW_ACCOUNT_PAY_COMPONENT'] !== 'N' && $USER->IsAuthorized())
{
?>
<div class="row">
<div class="col">
<h2 class="sale-personal-section-account-sub-header"><?=Loc::getMessage("SPS_BUY_MONEY")?></h2>
</div>
</div>
<div class="row">
<div class="col">
<?
$APPLICATION->IncludeComponent(
"bitrix:sale.account.pay",
"bootstrap_v4",
Array(
"COMPONENT_TEMPLATE" => "bootstrap_v4",
"REFRESHED_COMPONENT_MODE" => "Y",
"ELIMINATED_PAY_SYSTEMS" => $arParams['ACCOUNT_PAYMENT_ELIMINATED_PAY_SYSTEMS'],
"PATH_TO_BASKET" => $arParams['PATH_TO_BASKET'],
"PATH_TO_PAYMENT" => $arParams['PATH_TO_PAYMENT'],
"PERSON_TYPE" => $arParams['ACCOUNT_PAYMENT_PERSON_TYPE'],
"REDIRECT_TO_CURRENT_PAGE" => "N",
"SELL_AMOUNT" => $arParams['ACCOUNT_PAYMENT_SELL_TOTAL'],
"SELL_CURRENCY" => $arParams['ACCOUNT_PAYMENT_SELL_CURRENCY'],
"SELL_SHOW_FIXED_VALUES" => $arParams['ACCOUNT_PAYMENT_SELL_SHOW_FIXED_VALUES'],
"SELL_SHOW_RESULT_SUM" => $arParams['ACCOUNT_PAYMENT_SELL_SHOW_RESULT_SUM'],
"SELL_TOTAL" => $arParams['ACCOUNT_PAYMENT_SELL_TOTAL'],
"SELL_USER_INPUT" => $arParams['ACCOUNT_PAYMENT_SELL_USER_INPUT'],
"SELL_VALUES_FROM_VAR" => "N",
"SELL_VAR_PRICE_VALUE" => "",
"SET_TITLE" => "N",
"CONTEXT_SITE_ID" => $arParams["CONTEXT_SITE_ID"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
),
$component
);
}
?>
</div>
</div>

View file

@ -0,0 +1,29 @@
<?php
use Intaro\RetailCrm\Service\SubscriberService;
global $USER;
Loc::loadMessages(__FILE__);
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true || !$USER->IsAuthorized()) {
die();
}
try {
if (!Loader::includeModule('intaro.retailcrm')) {
die(GetMessage('MODULE_NOT_INSTALL'));
}
} catch (Throwable $exception) {
die(GetMessage('MODULE_NOT_INSTALL') . ': ' . $exception->getMessage());
}
try {
$arResult["arUser"]["SUBSCRIBE"] = SubscriberService::getSubscribeStatusUser();
$this->IncludeComponentTemplate();
} catch (\Throwable $exception) {
$arResult['ERRORS'] = $exception->getMessage();
$this->IncludeComponentTemplate();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

View file

@ -0,0 +1,18 @@
<?php
$MESS["ACTIVE"] = "Active:";
$MESS["EMAIL"] = "E-mail:";
$MESS["LAST_LOGIN"] = "Last authorized:";
$MESS["LAST_NAME"] = "Last name:";
$MESS["LAST_UPDATE"] = "Last update:";
$MESS["LOGIN"] = "Login (min. 3 characters):";
$MESS["MAIN_PROFILE_TITLE"] = "Salutation:";
$MESS["MAIN_RESET"] = "Cancel";
$MESS["NAME"] = "Name:";
$MESS["NEW_PASSWORD"] = "New password (min. 6 characters):";
$MESS["NEW_PASSWORD_CONFIRM"] = "Confirm new password:";
$MESS["NEW_PASSWORD_REQ"] = "New Password:";
$MESS["PROFILE_DATA_SAVED"] = "All changes saved";
$MESS["RESET"] = "Reset";
$MESS["SAVE"] = "Save changes";
$MESS["SECOND_NAME"] = "Middle name:";
$MESS['SUBSCRIBE_EMAIL'] = 'Event subscribe';

View file

@ -0,0 +1,18 @@
<?php
$MESS['PROFILE_DATA_SAVED'] = "Изменения сохранены";
$MESS['LAST_UPDATE'] = "Дата обновления:";
$MESS['ACTIVE'] = "Активен:";
$MESS['NAME'] = "Имя:";
$MESS['LAST_NAME'] = "Фамилия:";
$MESS['SECOND_NAME'] = "Отчество:";
$MESS['EMAIL'] = "E-Mail:";
$MESS['MAIN_RESET'] = "Отмена";
$MESS['LOGIN'] = "Логин (мин. 3 символа):";
$MESS['NEW_PASSWORD'] = "Новый пароль (мин. 6 символов):";
$MESS['NEW_PASSWORD_CONFIRM'] = "Подтверждение нового пароля:";
$MESS['SAVE'] = "Сохранить изменения";
$MESS['RESET'] = "Сбросить";
$MESS['LAST_LOGIN'] = "Последняя авторизация:";
$MESS['NEW_PASSWORD_REQ'] = "Новый пароль:";
$MESS['MAIN_PROFILE_TITLE'] = "Обращение:";
$MESS['SUBSCRIBE_EMAIL'] = 'Подписаться на события';

View file

@ -0,0 +1,33 @@
BX.namespace('BX.Sale.PersonalProfileComponent');
(function() {
BX.Sale.PrivateProfileComponent = {
init: function ()
{
var passwordNode = BX('main-profile-password');
var confirmNode = BX('main-profile-password-confirm');
BX.ready(function(){
BX.bind(confirmNode, 'input', function(){
if (!BX.type.isNotEmptyString(confirmNode.value))
{
BX.removeClass(passwordNode.parentNode, 'has-error');
}
else if (!BX.type.isNotEmptyString(passwordNode.value))
{
BX.addClass(passwordNode.parentNode, 'has-error');
}
});
BX.bind(passwordNode, 'input', function(){
if (BX.type.isNotEmptyString(passwordNode.value))
{
BX.removeClass(passwordNode.parentNode, 'has-error');
}
else if (BX.type.isNotEmptyString(confirmNode.value))
{
BX.addClass(passwordNode.parentNode, 'has-error');
}
})
});
},
}
})();

View file

@ -0,0 +1 @@
{"version":3,"sources":["script.js"],"names":["BX","namespace","Sale","PrivateProfileComponent","init","passwordNode","confirmNode","ready","bind","type","isNotEmptyString","value","removeClass","parentNode","addClass"],"mappings":"AAAAA,GAAGC,UAAU,qCAEb,WACCD,GAAGE,KAAKC,yBACPC,KAAM,WAEL,IAAIC,EAAeL,GAAG,yBACtB,IAAIM,EAAcN,GAAG,iCACrBA,GAAGO,MAAM,WACRP,GAAGQ,KAAKF,EAAa,QAAS,WAC7B,IAAKN,GAAGS,KAAKC,iBAAiBJ,EAAYK,OAC1C,CACCX,GAAGY,YAAYP,EAAaQ,WAAY,kBAEpC,IAAKb,GAAGS,KAAKC,iBAAiBL,EAAaM,OAChD,CACCX,GAAGc,SAAST,EAAaQ,WAAY,gBAGvCb,GAAGQ,KAAKH,EAAc,QAAS,WAC9B,GAAIL,GAAGS,KAAKC,iBAAiBL,EAAaM,OAC1C,CACCX,GAAGY,YAAYP,EAAaQ,WAAY,kBAEpC,GAAIb,GAAGS,KAAKC,iBAAiBJ,EAAYK,OAC9C,CACCX,GAAGc,SAAST,EAAaQ,WAAY,qBAxB3C","file":"script.map.js"}

View file

@ -0,0 +1,2 @@
BX.namespace("BX.Sale.PersonalProfileComponent");(function(){BX.Sale.PrivateProfileComponent={init:function(){var e=BX("main-profile-password");var r=BX("main-profile-password-confirm");BX.ready(function(){BX.bind(r,"input",function(){if(!BX.type.isNotEmptyString(r.value)){BX.removeClass(e.parentNode,"has-error")}else if(!BX.type.isNotEmptyString(e.value)){BX.addClass(e.parentNode,"has-error")}});BX.bind(e,"input",function(){if(BX.type.isNotEmptyString(e.value)){BX.removeClass(e.parentNode,"has-error")}else if(BX.type.isNotEmptyString(r.value)){BX.addClass(e.parentNode,"has-error")}})})}}})();
//# sourceMappingURL=script.map.js

View file

@ -0,0 +1,14 @@
.bx_profile .main-profile-block-date-info { margin-bottom: 15px; }
.bx_profile .main-profile-form-password-annotation {
margin-top: 15px;
margin-bottom: 0;
color: grey;
font-weight: lighter;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
.bx_profile .main-profile-social-block { margin-top: 40px; }

View file

@ -0,0 +1 @@
.bx_profile .main-profile-block-date-info{margin-bottom:15px}.bx_profile .main-profile-form-password-annotation{margin-top:15px;margin-bottom:0;color:grey;font-weight:lighter;font-size:12px;font-family:Arial,Helvetica,sans-serif}.bx_profile .main-profile-social-block{margin-top:40px}

View file

@ -0,0 +1,162 @@
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
die();
use Bitrix\Main\Localization\Loc;
?>
<div class="bx_profile">
<?
ShowError($arResult["strProfileError"]);
if (($arResult['DATA_SAVED'] ?? 'N') === 'Y')
{
ShowNote(Loc::getMessage('PROFILE_DATA_SAVED'));
}
?>
<form method="post" name="form1" action="<?=POST_FORM_ACTION_URI?>" enctype="multipart/form-data" role="form">
<?=$arResult["BX_SESSION_CHECK"]?>
<input type="hidden" name="lang" value="<?=LANG?>" />
<input type="hidden" name="ID" value="<?=$arResult["ID"]?>" />
<input type="hidden" name="LOGIN" value="<?=$arResult["arUser"]["LOGIN"]?>" />
<div class="main-profile-block-shown" id="user_div_reg">
<div class="row main-profile-block-date-info">
<?
if($arResult["ID"]>0)
{
if ($arResult["arUser"]["TIMESTAMP_X"] <> '')
{
?>
<div class="col-12">
<strong><?=Loc::getMessage('LAST_UPDATE')?></strong>
<strong><?=$arResult["arUser"]["TIMESTAMP_X"]?></strong>
</div>
<?
}
if ($arResult["arUser"]["LAST_LOGIN"] <> '')
{
?>
<div class="col-12">
<strong><?=Loc::getMessage('LAST_LOGIN')?></strong>
<strong><?=$arResult["arUser"]["LAST_LOGIN"]?></strong>
</div>
<?
}
}
?>
</div>
<div class="row">
<div class="col-12">
<?
if (!in_array(LANGUAGE_ID,array('ru', 'ua')))
{
?>
<div class="row">
<div class="col align-items-center">
<div class="form-group">
<label class="main-profile-form-label" for="main-profile-title"><?=Loc::getMessage('MAIN_PROFILE_TITLE')?></label>
<input class="form-control" type="text" name="TITLE" maxlength="50" id="main-profile-title" value="<?=$arResult["arUser"]["TITLE"]?>" />
</div>
</div>
</div>
<?
}
?>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-name"><?=Loc::getMessage('NAME')?></label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="text" name="NAME" maxlength="50" id="main-profile-name" value="<?=$arResult["arUser"]["NAME"]?>" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-last-name"><?=Loc::getMessage('LAST_NAME')?></label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="text" name="LAST_NAME" maxlength="50" id="main-profile-last-name" value="<?=$arResult["arUser"]["LAST_NAME"]?>" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-second-name"><?=Loc::getMessage('SECOND_NAME')?></label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="text" name="SECOND_NAME" maxlength="50" id="main-profile-second-name" value="<?=$arResult["arUser"]["SECOND_NAME"]?>" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-email"><?=Loc::getMessage('EMAIL')?></label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="text" name="EMAIL" maxlength="50" id="main-profile-email" value="<?=$arResult["arUser"]["EMAIL"]?>" />
</div>
</div>
<?
if ($arResult['CAN_EDIT_PASSWORD'])
{
?>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-password"><?=Loc::getMessage('NEW_PASSWORD_REQ')?></label>
<div class="col-sm-8 col-md-9">
<input class=" form-control bx-auth-input main-profile-password" type="password" name="NEW_PASSWORD" maxlength="50" id="main-profile-password" value="" autocomplete="off"/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label main-profile-password" for="main-profile-password-confirm">
<?=Loc::getMessage('NEW_PASSWORD_CONFIRM')?>
</label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="password" name="NEW_PASSWORD_CONFIRM" maxlength="50" value="" id="main-profile-password-confirm" autocomplete="off" />
<small id="emailHelp" class="form-text text-muted"><?echo $arResult["GROUP_POLICY"]["PASSWORD_REQUIREMENTS"];?></small>
</div>
</div>
<?
}
?>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-md-3 col-form-label main-profile-form-label" for="main-profile-subscribe"><?=Loc::getMessage('SUBSCRIBE_EMAIL')?></label>
<div class="col-sm-8 col-md-9">
<input class="form-control" type="checkbox" name="SUBSCRIBE_CUSTOM" id="main-profile-subscribe" <?if($arResult["arUser"]["SUBSCRIBE"] === "Y") echo "checked";?>/>
</div>
</div>
</div>
<div class="row">
<div class="col">
<input type="submit" class="btn btn-themes btn-primary btn-md main-profile-submit" name="save" value="<?=(($arResult["ID"]>0) ? Loc::getMessage("MAIN_SAVE") : Loc::getMessage("MAIN_ADD"))?>">
<input type="submit" class="btn btn-themes btn-link btn-md" name="reset" value="<?echo GetMessage("MAIN_RESET")?>">
</div>
</div>
</form>
<?
$disabledSocServices = isset($arParams['DISABLE_SOCSERV_AUTH']) && $arParams['DISABLE_SOCSERV_AUTH'] === 'Y';
if (!$disabledSocServices)
{
?>
<div class="col-sm-12 main-profile-social-block">
<?
if ($arResult["SOCSERV_ENABLED"])
{
$APPLICATION->IncludeComponent(
"bitrix:socserv.auth.split",
".default",
[
"SHOW_PROFILES" => "Y",
"ALLOW_DELETE" => "Y",
],
false
);
}
?>
</div>
<?
}
?>
<div class="clearfix"></div>
<script>
BX.Sale.PrivateProfileComponent.init();
</script>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -0,0 +1,133 @@
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$this->addExternalCss("/bitrix/css/main/font-awesome.css");
$theme = Bitrix\Main\Config\Option::get("main", "wizard_eshop_bootstrap_theme_id", "blue", SITE_ID);
$availablePages = array();
if ($arParams['SHOW_ORDER_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_ORDERS'],
"name" => Loc::getMessage("SPS_ORDER_PAGE_NAME"),
"icon" => '<i class="fa fa-calculator"></i>'
);
}
if ($arParams['SHOW_ACCOUNT_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_ACCOUNT'],
"name" => Loc::getMessage("SPS_ACCOUNT_PAGE_NAME"),
"icon" => '<i class="fa fa-credit-card"></i>'
);
}
if ($arParams['SHOW_PRIVATE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_PRIVATE'],
"name" => Loc::getMessage("SPS_PERSONAL_PAGE_NAME"),
"icon" => '<i class="fa fa-user-secret"></i>'
);
}
if ($arParams['SHOW_ORDER_PAGE'] === 'Y')
{
$delimeter = ($arParams['SEF_MODE'] === 'Y') ? "?" : "&";
$availablePages[] = array(
"path" => $arResult['PATH_TO_ORDERS'].$delimeter."filter_history=Y",
"name" => Loc::getMessage("SPS_ORDER_PAGE_HISTORY"),
"icon" => '<i class="fa fa-list-alt"></i>'
);
}
if ($arParams['SHOW_PROFILE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_PROFILE'],
"name" => Loc::getMessage("SPS_PROFILE_PAGE_NAME"),
"icon" => '<i class="fa fa-list-ol"></i>'
);
}
if ($arParams['SHOW_BASKET_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arParams['PATH_TO_BASKET'],
"name" => Loc::getMessage("SPS_BASKET_PAGE_NAME"),
"icon" => '<i class="fa fa-shopping-cart"></i>'
);
}
if ($arParams['SHOW_SUBSCRIBE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_SUBSCRIBE'],
"name" => Loc::getMessage("SPS_SUBSCRIBE_PAGE_NAME"),
"icon" => '<i class="fa fa-envelope"></i>'
);
}
if ($arParams['SHOW_CONTACT_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arParams['PATH_TO_CONTACT'],
"name" => Loc::getMessage("SPS_CONTACT_PAGE_NAME"),
"icon" => '<i class="fa fa-info-circle"></i>'
);
}
$customPagesList = CUtil::JsObjectToPhp($arParams['~CUSTOM_PAGES']);
if ($customPagesList)
{
foreach ($customPagesList as $page)
{
$availablePages[] = array(
"path" => $page[0],
"name" => $page[1],
"icon" => (mb_strlen($page[2])) ? '<i class="fa '.htmlspecialcharsbx($page[2]).'"></i>' : ""
);
}
}
if (empty($availablePages))
{
ShowError(Loc::getMessage("SPS_ERROR_NOT_CHOSEN_ELEMENT"));
}
else
{
?>
<div class="row">
<?
foreach ($availablePages as $blockElement)
{
?>
<div class="col-lg-3 col-md-6 col-sm-6 col">
<div class="sale-personal-section-index-block bx-theme-<?=$theme?>">
<a class="sale-personal-section-index-block-link" href="<?=htmlspecialcharsbx($blockElement['path'])?>">
<span class="sale-personal-section-index-block-ico">
<?=$blockElement['icon']?>
</span>
<h2 class="sale-personal-section-index-block-name">
<?=htmlspecialcharsbx($blockElement['name'])?>
</h2>
</a>
</div>
</div>
<?
}
?>
</div>
<?
}
?>

View file

@ -0,0 +1,6 @@
<?
$MESS["SPS_TITLE_ACCOUNT"] = "My Account";
$MESS["SPS_CHAIN_ACCOUNT"] = "Internal account";
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_BUY_MONEY"] = "Top up account";
?>

View file

@ -0,0 +1,13 @@
<?
$MESS["SPS_ACCOUNT_PAGE_NAME"] = "Personal account";
$MESS["SPS_PERSONAL_PAGE_NAME"] = "Personal information";
$MESS["SPS_PROFILE_PAGE_NAME"] = "Order profiles";
$MESS["SPS_ORDER_PAGE_NAME"] = "Current orders";
$MESS["SPS_ORDER_PAGE_HISTORY"] = "Order history";
$MESS["SPS_SUBSCRIBE_PAGE_NAME"] = "Subscriptions";
$MESS["SPS_BASKET_PAGE_NAME"] = "Shopping cart";
$MESS["SPS_CONTACT_PAGE_NAME"] = "Contacts";
$MESS["SPS_ERROR_NOT_CHOSEN_ELEMENT"] = "No items selected";
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_TITLE_MAIN"] = "Personal area";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_ORDERS"] = "My orders";
$MESS["SPS_CHAIN_ORDER_DETAIL"] = "Cancel order ##ID#";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_ORDERS"] = "My orders";
$MESS["SPS_CHAIN_ORDER_DETAIL"] = "Order information ##ID#";
?>

View file

@ -0,0 +1,4 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_ORDERS"] = "My orders";
?>

View file

@ -0,0 +1,4 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_ORDERS"] = "My orders";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_PRIVATE"] = "Personal information";
$MESS["SPS_TITLE_PRIVATE"] = "Personal information";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_PROFILE"] = "User profiles";
$MESS["SPS_TITLE_PROFILE"] = "User profile";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_PROFILE"] = "User profiles";
$MESS["SPS_TITLE_PROFILE"] = "User profile";
?>

View file

@ -0,0 +1,5 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_PROFILE"] = "User profiles";
$MESS["SPS_TITLE_PROFILE"] = "User profile";
?>

View file

@ -0,0 +1,6 @@
<?
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_CHAIN_SUBSCRIBE"] = "User subscriptions";
$MESS["SPS_TITLE_SUBSCRIBE"] = "My subscriptions";
$MESS["SPS_CHAIN_SUBSCRIBE_NEW"] = "Your subscriptions";
?>

View file

@ -0,0 +1,13 @@
<?
$MESS["SPS_ACCOUNT_PAGE_NAME"] = "Personal account";
$MESS["SPS_PERSONAL_PAGE_NAME"] = "Personal information";
$MESS["SPS_PROFILE_PAGE_NAME"] = "Order profiles";
$MESS["SPS_ORDER_PAGE_NAME"] = "Current orders";
$MESS["SPS_ORDER_PAGE_HISTORY"] = "Order history";
$MESS["SPS_SUBSCRIBE_PAGE_NAME"] = "Subscriptions";
$MESS["SPS_BASKET_PAGE_NAME"] = "Shopping cart";
$MESS["SPS_CONTACT_PAGE_NAME"] = "Contacts";
$MESS["SPS_ERROR_NOT_CHOSEN_ELEMENT"] = "No items selected";
$MESS["SPS_CHAIN_MAIN"] = "My account";
$MESS["SPS_TITLE_MAIN"] = "Personal area";
?>

View file

@ -0,0 +1,5 @@
<?php
$MESS["SPS_TITLE_ACCOUNT"] = "Мои пользовательский счет";
$MESS["SPS_CHAIN_ACCOUNT"] = "Внутренний счет";
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_BUY_MONEY"] = "Пополнение счета";

View file

@ -0,0 +1,14 @@
<?php
$MESS["SPS_ACCOUNT_PAGE_NAME"] = "Личный счет";
$MESS["SPS_PERSONAL_PAGE_NAME"] = "Личные данные";
$MESS["SPS_PROFILE_PAGE_NAME"] = "Профили заказов";
$MESS["SPS_ORDER_PAGE_NAME"] = "Текущие заказы";
$MESS["SPS_ORDER_PAGE_HISTORY"] = "История заказов";
$MESS["SPS_SUBSCRIBE_PAGE_NAME"] = "Подписки";
$MESS["SPS_BASKET_PAGE_NAME"] = "Корзина";
$MESS["SPS_CONTACT_PAGE_NAME"] = "Контакты";
$MESS["SPS_ERROR_NOT_CHOSEN_ELEMENT"] = "Отсутвуют выбранные элементы";
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_TITLE_MAIN"] = "Персональный раздел";

View file

@ -0,0 +1,4 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_ORDERS"] = "Мои заказы";
$MESS["SPS_CHAIN_ORDER_DETAIL"] = "Отмена заказа №#ID#";

View file

@ -0,0 +1,4 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_ORDERS"] = "Мои заказы";
$MESS["SPS_CHAIN_ORDER_DETAIL"] = "Информация о заказе №#ID#";

View file

@ -0,0 +1,3 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_ORDERS"] = "Мои заказы";

View file

@ -0,0 +1,3 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_ORDERS"] = "Мои заказы";

View file

@ -0,0 +1,5 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_PRIVATE"] = "Персональные данные";
$MESS["SPS_TITLE_PRIVATE"] = "Персональные данные";
$MESS["SPS_ACCESS_DENIED"] = "Для просмотра личных данных необходимо авторизоваться.";

View file

@ -0,0 +1,4 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_PROFILE"] = "Список профилей пользователя";
$MESS["SPS_TITLE_PROFILE"] = "Профиль пользователя";

View file

@ -0,0 +1,4 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_PROFILE"] = "Список профилей пользователя";
$MESS["SPS_TITLE_PROFILE"] = "Профиль пользователя";

View file

@ -0,0 +1,4 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_PROFILE"] = "Список профилей пользователя";
$MESS["SPS_TITLE_PROFILE"] = "Профиль пользователя";

View file

@ -0,0 +1,5 @@
<?php
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_CHAIN_SUBSCRIBE"] = "Список подписок пользователя";
$MESS["SPS_TITLE_SUBSCRIBE"] = "Мои подписки";
$MESS["SPS_CHAIN_SUBSCRIBE_NEW"] = "Ваши подписки";

View file

@ -0,0 +1,14 @@
<?php
$MESS["SPS_ACCOUNT_PAGE_NAME"] = "Личный счет";
$MESS["SPS_PERSONAL_PAGE_NAME"] = "Личные данные";
$MESS["SPS_PROFILE_PAGE_NAME"] = "Профили заказов";
$MESS["SPS_ORDER_PAGE_NAME"] = "Текущие заказы";
$MESS["SPS_ORDER_PAGE_HISTORY"] = "История заказов";
$MESS["SPS_SUBSCRIBE_PAGE_NAME"] = "Подписки";
$MESS["SPS_BASKET_PAGE_NAME"] = "Корзина";
$MESS["SPS_CONTACT_PAGE_NAME"] = "Контакты";
$MESS["SPS_ERROR_NOT_CHOSEN_ELEMENT"] = "Отсутвуют выбранные элементы";
$MESS["SPS_CHAIN_MAIN"] = "Мой кабинет";
$MESS["SPS_TITLE_MAIN"] = "Персональный раздел";

View file

@ -0,0 +1,40 @@
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_ORDER_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
elseif ($arParams['ORDER_DISALLOW_CANCEL'] === 'Y')
{
LocalRedirect($arResult['PATH_TO_ORDERS']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ORDERS"), $arResult['PATH_TO_ORDERS']);
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ORDER_DETAIL", array("#ID#" => $arResult["VARIABLES"]["ID"])));
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.order.cancel",
"bootstrap_v4",
array(
"PATH_TO_LIST" => $arResult["PATH_TO_ORDERS"],
"PATH_TO_DETAIL" => $arResult["PATH_TO_ORDER_DETAIL"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
"SET_TITLE" =>$arParams["SET_TITLE"],
"ID" => $arResult["VARIABLES"]["ID"],
"CONTEXT_SITE_ID" => $arParams["CONTEXT_SITE_ID"],
),
$component
);
?>

View file

@ -0,0 +1,56 @@
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_ORDER_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ORDERS"), $arResult['PATH_TO_ORDERS']);
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ORDER_DETAIL", array("#ID#" => urldecode($arResult["VARIABLES"]["ID"]))));
$arDetParams = array(
"PATH_TO_LIST" => $arResult["PATH_TO_ORDERS"],
"PATH_TO_CANCEL" => $arResult["PATH_TO_ORDER_CANCEL"],
"PATH_TO_COPY" => $arResult["PATH_TO_ORDER_COPY"],
"PATH_TO_PAYMENT" => $arParams["PATH_TO_PAYMENT"],
"SET_TITLE" =>$arParams["SET_TITLE"],
"ID" => $arResult["VARIABLES"]["ID"],
"ACTIVE_DATE_FORMAT" => $arParams["ACTIVE_DATE_FORMAT"],
"ALLOW_INNER" => $arParams["ALLOW_INNER"],
"ONLY_INNER_FULL" => $arParams["ONLY_INNER_FULL"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"RESTRICT_CHANGE_PAYSYSTEM" => $arParams["ORDER_RESTRICT_CHANGE_PAYSYSTEM"],
"REFRESH_PRICES" => $arParams["ORDER_REFRESH_PRICES"],
"DISALLOW_CANCEL" => $arParams["ORDER_DISALLOW_CANCEL"],
"HIDE_USER_INFO" => $arParams["ORDER_HIDE_USER_INFO"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
"CONTEXT_SITE_ID" => $arParams["CONTEXT_SITE_ID"],
"CUSTOM_SELECT_PROPS" => $arParams["CUSTOM_SELECT_PROPS"]
);
foreach($arParams as $key => $val)
{
if(mb_strpos($key, "PROP_") !== false)
$arDetParams[$key] = $val;
}
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.order.detail",
"bootstrap_v4",
$arDetParams,
$component
);
?>

View file

@ -0,0 +1,62 @@
<?php
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)
{
die();
}
/** @var array $arParams */
/** @var array $arResult */
/** @var CBitrixComponent $component */
/** @global CMain $APPLICATION */
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_ORDER_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] !== '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_ORDERS"), $arResult['PATH_TO_ORDERS']);
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.order.list",
"bootstrap_v4",
array(
"PATH_TO_DETAIL" => $arResult["PATH_TO_ORDER_DETAIL"],
"PATH_TO_CANCEL" => $arResult["PATH_TO_ORDER_CANCEL"],
"PATH_TO_CATALOG" => $arParams["PATH_TO_CATALOG"],
"PATH_TO_COPY" => $arResult["PATH_TO_ORDER_COPY"],
"PATH_TO_BASKET" => $arParams["PATH_TO_BASKET"],
"PATH_TO_PAYMENT" => $arParams["PATH_TO_PAYMENT"],
"SAVE_IN_SESSION" => $arParams["SAVE_IN_SESSION"],
"ORDERS_PER_PAGE" => $arParams["ORDERS_PER_PAGE"],
"SET_TITLE" =>$arParams["SET_TITLE"],
"ID" => $arResult["VARIABLES"]["ID"],
"NAV_TEMPLATE" => $arParams["NAV_TEMPLATE"],
"ACTIVE_DATE_FORMAT" => $arParams["ACTIVE_DATE_FORMAT"],
"HISTORIC_STATUSES" => $arParams["ORDER_HISTORIC_STATUSES"],
"ALLOW_INNER" => $arParams["ALLOW_INNER"],
"ONLY_INNER_FULL" => $arParams["ONLY_INNER_FULL"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"DEFAULT_SORT" => $arParams["ORDER_DEFAULT_SORT"],
"DISALLOW_CANCEL" => $arParams["ORDER_DISALLOW_CANCEL"],
"RESTRICT_CHANGE_PAYSYSTEM" => $arParams["ORDER_RESTRICT_CHANGE_PAYSYSTEM"],
"REFRESH_PRICES" => $arParams["ORDER_REFRESH_PRICES"],
"CONTEXT_SITE_ID" => $arParams["CONTEXT_SITE_ID"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
),
$component
);

View file

@ -0,0 +1,119 @@
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)
{
die();
}
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @var PersonalOrderSection $component */
/** @var array $arParams */
/** @var array $arResult */
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_PRIVATE_PAGE'] !== 'Y' && $arParams['USE_PRIVATE_PAGE_TO_AUTH'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
if ($arParams["MAIN_CHAIN_NAME"] !== '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_PRIVATE"));
if ($arParams['SET_TITLE'] == 'Y')
{
$APPLICATION->SetTitle(Loc::getMessage("SPS_TITLE_PRIVATE"));
}
if (!$USER->IsAuthorized() || $arResult['SHOW_LOGIN_FORM'] === 'Y')
{
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] !== 'Y')
{
ob_start();
$APPLICATION->AuthForm('', false, false, 'N', false);
$authForm = ob_get_clean();
}
else
{
if ($arResult['SHOW_FORGOT_PASSWORD_FORM'] === 'Y')
{
ob_start();
$APPLICATION->IncludeComponent(
'bitrix:main.auth.forgotpasswd',
'.default',
array(
'AUTH_AUTH_URL' => $arResult['PATH_TO_PRIVATE'],
// 'AUTH_REGISTER_URL' => 'register.php',
),
false
);
$authForm = ob_get_clean();
}
elseif($arResult['SHOW_CHANGE_PASSWORD_FORM'] === 'Y')
{
ob_start();
$APPLICATION->IncludeComponent(
'bitrix:main.auth.changepasswd',
'.default',
array(
'AUTH_AUTH_URL' => $arResult['PATH_TO_PRIVATE'],
// 'AUTH_REGISTER_URL' => 'register.php',
),
false
);
$authForm = ob_get_clean();
}
else
{
ob_start();
$APPLICATION->IncludeComponent(
'bitrix:main.auth.form',
'.default',
array(
'AUTH_FORGOT_PASSWORD_URL' => $arResult['PATH_TO_PASSWORD_RESTORE'],
// 'AUTH_REGISTER_URL' => 'register.php',
'AUTH_SUCCESS_URL' => $arResult['AUTH_SUCCESS_URL'],
'DISABLE_SOCSERV_AUTH' => $arParams['DISABLE_SOCSERV_AUTH'],
),
false
);
$authForm = ob_get_clean();
}
}
?>
<div class="row">
<?
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] !== 'Y')
{
?>
<div class="col-md-8 offset-md-2 col-lg-6 offset-lg-3">
<div class="alert alert-danger"><?=GetMessage("SPS_ACCESS_DENIED")?></div>
</div>
<?
}
?>
<div class="col-md-8 offset-md-2 col-lg-6 offset-lg-3">
<?=$authForm?>
</div>
</div>
<?
}
else
{
$APPLICATION->IncludeComponent(
"bitrix:main.profile",
"",
Array(
"SET_TITLE" =>$arParams["SET_TITLE"],
"AJAX_MODE" => $arParams['AJAX_MODE_PRIVATE'],
"SEND_INFO" => $arParams["SEND_INFO_PRIVATE"],
"CHECK_RIGHTS" => $arParams['CHECK_RIGHTS_PRIVATE'],
"EDITABLE_EXTERNAL_AUTH_ID" => $arParams['EDITABLE_EXTERNAL_AUTH_ID'],
"DISABLE_SOCSERV_AUTH" => $arParams['DISABLE_SOCSERV_AUTH']
),
$component
);
}

View file

@ -0,0 +1,42 @@
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)
{
die();
}
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @var PersonalOrderSection $component */
/** @var array $arParams */
/** @var array $arResult */
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_PROFILE_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] !== '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_PROFILE"));
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.profile.list",
"bootstrap_v4",
[
"PATH_TO_DETAIL" => $arResult['PATH_TO_PROFILE_DETAIL'],
"PATH_TO_DELETE" => $arResult['PATH_TO_PROFILE_DELETE'],
"PER_PAGE" => $arParams["PROFILES_PER_PAGE"],
"SET_TITLE" =>$arParams["SET_TITLE"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
],
$component
);

View file

@ -0,0 +1,35 @@
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_PROFILE_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_PROFILE"));
$APPLICATION->IncludeComponent(
"bitrix:sale.personal.profile.detail",
"bootstrap_v4",
array(
"PATH_TO_LIST" => $arResult["PATH_TO_PROFILE"],
"PATH_TO_DETAIL" => $arResult["PATH_TO_PROFILE_DETAIL"],
"SET_TITLE" =>$arParams["SET_TITLE"],
"USE_AJAX_LOCATIONS" => $arParams['USE_AJAX_LOCATIONS_PROFILE'],
"COMPATIBLE_LOCATION_MODE" => $arParams['COMPATIBLE_LOCATION_MODE_PROFILE'],
"ID" => $arResult["VARIABLES"]["ID"],
"AUTH_FORM_IN_TEMPLATE" => 'Y',
),
$component
);
?>

View file

@ -0,0 +1,49 @@
.sale-personal-section-index-block {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin: 15px 0;
padding: 0;
height: 87%;
border-radius: 3px;
background-size: cover;
color: #fff;
text-align: center;
text-transform: uppercase;
opacity: .8;
transition: all 0.3s;
justify-content: space-around;
background-color: var(--theme-color-primary, #51cbce);
}
@media (max-width: 992px) {
.sale-personal-section-index-block {
margin: 8px 0;
height: auto;
}
}
.sale-personal-section-index-block:hover { opacity: 1; }
.sale-personal-section-index-block-link,
.sale-personal-section-index-block-link:hover,
.sale-personal-section-index-block-link:active,
.sale-personal-section-index-block-link:focus,
.sale-personal-section-index-block-link:visited {
display: block;
padding: 25px 5px;
width: 100%;
color: #fff;
text-decoration: none;
}
.sale-personal-section-index-block-link { color: #fff; }
.sale-personal-section-index-block-ico { font-size: 64px; }
.sale-personal-section-index-block-name {
color: #fff;
font-size: 15px;
margin: 0;
padding: 0;
}

View file

@ -0,0 +1 @@
.sale-personal-section-index-block{display:-webkit-box;display:-ms-flexbox;display:flex;margin:15px 0;padding:0;height:87%;border-radius:3px;background-size:cover;color:#fff;text-align:center;text-transform:uppercase;opacity:.8;transition:all .3s;justify-content:space-around;background-color:var(--theme-color-primary,#51cbce)}@media(max-width:992px){.sale-personal-section-index-block{margin:8px 0;height:auto}}.sale-personal-section-index-block:hover{opacity:1}.sale-personal-section-index-block-link,.sale-personal-section-index-block-link:hover,.sale-personal-section-index-block-link:active,.sale-personal-section-index-block-link:focus,.sale-personal-section-index-block-link:visited{display:block;padding:25px 5px;width:100%;color:#fff;text-decoration:none}.sale-personal-section-index-block-link{color:#fff}.sale-personal-section-index-block-ico{font-size:64px}.sale-personal-section-index-block-name{color:#fff;font-size:15px;margin:0;padding:0}

View file

@ -0,0 +1,31 @@
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams['SHOW_SUBSCRIBE_PAGE'] !== 'Y')
{
LocalRedirect($arParams['SEF_FOLDER']);
}
global $USER;
if ($arParams['USE_PRIVATE_PAGE_TO_AUTH'] === 'Y' && !$USER->IsAuthorized())
{
LocalRedirect($arResult['PATH_TO_AUTH_PAGE']);
}
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$APPLICATION->AddChainItem(Loc::getMessage("SPS_CHAIN_SUBSCRIBE_NEW"));
$APPLICATION->IncludeComponent(
'bitrix:catalog.product.subscribe.list',
"bootstrap_v4",
array(
'SET_TITLE' => $arParams['SET_TITLE'],
'DETAIL_URL' => $arParams['SUBSCRIBE_DETAIL_URL']
),
$component
);

View file

@ -0,0 +1,132 @@
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
use Bitrix\Main\Localization\Loc;
if ($arParams["MAIN_CHAIN_NAME"] <> '')
{
$APPLICATION->AddChainItem(htmlspecialcharsbx($arParams["MAIN_CHAIN_NAME"]), $arResult['SEF_FOLDER']);
}
$this->addExternalCss("/bitrix/css/main/font-awesome.css");
$theme = Bitrix\Main\Config\Option::get("main", "wizard_eshop_bootstrap_theme_id", "blue", SITE_ID);
$availablePages = array();
if ($arParams['SHOW_ORDER_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_ORDERS'],
"name" => Loc::getMessage("SPS_ORDER_PAGE_NAME"),
"icon" => '<i class="fa fa-calculator"></i>'
);
}
if ($arParams['SHOW_ACCOUNT_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_ACCOUNT'],
"name" => Loc::getMessage("SPS_ACCOUNT_PAGE_NAME"),
"icon" => '<i class="fa fa-credit-card"></i>'
);
}
if ($arParams['SHOW_PRIVATE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_PRIVATE'],
"name" => Loc::getMessage("SPS_PERSONAL_PAGE_NAME"),
"icon" => '<i class="fa fa-user-secret"></i>'
);
}
if ($arParams['SHOW_ORDER_PAGE'] === 'Y')
{
$delimeter = ($arParams['SEF_MODE'] === 'Y') ? "?" : "&";
$availablePages[] = array(
"path" => $arResult['PATH_TO_ORDERS'].$delimeter."filter_history=Y",
"name" => Loc::getMessage("SPS_ORDER_PAGE_HISTORY"),
"icon" => '<i class="fa fa-list-alt"></i>'
);
}
if ($arParams['SHOW_PROFILE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_PROFILE'],
"name" => Loc::getMessage("SPS_PROFILE_PAGE_NAME"),
"icon" => '<i class="fa fa-list-ol"></i>'
);
}
if ($arParams['SHOW_BASKET_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arParams['PATH_TO_BASKET'],
"name" => Loc::getMessage("SPS_BASKET_PAGE_NAME"),
"icon" => '<i class="fa fa-shopping-cart"></i>'
);
}
if ($arParams['SHOW_SUBSCRIBE_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arResult['PATH_TO_SUBSCRIBE'],
"name" => Loc::getMessage("SPS_SUBSCRIBE_PAGE_NAME"),
"icon" => '<i class="fa fa-envelope"></i>'
);
}
if ($arParams['SHOW_CONTACT_PAGE'] === 'Y')
{
$availablePages[] = array(
"path" => $arParams['PATH_TO_CONTACT'],
"name" => Loc::getMessage("SPS_CONTACT_PAGE_NAME"),
"icon" => '<i class="fa fa-info-circle"></i>'
);
}
$customPagesList = CUtil::JsObjectToPhp($arParams['~CUSTOM_PAGES']);
if ($customPagesList)
{
foreach ($customPagesList as $page)
{
$availablePages[] = array(
"path" => $page[0],
"name" => $page[1],
"icon" => (mb_strlen($page[2])) ? '<i class="fa '.htmlspecialcharsbx($page[2]).'"></i>' : ""
);
}
}
if (empty($availablePages))
{
ShowError(Loc::getMessage("SPS_ERROR_NOT_CHOSEN_ELEMENT"));
}
else
{
?>
<div class="row">
<? foreach ($availablePages as $blockElement)
{
?>
<div class="col-lg-3 col-md-4 col-6">
<div class="sale-personal-section-index-block bx-<?=$theme?>">
<a class="sale-personal-section-index-block-link" href="<?=htmlspecialcharsbx($blockElement['path'])?>">
<span class="sale-personal-section-index-block-ico">
<?=$blockElement['icon']?>
</span>
<h2 class="sale-personal-section-index-block-name">
<?=htmlspecialcharsbx($blockElement['name'])?>
</h2>
</a>
</div>
</div>
<?
}
?>
</div>
<?
}
?>

View file

@ -0,0 +1,16 @@
<?php
namespace Intaro\RetailCrm\Service;
class SubscriberService
{
public static function getSubscribeStatusUser(): bool
{
global $USER;
$userFields = CUser::GetByID($USER->GetID())->Fetch();
return isset($userFields['UF_SUBSCRIBE_EMAIL']) && $userFields['UF_SUBSCRIBE_EMAIL'] == '1';
}
}