How to work with Calculated Values

Hi, I’m a newbie to Pimcore. I figured out quite a lot but with calculated values I’m Completely Stuck.
I created an object brick where weights are supposed to be calculated from known values. However, the Pimcore documentation on calculated values in very thin at best and I’m completely stuck.

I have no idea how to et the field values out of this object brick into my calculator.php …

Hi @tomdrops
In the compute method you will get the object and you can extract anything from that object.

  public static function compute($object, $context) {
   
    }

Also where are you placing your calculated field in the object brick or at object level?

1 Like