How to enter math formulas in product description

Hi all,

I’m limited on coding experience, but would like to find a way to solve this..

  • We sell seafood in pound/lb increments

  • Would like to have a formula that shows price per meal/serving listed in our product descriptions, like “6.88 per meal”

  • When we have to change a variant’s price, I don’t want to have to go back and update each instance of “X per meal”.. I’d like that math to be done automatically.

If anyone has suggestions or ideas, I’d greatly appreciate it.

First, you need to find the match formula and then do it in a code format. I would recommend you try this source, I often used it for some of my studies. It sounds easy so I think you’ll find some suggestions there. And after you can use StackOverflow to find suited code.

I found the similar code on Stack, but I’m not sure the’re the formula you need