1b.app
Link copied -

Variables in the additional product field

Answers:



Ustimenko Igor
OneBox production
OneBox CTO wrote:
revision 5h

Thank you! I will think
23.08.2022, 09:23
Original comment available on version: ru


Good afternoon.
Please specify the desired result of the refinement work - do you want the variables to be replaced when saving, or that the field value is stored with the variables and when the value of the additional field is unloaded, the variables are replaced somewhere?
11.10.2022, 14:47
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
Good afternoon.
Please specify the desired result of the refinement work - do you want the variables to be replaced when saving, or that the field value is stored with the variables and when the value of the additional field is unloaded, the variables are replaced somewhere?

Good afternoon!
I hope I understood your question correctly.
I need to transfer the values of these variables to other platforms. It is not necessary that they be stored (or stored) in the card.
The only if a few comments about this:
1) If these values will be immediately assigned at the time of unloading, it is very important to adjust the scale of the images;
2) For these variables to work in different actions and formats related to export when unloading;
3) Of course, I would like to reduce the load on the system, but in which version they will be less - I do not know;
11.10.2022, 15:14
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
I need to transfer the values of these variables to other sites. It is not necessary that they be stored (or stored) in the card.

If they are replaced when saving, then when changing the additional field that participated in the initial save, the html field will have its old value.

Yurchenko Roman Sergeevich wrote:
1) If these values will be immediately assigned at the time of unloading, it is very important to adjust the scale of the images;

In the description of the topic, the replacement of variable additional fields sounds - images and filters are not.
12.10.2022, 10:34
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
If they are replaced when saving, then when changing the additional field that participated in the initial save, the html field will have its old value.

Good. Let's do it. If you need to change the value - just resave the product

Tyndyk Maxim Vadimovich
OneBox production wrote:
In the description of the topic, the replacement of variable additional fields sounds - images and filters are not.

I don't understand what you mean by that, could you clarify?
12.10.2022, 12:13
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
Good. Let's do it. If you need to change the value - just resave the product

Then you will need not only to re-save the product, but to re-enter the value with the variables so that the replacement of variables will work again.
Maybe it's better to store it as filled - and call the replacement of variables only in the right places (for example, in specific export automations?)

Yurchenko Roman Sergeevich wrote:
I don't understand what you mean by that, could you clarify?

What is in the description of the topic and the replacement of variable values of additional fields was appreciated.
And in the comment above, you mention image scaling - you mean working with variables of the main fields, although the assessment is regarding the replacement of additional fields?
12.10.2022, 12:31
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
Then you will need not only to re-save the product, but to re-enter the value with the variables so that the replacement of variables will work again.

But when we change the value in the filter in the product or replace the category, when saving this product, the variables should be replaced automatically, right? And so every time we make changes?

Tyndyk Maxim Vadimovich
OneBox production wrote:
Maybe it's better to store it as filled - and call the replacement of variables only in the right places (for example, in specific export automations?)

Well, in such cases, it is better to see just a variable in the html field, and not a value, so that it does not turn out that this field has the value "red", but we pass "blue".

Tyndyk Maxim Vadimovich
OneBox production wrote:
What is in the description of the topic and the replacement of variable values of additional fields was appreciated.
And in the comment above, you mention image scaling - you mean working with variables of the main fields, although the assessment is regarding the replacement of additional fields?

I didn’t write correctly about the scale, I agree, but I specially indicated the rest of the data in the picture
12.10.2022, 16:45
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
Well, in such cases, it is better to see just a variable in the html field, and not a value, so that it does not turn out that this field has the value "red", but we pass "blue".

Well then, let's agree on exactly where you need to do the change of variables?
For doing this everywhere will not work, because it can overwrite the original variables in the field. Are you interested in a replacement in specific export actions?

Yurchenko Roman Sergeevich wrote:
I didn’t write correctly about the scale, I agree, but I specially indicated the rest of the data in the picture

At the same time, the description indicated specifically - the replacement of variable additional fields.
The screenshot shows just the text of the variables in most cases, which can be interpreted as the names of additional fields, and whatever you like.
Actually, we get a situation where you described one thing, showed another on the screenshot - you misled the appraiser. The assessment was given regarding the replacement of additional fields.
12.10.2022, 17:06
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
At the same time, the description indicated specifically - the replacement of variable additional fields.
The screenshot shows just the text of the variables in most cases, which can be interpreted as the names of additional fields, and whatever you like.
Actually, we get a situation where you described one thing, showed another on the screenshot - you misled the appraiser. The assessment was given regarding the replacement of additional fields.

