/** * Базовый путь * @return string */ public function getBaseRequestUrl() { return Config::API_REQUEST_URL . $this->getType() . '/' . Config::getPartnerId() . '/'; }
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die; } \Bitrix\Main\Localization\Loc::loadMessages(__FILE__); $arComponentParameters = array('GROUPS' => array(), 'PARAMETERS' => array('WIDGET_TYPE' => array('PARENT' => 'BASE', 'NAME' => GetMessage('RR_COMPONENT_WIDGET_TYPE'), 'TYPE' => 'LIST', 'VALUES' => \RetailRocket\Config::getListWidgetType(), 'DEFAULT' => ''), 'URL_PARAMETER' => array('PARENT' => 'BASE', 'NAME' => GetMessage('RR_COMPONENT_URL_PARAMETER'), 'TYPE' => 'STRING'), 'CACHE_TIME' => array('DEFAULT' => 86400)));
<tr class='heading'> <td colspan='2'><?php echo GetMessage('RR_OPTIONS_SETTINGS'); ?> </td> </tr> <tr> <td width='40%'> <label><?php echo GetMessage('RR_OPTIONS_PARTNER_ID'); ?> :</label> </td> <td width='60%'> <input name='option_partner_id' value="<?php echo \RetailRocket\Config::getPartnerId(); ?> " style="width: 40%"/> </td> </tr> <?php $tabControl->BeginNextTab(); require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/admin/group_rights.php'; ?> <?php $tabControl->Buttons(); ?> <input type='submit' name='Update' value='<?php echo GetMessage('MAIN_SAVE');
/** * Основной код трекинг системы * На всех страницах сайта должен быть установлен трекинг код системы * @return string */ public static function showGeneralCode() { return sprintf("<script type='text/javascript'>\n\t\t\t\tvar rrPartnerId = '%s';\n\t\t\t\tvar rrApi = {};\n\t\t\t\tvar rrApiOnReady = rrApiOnReady || [];\n\t\t\t\trrApi.addToBasket = rrApi.order = rrApi.categoryView = rrApi.view =\n\t\t\t \t\trrApi.recomMouseDown = rrApi.recomAddToCart = function() {};\n\t\t\t\t(function(d) {\n\t\t\t\t\tvar ref = d.getElementsByTagName('script')[0];\n\t\t\t\t\tvar apiJs, apiJsId = 'rrApi-jssdk';\n\t\t\t\t\tif (d.getElementById(apiJsId)) return;\n\t\t\t\t\tapiJs = d.createElement('script');\n\t\t\t\t\tapiJs.id = apiJsId;\n\t\t\t\t\tapiJs.async = true;\n\t\t\t\t\tapiJs.src = '//cdn.retailrocket.ru/content/javascript/tracking.js';\n\t\t\t\t\tref.parentNode.insertBefore(apiJs, ref);\n\t\t\t\t}(document));\n\t\t\t</script>", Config::getPartnerId()); }