Good afternoon Problem found:
[file]21743[/file]
[file]21744[/file]
If there are quotes in the product name, then the name of this product is displayed only before the quotes, and subsequent products are not displayed.
[file]21743[/file]
[file]21744[/file]
{|foreach from="$basketsArray" item="e"|}
[file]21743[/file]
[file]21744[/file]
{|$e.name|}
[file]21743[/file]
[file]21744[/file]
Price: {|$e.price|number_format:2:".":""|} UAH
[file]21743[/file]
[file]21744[/file]
Quantity: {|$e.count|number_format:0:".":""|} pcs
[file]21743[/file]
[file]21744[/file]
Sum: {|$e.sum|number_format:2:".":""|} UAH
[file]21743[/file]
[file]21744[/file]
{|/foreach|}
[file]21743[/file]
[file]21744[/file]
[file]21743[/file]
[file]21744[/file]
[file]21743[/file]
[file]21744[/file]
Good afternoon Problem found:
If there are quotes in the product name, then the name of this product is displayed only before the quotes, and subsequent products are not displayed.
But now there is a problem with the address. If it's a postal service, then the name has "Novaya Poshta" in quotation marks. And when substituting a variable, it looks like this:
"Nova Poshta"
I used to put other quotes:
"Nova Poshta"
I tried using {|$clientaddress|escape|}, it looks like this:
"Nova Poshta"
The problem with the products was fixed in this ticket https://1b.app/ru/forum/integrations-with-messengers/18045-peremennie-v-shablonnih-kommentariyah-v-bloke-obshchiy-chat/#answer58826
[file]21745[/file]
But now there is a problem with the address. If it's a postal service, then the name has "Novaya Poshta" in quotation marks. And when substituting a variable, it looks like this:
[file]21745[/file]
"Nova Poshta"
[file]21745[/file]
I used to put other quotes:
[file]21745[/file]
"Nova Poshta"
[file]21745[/file]
I tried using {|$clientaddress|escape|}, it looks like this:
[file]21745[/file]
"Nova Poshta"
[file]21745[/file]
[file]21745[/file]
Derkach Dmytriy OneBox production wrote: You can also put in replace:"-":"": For example: {|$clientaddress|replace:"'":"<"|}
The apostrophe replaces it like this, but if you put quotation marks, then there is a 500 error. Is it possible to display quotation marks correctly by default, as in product names?
[quote]
Derkach Dmytriy
OneBox production wrote:
You can also put in replace:"-":"":
For example: {|$clientaddress|replace:"'":"<"|}
[/quote]
The apostrophe replaces it like this, but if you put quotation marks, then there is a 500 error. Is it possible to display quotation marks correctly by default, as in product names?
you wrote an example {|$clientaddress|replace:"'":"<"|} - here the apostrophe is changed to an angle bracket The problem we have is that the quotes in the address change to " In your example, I tried to put quotation marks instead of an apostrophe so that they would change to a parenthesis - I got an error 500 In any case, the address contains both quotation marks and an apostrophe; will it be possible to replace both with one variable? I would not like to change the apostrophe to any signs, it is part of the word. Can you simply make the correct display of quotation marks and apostrophes as in the product names?
you wrote an example {|$clientaddress|replace:"'":"<"|} - here the apostrophe is changed to an angle bracket
The problem we have is that the quotes in the address change to "
In your example, I tried to put quotation marks instead of an apostrophe so that they would change to a parenthesis - I got an error 500
In any case, the address contains both quotation marks and an apostrophe; will it be possible to replace both with one variable? I would not like to change the apostrophe to any signs, it is part of the word.
Can you simply make the correct display of quotation marks and apostrophes as in the product names?
Rodion wrote: The problem we have is that the quotes in the address change to "
here on the forum this sign (quot) is replaced with quotation marks
[quote]
Rodion wrote:
The problem we have is that the quotes in the address change to "
[/quote]
here on the forum this sign (quot) is replaced with quotation marks
Rodion wrote: In any case, the address contains both quotation marks and an apostrophe; will it be possible to replace both with one variable?
Replace can be used 2 times {|$clientaddress|replace:" ' ":"<"|replace:" " ":">"|}
[quote]
Rodion wrote:
In any case, the address contains both quotation marks and an apostrophe; will it be possible to replace both with one variable?
[/quote]
Replace can be used 2 times
{|$clientaddress|replace:" ' ":"<"|replace:" " ":">"|}
Derkach Dmytriy OneBox production wrote: Try in replace to wrap what you replace in single quotes
did not help Can you please correct it (return it as it was) without replacing it with other symbols, because sending messages to the client with some other symbols, especially instead of an apostrophe in a word, is not very good at all
[quote]
Derkach Dmytriy
OneBox production wrote:
Try in replace to wrap what you replace in single quotes
[/quote]
did not help
Can you please correct it (return it as it was) without replacing it with other symbols, because sending messages to the client with some other symbols, especially instead of an apostrophe in a word, is not very good at all
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
Donate
You don't have enough funds in your account Top up