Bread09
@Bread09
Newonkiy

Как получить данные которые получаю в одном файле, а в другом нет?

Есть файл в которую как я понял попадает цена товаров в $arResult['SUM']['VALUE'];

/bitrix/templates/universelite_s1/components/intec/startshop.order/.default/result_modifier.php
spoiler
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();

/**
 * @var array $arParams
 * @var array $arResult
 */

$arDefaultParams = array(
    'USE_ADAPTABILITY' => 'N',
    'USE_ITEMS_PICTURES' => 'Y',
    'USE_BUTTON_BASKET' => 'N',
    'URL_BASKET' => '',
    'VERIFY_CONSENT_TO_PROCESSING_PERSONAL_DATA' => 'N',
    'URL_RULES_OF_PERSONAL_DATA_PROCESSING' => ''
);

$arParams = array_merge($arDefaultParams, $arParams);

$arParams['USE_BUTTON_BASKET'] = $arParams['USE_BUTTON_BASKET'] == 'Y' && !empty($arParams['URL_BASKET']) ? 'Y' : 'N';
$arParams['VERIFY_CONSENT_TO_PROCESSING_PERSONAL_DATA'] = $arParams['VERIFY_CONSENT_TO_PROCESSING_PERSONAL_DATA'] == 'Y' && !empty($arParams['URL_RULES_OF_PERSONAL_DATA_PROCESSING']) ? 'Y' : 'N';

if ($arParams['USE_ITEMS_PICTURES'] == 'Y') {
    foreach ($arResult['ITEMS'] as &$arItem) {
        $arItem['PICTURE'] = CStartShopToolsIBlock::GetItemPicture($arItem, 200, 200, true);

        if (empty($arItem['PICTURE']))
            $arItem['PICTURE']['SRC'] = $this->GetFolder() . '/images/image.empty.png';
    }
}


$temp_sum = 0;

foreach($arResult['ITEMS'] as $k=>$elem){

	if($elem['STARTSHOP']['BASKET']['QUANTITY']>=100){
		$arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['VALUE'] = $elem['STARTSHOP']['BASKET']['PRICE']['VALUE'] - ($elem['PROPERTIES']['STARTSHOP_PROCENT_2']['VALUE']/100) * $elem['STARTSHOP']['BASKET']['PRICE']['VALUE'];
	}
	
	if($elem['STARTSHOP']['BASKET']['QUANTITY']>=1000){
		$arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['VALUE'] = $elem['STARTSHOP']['BASKET']['PRICE']['VALUE'] - ($elem['PROPERTIES']['STARTSHOP_PROCENT_3']['VALUE']/100) * $elem['STARTSHOP']['BASKET']['PRICE']['VALUE'];
	}
	
	$arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['PRINT_VALUE'] =  number_format($arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['VALUE'],0,'.',' ').' руб.';

	$arResult['ITEMS'][$k]['STARTSHOP']['PRICES']['MINIMAL']['VALUE'] = $arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['VALUE'];
	$arResult['ITEMS'][$k]['STARTSHOP']['PRICES']['MINIMAL']['PRINT_VALUE'] = $arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['PRINT_VALUE'];

	$temp_sum += $arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['PRICE']['VALUE'] * $arResult['ITEMS'][$k]['STARTSHOP']['BASKET']['QUANTITY'];
	
}

$arResult['SUM']['VALUE'] = $temp_sum;
$arResult['SUM']['PRINT_VALUE'] = number_format($temp_sum,0,'.',' ').' руб.';


И еще есть такой файл
/personal/basket/index.php

spoiler
<?php

use Bitrix\Main\ModuleManager;

$APPLICATION->SetTitle("Корзина")