I do not see any actions on my part due to which I could mislead the appraiser.
That's what I wrote "Variables in the additional field of the product", that is, I needed to insert the variables of other fields. I indicated the entire list of fields in the image.
Plus, as far as I can see on other topics, if an appraiser has controversial questions about a task, he always asks them, and this is normal practice, for example, how do you do it now.
Then I would like to ask Igor U. to join this issue in order to judge us correctly, since he evaluated this task.
12.10.2022, 18:31
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
I do not see any actions on my part due to which I could mislead the appraiser.
That's what I wrote "Variables in the additional field of the product", that is, I needed to insert the variables of other fields. I indicated the entire list of fields in the image.
Plus, as far as I can see on other topics, if an appraiser has controversial questions about a task, he always asks them, and this is normal practice, for example, how do you do it now.
Then I would like to ask Igor U. to join this issue in order to judge us correctly, since he evaluated this task.

We can use product variable substitution for you here as for the document - there are both arrays of images/filters and base fields/additional fields.
Customize the HTML template of the additional product field as you like based on this data.
But I did not receive an answer from you to the question:

Tyndyk Maxim Vadimovich OneBox production wrote:
Well then, let's agree on exactly where you need to do the change of variables?
For doing this everywhere will not work, because it can overwrite the original variables in the field. Are you interested in a replacement in specific export actions?
13.10.2022, 10:41
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
We can use product variable substitution for you here as for the document - there are both arrays of images/filters and base fields/additional fields.
Customize the HTML template of the additional product field as you like based on this data.

Do I understand you correctly that something like the "Variables" button will appear in the html field (as in the picture), or do you put all the functionality of the "Document Template" in this field? If yes, then great!

Tyndyk Maxim Vadimovich
OneBox production wrote:
Well then, let's agree on exactly where you need to do the change of variables?
For doing this everywhere will not work, because it can overwrite the original variables in the field. Are you interested in a replacement in specific export actions?

About this question! Correctly, I understand you that if I insert a variable into the html field (for example, the variable [group]) and save the product, this variable will be replaced by the name of the group in which the product consists (For example, the name of the group is "women's bracelet"). And if I move the product to another group again (for example, "male bracelet"), then I need to insert the variable [group] instead of "female bracelet" in the html field, but at the same time, the floor variable will immediately be replaced by the name of the group when saving. Did I understand you right?
If so, then it's a TROUBLE :(
Tell me, how can you get away from it then? I just see another problem if you do the replacement as in all export actions and / or do the reverse in some specific export actions, and here's why:
- If you do it in all, it will be costly, and you don’t want to do it for already paid hours, plus if some changes are made somewhere, you will also have to carry them out almost everywhere or just take them into account.
- If you do it only in one, then there may be such a problem: today I use yml, and tomorrow some other format may be needed. In such cases, you need to constantly finish the export actions.
13.10.2022, 17:31
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
Do I understand you correctly that something like the "Variables" button will appear in the html field (as in the picture), or do you put all the functionality of the "Document Template" in this field? If yes, then great!

No, no button will appear.
You will have a list of smarty variables available for use with respect to the product in an additional field with an HTML type.

Yurchenko Roman Sergeevich wrote:
About this question! Correctly, I understand you that if I insert a variable into the html field (for example, the variable [group]) and save the product, this variable will be replaced by the name of the group in which the product consists (For example, the name of the group is "women's bracelet"). And if I move the product to another group again (for example, "male bracelet"), then I need to insert the variable [group] instead of "female bracelet" in the html field, but at the same time, the floor variable will immediately be replaced by the name of the group when saving. Did I understand you right?
If so, then it's a TROUBLE :(

No. We discussed above that a variable will be stored, for example {|$customProduct_grupa|} (he specified an arbitrary example of a variable).
But the replacement will occur only when this field is exported by the product with the actions you need (you must specify which actions you are primarily interested in - perhaps universal exports of products to XML|JSON|XLS, etc.)

