Doing math with data results

I am setting up my shop (well trying to :slight_smile:)

In my products table, I have the following:

The foreign keys link to a separate shipping table that contains their values. I choose to do a separate table because the amounts may vary depending on product category and product type. The amounts may vary during different times of the year as well.

What I need to do is this:

(Product Price + Processing Fee + Shipping Fee) = A
(A * Credit Card %) = B
(B + Processing Fee + Shipping Fee) = S&H Subtotal
(Product Price + S&H Subtotal) = Total Price

And on the website display the results:

Product Price…S&H Subtotal…Total Price

Is this possible in Wappler or should it be done in mySQL through a view?

Community Page
Last updated: