1b.app
Link copied -

suborder variable in document

There is a Delivery process to generate a shipping list. I assign it as the parent process for the processes that need to be delivered. Action Assign a parent process or Create a process and make it the parent of the found processes.
https://more-moto.crm-onebox.com/admin/customorder/dostavka/4947/edit/
Subprocesses are displayed.
The Shipping List document has been created. In the document table, you need to display data to be sent by subprocesses.
I tried almost all the options, it does not display anything, empty rows in the table.
For example: {row:suborder_orderid} {row:suborder1_orderid} {row:suborder_clientname} {row:suborder_customOrder_transportnayakompaniya24}
It seems that this variable was added at the beginning of the year, maybe the system has not been updated because it does not see it?
Original question is available on version: ru

Answers:

Provide a link to the template in which you insert the variables - I will check its correctness
11.08.2021, 13:20
Original comment available on version: ru


Thanks to your tip, I created a document template from scratch and it worked! Before that, I copied the code from another template.
Please reply on suborder
1. Can this variable be passed only values related to the order, to the order itself? Those. in order to transfer additional fields from the contact card of the customer of the order, you must first copy them into an additional process field?
2. Using suborder, you cannot transfer the list of goods of subprocesses. But it is necessary.
The idea comes to the subprocess in an additional text field to write down all the goods and pass it as a test field. It's not clear how to write all the products of the process in one text field.
Are there options?
All this to make a shipping list for orders.
12.08.2021, 00:47
Original comment available on version: ru


Mokhov Alexey Yurievich wrote:
1. Can this variable be passed only values related to the order, to the order itself? Those. in order to transfer additional fields from the contact card of the customer of the order, you must first copy them into an additional process field?

you can specify the variable as {row:suborder_customUser_XX} - where XX is the optional field of the child's client
that is, all the same variables as for the current process, but with the prefix that this is an enumeration of child processes

Mokhov Alexey Yurievich wrote:
2. Using suborder, you cannot transfer the list of goods of subprocesses. But it is necessary.
The idea comes to the subprocess in an additional text field to write down all the goods and pass it as a test field. It's not clear how to write all the products of the process in one text field.
Are there options?
All this to make a shipping list for orders.

As far as I can see, you can't.
It's easier to rewrite the document template to the "old" style - using smarty variables.
For example, I will provide a short example by which you can try to figure it out:
<table>
<head>
<tr>
<td>Order</td>
<td>Products</td>
</tr>
</thing>
<body>
{|foreach from=$subOrderArray item="suborder"|}
<tr>
<td>{|$suborder.name|}</td>
<td>
<table>
{|foreach from=$suborder.productArray item="product"|}
<tr>
<td>{|$product.name|} - {|$product.count|} - {|$product.price|}</td>
</tr>
{|/foreach|}
</table>
</td>
</tr>
{|/foreach|}
</tbody>
</table>
12.08.2021, 14:27
Original comment available on version: ru

Huge gratitude! I did not expect that you write in such detail, everything turned out to be done!
13.08.2021, 02:38
Original comment available on version: ru

Tell me please. The question was completed, but it turned out that the template works correctly only if there is only one subprocess and the first variable in the table is read as {row: suborder_name} Then the array is read, but several times, as a row row and as an array.
Those. in this example, the array cannot be read, although in theory everything is correct. How to read an array correctly?
Document Template: https://more-moto.crm-onebox.com/admin/shop/document/templates/37/control/
The process for creating a shipping list: https://more-moto.crm-onebox.com/admin/customorder/dostavka/5331/edit/ There is an Update shipping list button in it.
23.08.2021, 12:29
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment