Как записать название города в свойства заказа?

Есть оформление заказа.
Получаю данные из формы

$name = $arrVALUES['NAME'];
$phone = $arrVALUES['PHONE'];
$email = $arrVALUES['EMAIL'];
$location = $arrVALUES['LOCATION'];


Записываю

$order->setField('COMMENTS', 'ГОРОД ЗАКАЗА:  - ' $location);

Тут записывает
А когда делаешь $order->setField('LOCATION', $location);
дает ошибку города

[Bitrix\Main\ArgumentOutOfRangeException] The value of an argument 'name=LOCATION' is outside the allowable range of values (100)
/data/vhosts/artw/lapsi.ru/www/bitrix/modules/sale/lib/internals/entity.php:196
#0: Bitrix\Sale\Internals\Entity->setField(string, string) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/sale/lib/orderbase.php:488
#1: Bitrix\Sale\OrderBase->setField(string, string) /data/vhosts/artw/lapsi.ru/www/local/php_interface/init.php:739
#2: FormSendController::preorderSaver(string, array, array) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/classes/general/module.php:475
#3: ExecuteModuleEventEx(array, array) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/form/classes/general/form_callformresult.php:427
#4: CAllFormResult::Add(string, array) /data/vhosts/artw/lapsi.ru/www/bitrix/components/bitrix/form.result.new/component.php:202
#5: include(string) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/classes/general/component.php:594
#6: CBitrixComponent->__includeComponent() /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/classes/general/component.php:653
#7: CBitrixComponent->includeComponent(string, array, boolean) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/classes/general/main.php:1038
#8: CAllMain->IncludeComponent(string, string, array, boolean) /data/vhosts/artw/lapsi.ru/www/local/templates/lapsi/footer.php:132
#9: include_once(string) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/include/epilog_before.php:93
#10: require(string) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/include/epilog.php:2
#11: require_once(string) /data/vhosts/artw/lapsi.ru/www/bitrix/footer.php:4
#12: require(string) /data/vhosts/artw/lapsi.ru/www/local/templates/catalog.php:519
#13: include(string) /data/vhosts/artw/lapsi.ru/www/catalog/index.php:2
#14: include_once(string) /data/vhosts/artw/lapsi.ru/www/bitrix/modules/main/include/urlrewrite.php:159
#15: include_once(string) /data/vhosts/artw/lapsi.ru/www/bitrix/urlrewrite.php:


в данном примере $location = Новосибирск или Москва или что то похожее.

Возможно нужно передать какой то код или что то типа того?
  • Вопрос задан
  • 104 просмотра
Пригласить эксперта
Ответы на вопрос 1
rpsv
@rpsv
делай либо хорошо, либо никак
Поля location нет, есть поля DELIVERY_LOCATION и TAX_LOCATION.
Ответ написан
Ваш ответ на вопрос

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

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