P
P
personamasha2017-01-27 14:31:25
opencart
personamasha, 2017-01-27 14:31:25

How to solve the problem with prices in the calculator (Opencart)?

There is a calculator on the product page!
The main problem is that when the price tag of the product on the product page is up to 999, it is considered amazing.
If the item's price is 1000 or >1000, then the calculator fails and displays a result of 1.
That is, the price of the product is 1000 rubles, press "+", (add 1 more product with the same price) the result is 2 rubles
If the price of the product is up to 999 rubles, press "+", (add 1 more product with the same price) the result is 1998 rubles.
Who has any thoughts? Please share.
613d66e78f774946b490760f12d0af1a.jpge0b6673373c84735b95a92676835b768.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
web-mechanic, 2017-01-27
@personamasha

most likely the problem is in the js script, because of the space between the digits, type casting does not work correctly, so instead of 1 000 + 1 000 after type casting, it turns out 1 + 1

U
User Unknown, 2017-08-17
@MihailDonskoy

And they forgot to add to the main DOM document

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question