+1 vote
by
When you place an order, the order properties are automatically filled in from the buyer's profile of a certain type. Buyer's profile can be selected from the drop-down menu on the page. But the list of available profiles depends on the type of payer specified in this form. Is it possible to somehow get all the profiles available to the user in bitrix:sale.order.ajax component without selecting payer type in the checkout form?

1 Answer

0 votes
by
Through the customization of the component output, of course, but what's the point if the profile is a combination of filled fields, and the fields for different profiles are different.
I.e. the value of field X for profile 1 may exist, and in profile 2 the field X may not exist at all.

The easiest way to do this is on the events in the component: https://dev.1c-bitrix.ru/api_d7/bitrix/sale/events...
by
Andrey Nikolaev , select means to return, get, activate, activate all payer types, not just one specific one. By checkbox type, not radio as the default. Is it possible at all? So that all buyer profiles of all payer types would be available on the page without having to switch by input. Just select a profile name from the drop down list and that's it, and the "Payer Type" box just needs to be hidden from the page. Thanks
by
to choose means to return, to receive,


Use the OnSaleComponentOrderResultPrepared event to supplement the result received from https://dev.1c-bitrix.ru/api_help/sale/classes/csa...
by
Surzhenko what do you mean by "select"? The user places the order, one specific payer is responsible for the order with specific fields.
by
Andrey Nikolaev , using the OnSaleComponentOrderOneStepPersonType event I try to add the "CHECKED" => "Y" parameter to the properties of another payer type in the "PERSON_TYPE" array. But as a result, only one payer type (the last one) is still selected on the checkout page. And the list of available profiles is bound to this type. Is it possible to choose all the active payer types in the system at once?
by
Surzhenko You can output it, but the conditional field NAME for a physical and legal person will have different identifiers and you can't use them normally (unless you come up with a bunch of crutches).

You can add more items to the ordering events (it is in the documentation, but easier to find through google)
by
Thank you for your answer! In the system the number of fields for different types of profiles is the same. That's why they are automatically loaded into the form fields on the page when placing an order. The list of profiles is available from the dropdown menu, which is formed depending on the type of payer. Can you elaborate on how to bypass filtering by type and display all profiles available to user with these events in general list?
...