Yurchenko Roman Sergeevich wrote:
Tell me, how can you get away from it then? I just see another problem if you do the replacement as in all export actions and / or do the reverse in some specific export actions, and here's why:
- If you do it in all, it will be costly, and you don’t want to do it for already paid hours, plus if some changes are made somewhere, you will also have to carry them out almost everywhere or just take them into account.
- If you do it only in one, then there may be such a problem: today I use yml, and tomorrow some other format may be needed. In such cases, you need to constantly finish the export actions.

I don't think there are a lot of product export activities.
Let's put it this way - evaluation allows you to do this in the most popular to use (and necessary for you) product export actions.
If it turns out over time that we missed some of the actions, we will discuss individually.
14.10.2022, 09:32
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
Let's put it this way - evaluation allows you to do this in the most popular to use (and necessary for you) product export actions.

for example, we can take the list of actions you use:
Export products in YML format
XML Product Integration (Export)
PromUA / Export products in XLS format
CSV Product Integration (Export)
Export products in XML format (Rozetka.ua)
14.10.2022, 09:38
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
No, no button will appear.
You will have a list of smarty variables available for use with respect to the product in an additional field with an HTML type.

OK

Tyndyk Maxim Vadimovich
OneBox production wrote:
No. We discussed above that a variable will be stored, for example {|$customProduct_grupa|} (he specified an arbitrary example of a variable).
But the replacement will occur only when this field is exported by the product with the actions you need (you must specify which actions you are primarily interested in - perhaps universal exports of products to XML|JSON|XLS, etc.)

OK

Tyndyk Maxim Vadimovich
OneBox production wrote:
I don't think there are a lot of product export activities.
Let's put it this way - evaluation allows you to do this in the most popular to use (and necessary for you) product export actions.
If it turns out over time that we missed some of the actions, we will discuss individually.

OK! Thought it would be longer and more expensive.

Tyndyk Maxim Vadimovich
OneBox production wrote:
for example, we can take the list of actions you use:
Export products in YML format
XML Product Integration (Export)
PromUA / Export products in XLS format
CSV Product Integration (Export)
Export products in XML format (Rozetka.ua)

This list is fine. If possible, I would add one more "Export products to Magento".
14.10.2022, 10:21
Original comment available on version: ru

Implemented for the above actions.
Available list of variables for the product can be seen here https://our-store.com.ua/admin/directory/variable/?type=ShopProduct
Please check if everything fits.
14.10.2022, 17:42
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
Available list of variables for the product can be seen here https://our-store.com.ua/admin/directory/variable/?type=ShopProduct
.
Maxim, I have a few questions about variables:
1) How can I find this guide in Box itself?
2) I noticed that in the list of variables there is no variable for the main image, but only for "Address of the first product image" {|$image|}.

Tyndyk Maxim Vadimovich
OneBox production wrote:
Please check if everything fits.

I did a check but something didn't work. Boxing passed just variables, but no data on them. In the picture below, I have shown what variables I have inserted and how they are transferred to another market.
Here is the product on which I tested https://our-store.com.ua/app/product/26366/edit/?tabid=0
Here is the action that I used "Export products in YML format" (I also added a picture on it to understand which one).
Can you see if I did something wrong?
15.10.2022, 11:12
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
1) How can I find this guide in Box itself?

it is displayed only in the right places, in some applications

Yurchenko Roman Sergeevich wrote:
2) I noticed that in the list of variables there is no variable for the main image, but only for "Address of the first product image" {|$image|}.

first image = main
an img tag is inserted there with a link to a 200x200 crop image

Yurchenko Roman Sergeevich wrote:
I did a check but something didn't work. Boxing passed just variables, but no data on them. In the picture below, I have shown what variables I have inserted and how they are transferred to another market.
Here is the product on which I tested https://our-store.com.ua/app/product/26366/edit/?tabid=0
Here is the action that I used "Export products in YML format" (I also added a picture on it to understand which one).
Can you see if I did something wrong?

there is an error in using variables of type row:
they should be used in the same way as in process documents - in the form of {row:targets_XXX} inside the table, to be added in rows
removed for now to work for example on filters
18.10.2022, 13:24
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
it is displayed only in the right places, in some applications

Can you please tell me where exactly they are? I can’t find it, and it’s not convenient to constantly go to the forum to go through them.

Tyndyk Maxim Vadimovich
OneBox production wrote:
first image = main
an img tag is inserted there with a link to a 200x200 crop image

I searched for the tag for the word "basic" but did not find anything (see picture). Can you clarify exactly what it's called?

