%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.216.34.208 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.basket.basket.small.mail/ |
Upload File : |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); // functions for custom columns view if (!function_exists("getIblockNames")) { function getIblockNames($arIblockIDs, $arIblockNames) { $str = ""; foreach ($arIblockIDs as $iblockID) { $str .= "\"".$arIblockNames[$iblockID]."\", "; } $str .= "#"; return str_replace(", #", "", $str); } } $arColumns = array( "NAME" => GetMessage("SBB_BNAME"), "DISCOUNT_FORMATED" => GetMessage("SBB_BDISCOUNT"), "WEIGHT_FORMATED" => GetMessage("SBB_BWEIGHT"), #"PROPS" => GetMessage("SBB_BPROPS"), "TYPE" => GetMessage("SBB_BTYPE"), "PRICE_FORMATED" => GetMessage("SBB_BPRICE"), "QUANTITY_FORMATED" => GetMessage("SBB_BQUANTITY"), "SUM" => GetMessage("SBB_BSUM"), "DETAIL_PICTURE" => GetMessage("SBB_DETAIL_PICTURE"), "PREVIEW_PICTURE" => GetMessage("SBB_PREVIEW_PICTURE") ); if (CModule::IncludeModule("catalog")) { // get iblock props from all catalog iblocks including sku iblocks $arIblockIDs = array(); $arIblockNames = array(); $catalogFilter = array(); if (array_key_exists('src_site', $_REQUEST)) { $siteID = $_REQUEST['src_site']; if($siteID !== '' && preg_match('/^[a-z0-9_]{2}$/i', $siteID) === 1) { $catalogFilter = array('LID' => $siteID); } } $dbCatalog = CCatalog::GetList(array(), $catalogFilter); while ($arCatalog = $dbCatalog->GetNext()) { $arIblockIDs[] = $arCatalog["IBLOCK_ID"]; $arIblockNames[$arCatalog["IBLOCK_ID"]] = $arCatalog["NAME"]; } // iblock props $arProps = array(); $arPropNameCodeCount = array(); foreach ($arIblockIDs as $iblockID) { $dbProps = CIBlockProperty::GetList( array( "SORT"=>"ASC", "NAME"=>"ASC" ), array( "IBLOCK_ID" => $iblockID, "ACTIVE" => "Y", "CHECK_PERMISSIONS" => "N", ) ); while ($arProp = $dbProps->GetNext()) { $arProps[] = $arProp; if (isset($arProp["NAME"])) $arPropNameCodeCount[$arProp["NAME"]][$arProp["CODE"]]++; } } // create properties array where properties with the same codes are considered the same (TODO: use property IDs instead) $arTmpProperty2Iblock = array(); foreach ($arProps as $id => $arProperty) { $arTmpProperty2Iblock["PROPERTY_".$arProperty["CODE"]][] = $arProperty["IBLOCK_ID"]; if ( isset($arProperty["NAME"]) && count($arPropNameCodeCount[$arProperty["NAME"]]) > 1 ) $name = $arProperty["NAME"]." [".$arProperty["CODE"]."] "; else $name = $arProperty["NAME"]; if (array_key_exists("PROPERTY_".$arProperty["CODE"], $arColumns)) $arColumns["PROPERTY_".$arProperty["CODE"]] = $name." (".getIblockNames($arTmpProperty2Iblock["PROPERTY_".$arProperty["CODE"]], $arIblockNames).")"; else $arColumns["PROPERTY_".$arProperty["CODE"]] = $name; } } // end of custom columns view functions $arComponentParameters = Array( "PARAMETERS" => Array( "COLUMNS_LIST" => Array( "NAME"=>GetMessage("SBB_COLUMNS_LIST"), "TYPE"=>"LIST", "MULTIPLE"=>"Y", "VALUES"=>$arColumns, "DEFAULT"=>array("NAME", "SUM", "QUANTITY"), "COLS"=>25, "SIZE"=>7, "ADDITIONAL_VALUES"=>"N", "PARENT" => "VISUAL", ), "USER_ID" => Array( "NAME" => GetMessage("SBBS_USER_ID"), "TYPE" => "LIST", "MULTIPLE" => "N", "VALUES" => Array( "{#USER_ID#}" => "={#USER_ID#}", "{#ORDER_USER_ID#}" => "={#ORDER_USER_ID#}", "{#ID#}" => "={#ID#}", ), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => Array( "{#USER_ID#}" => "{#USER_ID#}" ), #"COLS" => 25, "PARENT" => "ADDITIONAL_SETTINGS", ), "PATH_TO_BASKET" => Array( "NAME" => GetMessage("SBBS_PATH_TO_BASKET"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/personal/basket.php", "COLS" => 25, "PARENT" => "ADDITIONAL_SETTINGS", ), "PATH_TO_ORDER" => Array( "NAME" => GetMessage("SBBS_PATH_TO_ORDER"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/personal/order.php", "COLS" => 25, "PARENT" => "ADDITIONAL_SETTINGS", ), "SHOW_DELAY" => array( "NAME" => GetMessage('SBBS_SHOW_DELAY'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "MULTIPLE" => "N", ), "SHOW_NOTAVAIL" => array( "NAME" => GetMessage('SBBS_SHOW_NOTAVAIL'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "MULTIPLE" => "N", ), "SHOW_SUBSCRIBE" => array( "NAME" => GetMessage('SBBS_SHOW_SUBSCRIBE'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "MULTIPLE" => "N", ), ) ); ?>