Abstract
OpenCart is awesome but is not fully prepared to sell by meters, square meters, weights, etc…

Dummy Case
(It’s only a fragment of a formula)
Take a look at this discount plan:
+1 to 5 m2: 0%
+5 to 10 m2: 10%
+10 to 15 m2: 15%
+15 to 20 m2: 20%
+20 m2: 25%

Now in our formula we will calculate a dummy variable for SquareMeters and then you will find the conditional which handles the discounts per square meters.
Notice that ranges are checked from bigger to smaller.

```// It's only a fragment of a formula.
...

// Calculate square meters
\$SquareMeters = \$cuWidth * \$cuHeight;

// Now store price in a variable, so keep the original unchanged
\$OurPricePerSquareMeters = \$Price;

// Let's see the discounts
if(\$SquareMeters>20) {
// Apply 25%
\$OurPricePerSquareMeters = \$OurPricePerSquareMeters - (\$OurPricePerSquareMeters*25/100);
} elseif(\$SquareMeters>15 and \$SquareMeters<=20) {
// Apply 20%
\$OurPricePerSquareMeters = \$OurPricePerSquareMeters - (\$OurPricePerSquareMeters*20/100);
} elseif(\$SquareMeters>10 and \$SquareMeters<=15) {
// Apply 15%
\$OurPricePerSquareMeters = \$OurPricePerSquareMeters - (\$OurPricePerSquareMeters*15/100);
} elseif(\$SquareMeters>5 and \$SquareMeters<=10) {
// Apply 10%
\$OurPricePerSquareMeters = \$OurPricePerSquareMeters - (\$OurPricePerSquareMeters*10/100);
} else {
// No discount
}

// And calculate final price
\$FinalPrice = \$SquareMeters * \$OurPricePerSquareMeters;
```