WebSite X5Help Center

 
Виталий К.
Виталий К.
User

[PRICE] has 3 zero.  en

Author: Виталий К.
Visited 1109, Followers 1, Shared 0  

I've entered these 2 variables:

[ORDER_NO] - the order number ;

[PRICE] - the price .

But the price has format xxx.000

it is a payment code:
<h2>Страница оплаты</h2><hr>
<br>
<div>Сумма заказа: [PRICE]руб.</span></div><br>
<form action="https://money.yandex.ru/eshop.xml" method="post">
<input required name="shopId" value="......" type="hidden"/>
<input required name="scid" value="......" type="hidden"/>
<input required name="sum" value="[PRICE]" type="hidden">
Номер заказа :<br>
<input required name="customerNumber" value="[ORDER_NO]" size="16"/><br>
<br>
<input type="submit" value="Оплатить">
</form>

photo

How can I delete  that .000 ?

Thanks.

Posted on the
10 ANSWERS - 1 USEFUL - 1 CORRECT
Andre E
Andre E
Moderator

You can set the decimal places of the price in step4 -> shopping card -> TAB OPTIONS -> price format, select the button there and change the decimal places to zero.

Read more
Posted on the from Andre E
Serg Linds
Serg Linds
User

Наглядно.

Read more
Posted on the from Serg Linds
Виталий К.
Виталий К.
User
Author

I've done it but it doesn't work with [PRICE]. It works in shopping cart only.

Read more
Posted on the from Виталий К.
Виталий К.
Виталий К.
User
Author

Please note the format is 000 not 00

Read more
Posted on the from Виталий К.
Serg Linds
Serg Linds
User

OK. Вам десятичную часть совсем убрать или сократить до 2-х знаков?

Read more
Posted on the from Serg Linds
Виталий К.
Виталий К.
User
Author

Убрать десятичную.

Read more
Posted on the from Виталий К.
Serg Linds
Serg Linds
User
Виталий К.
Убрать десятичную.

Раз у вас с ценами всё так округло, тогда нам (вам) понадобиться внести изменения в файл x5cartengine.js.

Есть два пути, всё время править его на хостинге после каждого изменения в сайте или сразу для всех проектов в папке установленной программы (достаточно один раз обновить проект и выгрузить его).

Найдите в этом файле "#.@@@" и измените на "#", но учтите, если дробная часть присутствует в итоговой сумме, она будет округлена до целой.

ЗЫ Можете сразу отметить этот ответ как решение, а можно подождать невнятного оправдания от Инкомедии и поржать.

Read more
Posted on the from Serg Linds
Виталий К.
Виталий К.
User
Author

Спасибо попробую. Давайте еще подождем..))

Read more
Posted on the from Виталий К.
Incomedia
Claudio D.
Incomedia

Hello Виталий К.,

There's no need to edit the files generated by the program to change the price format.

You can use directly [PRICE, multiplicator, format]

Where in multiplicator you add the multiplication value which in your case will be one

and instead of Format you add #,###.@@ so it will have only 2 decimals.

With these options you can customize the value of [PRICE]

as example [PRICE, 1, #,###.@@]

Many thanks!

***** Google Translation:
Здравствуйте Виталий К.,

Там нет необходимости редактировать файлы, созданные программой, чтобы изменить формат цен.

Вы можете использовать непосредственно [PRICE, мультипликатор, формат]

Где в мультипликатора вы добавляете значения умножения, который в вашем случае будет один

и вместо формата добавить
#,###.@@ поэтому он будет иметь только 2 знаков после запятой.

С помощью этих опций вы можете настроить значение [PRICE]

В качестве примера
[PRICE, 1, #,###.@@]

Большое спасибо!

Read more
Posted on the from Claudio D.
Виталий К.
Виталий К.
User
Author

Спасибо Всем!

Read more
Posted on the from Виталий К.