Tyndyk Maxim Vadimovich
OneBox production wrote:
there is an error in using variables of type row:
they should be used in the same way as in process documents - in the form of {row:targets_XXX} inside the table, to be added in rows
removed for now to work for example on filters

Figured it out a little. When I added ... some of the tags started to be transferred, but some were not transferred (look at the picture). Can you suggest what is the reason?
Another question: if the tag is sewn into a link, only the value is transmitted in the feed, without the link (see picture). Tell me how to change this?
18.10.2022, 17:23
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
Can you please tell me where exactly they are? I can’t find it, and it’s not convenient to constantly go to the forum to go through them.

For example, in the "Mail" application, there is an item "Variables for letters and processes" in the settings
In the same place, near the search, I added a switch between the types of variables - there are document variables for products

Yurchenko Roman Sergeevich wrote:
I searched for the tag for the word "basic" but did not find anything (see picture). Can you clarify exactly what it's called?

you also have a variable {|$image|} - why doesn't it suit you?

Yurchenko Roman Sergeevich wrote:
Figured it out a little. When I added ... some of the tags started to be transferred, but some were not transferred (look at the picture). Can you suggest what is the reason?

I pointed out above - you are not using the variables {row:....} correctly

Yurchenko Roman Sergeevich wrote:
Another question: if the tag is sewn into a link, only the value is transmitted in the feed, without the link (see picture). Tell me how to change this?

We only perform substitution by variable.
Look in the source code to see if the HTML structure of your variable is wrapped in a link correctly.
19.10.2022, 14:05
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
For example, in the "Mail" application, there is an item "Variables for letters and processes" in the settings
In the same place, near the search, I added a switch between the types of variables - there are document variables for products

Now I understand. Thank you! I did not know that there is a switch between variable types.
For other questions, I can’t check anything, the feeds don’t work. I suspect that this task on the forum that I left is probably related to this task, although at first I thought that the cron was just stuck - https://1b.app/en/forum/business-processes-and-automation/15608-ne- obnovlyayutsya-fidi---eksportirovat-produkti-v-formate-yml/.
20.10.2022, 13:32
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production wrote:
you also have a variable {|$image|} - why doesn't it suit you?

This is just a link, and it is displayed as a link in the text, but I need the image to be inserted as a picture (look at the picture). The situation is the same for additional images.

Tyndyk Maxim Vadimovich
OneBox production wrote:
I pointed out above - you are not using the variables {row:....} correctly

I don't use it correctly because I don't know how to use it. You can write an example for my product in terms of tags how to do it? In the picture I showed what I have written.
Another point: now a feed with such tags does not generate a feed.

Tyndyk Maxim Vadimovich
OneBox production wrote:
We only perform substitution by variable.
Look in the source code to see if the HTML structure of your variable is wrapped in a link correctly.

I have attached a picture with the code. Wrapped up right?
25.10.2022, 11:23
Original comment available on version: ru


Yurchenko Roman Sergeevich wrote:
Now I understand. Thank you! I did not know that there is a switch between variable types.

because i edited it

Yurchenko Roman Sergeevich wrote:
For other questions, I can’t check anything, the feeds don’t work. I suspect that this task on the forum that I left is probably related to this task, although at first I thought that the cron was just stuck - https://1b.app/en/forum/business-processes-and-automation/15608-ne- updateyutsy...

I already answered you more than once - you didn’t insert the variables correctly, so it didn’t work

Yurchenko Roman Sergeevich wrote:
This is just a link, and it is displayed as a link in the text, but I need the image to be inserted as a picture (look at the picture). The situation is the same for additional images.

as far as I can see, the image variable is inserted by the <img tag, which seems to be correct
there is no other way to insert an image into the content in a normal way

Yurchenko Roman Sergeevich wrote:
I don't use it correctly because I don't know how to use it. You can write an example for my product in terms of tags how to do it? In the picture I showed what I have written.
Another point: now a feed with such tags does not generate a feed.

in the same way as in the documents - in the table
without a table these variables are not used correctly
and also specify what specific problematic action you are talking about - I will indicate what he does not like for the formation

Yurchenko Roman Sergeevich wrote:
I have attached a picture with the code. Wrapped up right?

I don't like that you make a span inside the link with styling - why are you styling the link directly?
15.11.2022, 13:03
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