S
S
sllugovskih2016-01-04 17:23:49
CMS
sllugovskih, 2016-01-04 17:23:49

How to change the cost of goods "on the fly" in Opencart?

I got a non-standard project, on the category page there is a calculator that calculates the cost of a certain product using Jquery.
The standard add to cart function takes two parameters id and count. How to add third parameter price?
Example: addToCart(859,1, 9900);
where 9900 is the calculated cost of the goods, the goods are entered into the database with a different price tag or zero at all, it doesn’t matter.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Access Denied, 2016-01-04
@AccessDenied80

If you add a price, you can inject with your price. Have you thought about security? ... It's better to do the necessary calculations on the server side, and instead of transferring the price, you need (th / e) parameter (s) for the calculation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question