Answer the question
In order to leave comments, you need to log in
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.
Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question