0

The commerce product has the field: Price

Then I added two more field: Quantity and Price per Unit

I need the field Price per Unit to take the calculated value from this:

Price per Unit = Price/Quantity

How I get this?

1

Commerce out of the box has a quantity field and does by default a 'price-per-unit'. Watch this tutorial to give you an idea of how it works without any customizations.

https://www.youtube.com/watch?v=3KEJcieG4jI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.