WebSite X5Help Center

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

[PRICE] has 3 zero.  en

Autore: Виталий К.
Visite 1115, Followers 1, Condiviso 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.

Postato il
10 RISPOSTE - 1 UTILE - 1 CORRETTO
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.

Leggi di più
Postato il da Andre E
Serg Linds
Serg Linds
User

Наглядно.

Leggi di più
Postato il da Serg Linds
Виталий К.
Виталий К.
User
Autore

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

Leggi di più
Postato il da Виталий К.
Виталий К.
Виталий К.
User
Autore

Please note the format is 000 not 00

Leggi di più
Postato il da Виталий К.
Serg Linds
Serg Linds
User

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

Leggi di più
Postato il da Serg Linds
Виталий К.
Виталий К.
User
Autore

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

Leggi di più
Postato il da Виталий К.
Serg Linds
Serg Linds
User
Виталий К.
Убрать десятичную.

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

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

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

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

Leggi di più
Postato il da Serg Linds
Виталий К.
Виталий К.
User
Autore

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

Leggi di più
Postato il da Виталий К.
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, #,###.@@]

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

Leggi di più
Postato il da Claudio D.
Виталий К.
Виталий К.
User
Autore

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

Leggi di più
Postato il da Виталий К.