1b.app
Link copied -

the product is not added from the letter

Action "Turn email into a process"
Why is the product not added from the email?
Here are the settings
For the test, I created additional product fields and registered the same template there
We see that the template is spelled out correctly, the information is being drawn
Here is the letter https://japanautoparts.1b.app/admin/shop/event/view/file/22561/?eventid=16735
Here is the generated process https://japanautoparts.1b.app/181/
The product did not fit into it.
Here is the product https://japanautoparts.1b.app/app/product/561/edit/
Names and article are the same, it is in stock
Why can't the product be added?
Original question is available on version: ru

Answers:

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Here in the test you have received values in the additional field of the product
These are not products, products will be displayed below
Product variables must be specified like this: [#productname] - you need to add the ending after the variable, that is, in your case like this:
>[#productname]\<
Also, it is not clear why you have all the text in several lines, I just do not see the modifiers that are specified. First, try changing the variables
22.06.2022, 11:16
Original comment available on version: ru


Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:
Here in the test you have received values in the additional field of the product
These are not products, products will be displayed below

This is what I did to understand if I wrote the template correctly.

Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:
Product variables must be specified like this: [#productname] - you need to add the ending after the variable, that is, in your case like this:
>[#productname]\<
Also, it is not clear why you have all the text in several lines, I just do not see the modifiers that are specified. First, try changing the variables

Thank you. Made as in the screenshot.
But it still doesn't show up in test mode.
22.06.2022, 14:13
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
I need to see the text of the letter, can I give access?
I made a request here https://1b.app/ru/partner-access/
22.06.2022, 14:35
Original comment available on version: ru


Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:
I need to see the text of the letter, can I give access?
I made a request here https://1b.app/en/partner-access/

Opened access
22.06.2022, 14:42
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
written regular does not find anything
When you search for products, all text is processed as one array, and the regular expression must be sequential, not with a new line new parameter, here you need to edit the regular expression itself
22.06.2022, 15:27
Original comment available on version: ru


Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:
written regular does not find anything
When you search for products, all text is processed as one array, and the regular expression must be sequential, not with a new line new parameter, here you need to edit the regular expression itself

Thought about this too. Already posted a new one.
But for some reason it doesn't work.
Or do I need to write a regular expression for the entire letter?
p\sclass="text-left code".*?>[#product_articul]\s.*?\n\W*p\sclass="name".*?>[#product_name]<\/p>\n .*\n.*\n\W*p\sclass="quantity".*?>[#product_count]\s.*\n.*\n.*\n\W*.*\n\W* p\sclass="one_price".*?>[#product_price]\s.*?<\/p>
22.06.2022, 15:41
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Andrey wrote:
Thought about this too. Already posted a new one.
But for some reason it doesn't work.
Or do I need to write a regular expression for the entire letter?

In general, yes, you need one regular expression for the whole letter, but this is about one entity, that is, for goods you write a common regular expression, starting from the very first character in the text.
There are also different modifiers, they help to process the content, because there are a lot of nuances here.
Here is a service where you can test https://regex101.com, it can only find the first element, then it doesn’t work anymore because it picks up modifiers, I don’t know how to do it without them.
it was:
p\sclass="text-left code".*?>[#product_articul]\s.*?<\/p>\n\W*p\sclass="name".*?>[#product_name]<\ /p>\n.*<\/th><\/tr><\/tbody><\/table><\/th>\n.*<th\sclass="small-3\slarge-2\ scolumns".*?><table.*?><tbody><tr.*?><th.*?>\n\W*p\sclass="quantity".*?>[#product_count]\s. *?<\/p>\n.*?<\/th><\/tr><\/tbody><\/table><\/th>\n.*?<th.*?><table .*?><tbody><tr.*?><th.*?>\n\W*p\sclass="price".*?<\/p>\n\W*p\sclass="one_price ".*?>[#product_price]\s.*?<\/p>
So it became:
<tbody>.*?<p\sclass=\"text\-left\scode\".*?padding:\s0\; text\-align\:\sleft\;\">[#product_articul]\s.*?<\/p>.*?<p\sclass="name".*?padding:\s0\; text\- align\:\sleft\;\">[#product_name]<\/p>.*?<p class="quantity".*?padding:\s0\; text\-align\:\sright\;\">[#product_count]pcs*?<p class="price".*?padding:\s0\; text\-align\:\sright\;\"> [#product_price]USD
+ modifier
And this is for checking in the service
<tbody>.*?<p\sclass=\"text\-left\scode\".*?padding:\s0\; text\-align\:\sleft\;\">(.*?)\s.*?<\/p>.*?<p\sclass="name".*?padding:\s0\; text\ -align\:\sleft\;\">(.*?)<\/p>.*?<p class="quantity".*?padding:\s0\; text\-align\:\sright\;\">(.*?)piece*?<p class="price".*?padding:\s0\; text\-align\:\sright\;\" >(.*?)UAH
Finds
Just regular was wrong
22.06.2022, 18:11
Original comment available on version: ru


Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:

Andrey wrote:
Thought about this too. Already posted a new one.
But for some reason it doesn't work.
Or do I need to write a regular expression for the entire letter?

In general, yes, you need one regular expression for the whole letter, but this is about one entity, that is, for goods you write a common regular expression, starting from the very first character in the text.
There are also different modifiers, they help to process the content, because there are a lot of nuances here.
Here is a service where you can test https://regex101.com, it can only find the first element, then it doesn’t work anymore because it picks up modifiers, I don’t know how to do it without them.
it was:
p\sclass="text-left code".*?>[#product_articul]\s.*?<\/p>\n\W*p\sclass="name".*?>[#product_name]<\ /p>\n.*<\/th><\/tr><\/tbody><\/table><\/th>\n.*<th\sclass="small-3\slarge-2\ scolumns".*?><table.*?><tbody><tr.*?><th.*?>\n\W*p\sclass="quantity".*?>[#product_count]\s. *?<\/p>\n.*?<\/th><\/tr><\/tbody><\/table><\/th>\n.*?<th.*?><table .*?><tbody><tr.*?><th.*?>\n\W*p\sclass="price".*?<\/p>\n\W*p\sclass="one_price ".*?>[#product_price]\s.*?<\/p>
So it became:
<tbody>.*?<p\sclass=\"text\-left\scode\".*?padding:\s0\; text\-align\:\sleft\;\">[#product_articul]\s.*?<\/p>.*?<p\sclass="name".*?padding:\s0\; text\- align\:\sleft\;\">[#product_name]<\/p>.*?<p class="quantity".*?padding:\s0\; text\-align\:\sright\;\">[#product_count]pcs*?<p class="price".*?padding:\s0\; text\-align\:\sright\;\"> [#product_price]USD
+ modifier
And this is for checking in the service
<tbody>.*?<p\sclass=\"text\-left\scode\".*?padding:\s0\; text\-align\:\sleft\;\">(.*?)\s.*?<\/p>.*?<p\sclass="name".*?padding:\s0\; text\ -align\:\sleft\;\">(.*?)<\/p>.*?<p class="quantity".*?padding:\s0\; text\-align\:\sright\;\">(.*?)piece*?<p class="price".*?padding:\s0\; text\-align\:\sright\;\" >(.*?)UAH
Finds
Just regular was wrong

Thanks for the help))
I just don't understand why nc worked. Indeed, in my version on https://regex101.com everything was also found))
22.06.2022, 19:22
Original comment available on version: ru

Ярина
Personal license

Sukhanitsky Andrey
OneBox Corp.
OneBox Corp - Integrator wrote:
There are also different modifiers, they help to process the content, because there are a lot of nuances here.

where can you see the list of possible modifiers?
22.06.2022, 22:12
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Yarina
integrator wrote:
where can you see the list of possible modifiers?

on the Internet)
https://uk.wikipedia.org/wiki/Regular_viraz
22.06.2022, 23:25
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