Using price modifier is likely the simplest way without changing your whole catalog:
In a custom module, you need in the etc folder a di.xml
with the content below:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Ui\DataProvider\Modifier\Pool">
<arguments>
<argument name="modifiers" xsi:type="array">
<item name="custom-pricing" xsi:type="array">
<item name="class" xsi:type="string">Mbs\PriceWidget\Model\PriceModifier</item>
<item name="sortOrder" xsi:type="number">90</item>
</item>
</argument>
</arguments>
</type>
</config>
then the class will be called for all your products (so be careful your calculations do not create overhead), but then if you only apply your customisation when standard dimensions has a value, you may have something working quickly.
<?php
namespace Mbs\PriceWidget\Model;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\PriceModifierInterface;
class PriceModifier implements PriceModifierInterface
{
private static $chargeForRange600_2000 = 23;
public function modifyPrice($price, Product $product)
{
if ($product->getStandardDimensions() === '600 x 2000') {
return $price + self::$chargeForRange600_2000;
}
return $product->getPrice();
}
}