?>
<?php if (ModuleManager::isModuleInstalled('sale')) { ?>
    <?$APPLICATION->IncludeComponent(
	"bitrix:sale.basket.basket",
	"basket",
	Array(
		"ACTION_VARIABLE" => "basketAction",
		"AUTO_CALCULATION" => "Y",
		"COLUMNS_LIST_EXT" => array(0=>"DISCOUNT",1=>"DELETE",2=>"DELAY",4=>"SUM"),
		"COMPONENT_TEMPLATE" => "basket",
		"COMPOSITE_FRAME_MODE" => "A",
		"COMPOSITE_FRAME_TYPE" => "AUTO",
		"CONSENT_URL" => "/company/consent/",
		"CORRECT_RATIO" => "N",
		"FAST_ORDER_DELIVERY_TYPE" => "2",
		"FAST_ORDER_PAYER_TYPE" => "1",
		"FAST_ORDER_PAYMET_TYPE" => "1",
		"FAST_ORDER_PRICE_TYPE" => "1",
		"FAST_ORDER_PROPERTY_PHONE" => "3",
		"FAST_ORDER_SEND_BUTTON" => "Заказать",
		"FAST_ORDER_SHOW_COMMENT" => "Y",
		"FAST_ORDER_SHOW_PROPERTIES" => array(),
		"FAST_ORDER_TEMPLATE" => ".default",
		"FAST_ORDER_TITLE" => "Быстрый заказ",
		"GIFTS_BLOCK_TITLE" => "Выберите один из подарков",
		"GIFTS_CONVERT_CURRENCY" => "N",
		"GIFTS_HIDE_BLOCK_TITLE" => "N",
		"GIFTS_HIDE_NOT_AVAILABLE" => "N",
		"GIFTS_MESS_BTN_BUY" => "Выбрать",
		"GIFTS_MESS_BTN_DETAIL" => "Подробнее",
		"GIFTS_PAGE_ELEMENT_COUNT" => "4",
		"GIFTS_PLACE" => "BOTTOM",
		"GIFTS_PRODUCT_PROPS_VARIABLE" => "prop",
		"GIFTS_PRODUCT_QUANTITY_VARIABLE" => "quantity",
		"GIFTS_SHOW_DISCOUNT_PERCENT" => "Y",
		"GIFTS_SHOW_IMAGE" => "Y",
		"GIFTS_SHOW_NAME" => "Y",
		"GIFTS_SHOW_OLD_PRICE" => "Y",
		"GIFTS_TEXT_LABEL_GIFT" => "Подарок",
		"HIDE_COUPON" => "N",
		"OFFERS_PROPS" => array(),
		"PATH_TO_ORDER" => "/personal/basket/order.php",
		"PRICE_VAT_SHOW_VALUE" => "Y",
		"QUANTITY_FLOAT" => "N",
		"SET_TITLE" => "Y",
		"USE_FAST_ORDER" => "Y",
		"USE_GIFTS" => "Y",
		"USE_PREPAYMENT" => "N"
	)
);?>
<?php } else { ?>

    <?$APPLICATION->IncludeComponent(
	"intec:startshop.basket",
	".default",
	Array(
		"AJAX_MODE" => "N",
		"COMPONENT_TEMPLATE" => ".default",
		"COMPOSITE_FRAME_MODE" => "A",
		"COMPOSITE_FRAME_TYPE" => "AUTO",
		"CURRENCY" => "RUB",
		"FAST_ORDER_USE" => "N",
		"REQUEST_VARIABLE_ACTION" => "action",
		"REQUEST_VARIABLE_ITEM" => "item",
		"REQUEST_VARIABLE_PAGE" => "page",
		"REQUEST_VARIABLE_PAYMENT" => "payment",
		"REQUEST_VARIABLE_QUANTITY" => "quantity",
		"REQUEST_VARIABLE_VALUE_FAIL" => "fail",
		"REQUEST_VARIABLE_VALUE_RESULT" => "result",
		"REQUEST_VARIABLE_VALUE_SUCCESS" => "success",
		"TITLE_BASKET" => "",
		"TITLE_ORDER" => "Оформление заказа",
		"TITLE_PAYMENT" => "Оплата",
		"URL_BASKET_EMPTY" => "",
		"URL_CATALOG" => "/catalog/",
		"URL_ORDER_CREATED" => "!!! HERE !!!",
		"URL_ORDER_CREATED_TO_USER" => "/personal/profile/",
		"URL_RULES_OF_PERSONAL_DATA_PROCESSING" => "/company/consent/",
		"USE_ADAPTABILITY" => "Y",
		"USE_BUTTON_BASKET" => "Y",
		"USE_BUTTON_CLEAR" => "Y",
		"USE_BUTTON_CONTINUE_SHOPPING" => "Y",
		"USE_BUTTON_FAST_ORDER" => "N",
		"USE_FAST_ORDER" => "N",
		"USE_ITEMS_PICTURES" => "Y",
		"USE_SUM_FIELD" => "Y",
		"VERIFY_CONSENT_TO_PROCESSING_PERSONAL_DATA" => "Y"
	)
);?>
<?php } ?>


Вопрос:
Как получить значение из
$arResult['SUM']['VALUE'];
Во-втором файле
"URL_ORDER_CREATED" => "!!! HERE !!!",

Я в пхп echo = ичо
  • Вопрос задан
  • 31 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы