Did the above answer your question?
While it is true a calculation is typically not to be relied on it is needed for the user.
For a ecommerce site / shopping cart you do in fact calculate totals for the user with javascript as that will give a quick visual answer without refreshing the page. In theory you could use an ajax request but more than likely that is not needed.
However, on the back end when you are going to send a payment amount to the processor, you only send the item and quantity. Then your back end code looks up the price and does any calculation including any final shipping if that is needed.
In short, do you still need help with the JS calculation?
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE