Minimum order to complete

Hello 

How can i set so customer mus have  products for 200sek in the basket if the not have this the can not complete a order. 

The minimum for complete a order

tim

Create an order module and invoke the validate method.

https://wiki.litecart.net/how_to_create_an_order_module

For the order total:

      if ($order->data['payment_due'] < 200) { // This is in store currency
        return ['error' => 'This order is no good'];
      }
    }

Foor the subtotal:



      $subtotal = 0;
      foreach ($order->data['items'] as $item) {
        $subtotal += $item['price'] * $item['quanntity'];
      }

      if ($subtotal < 200) {
        return ['error' => 'This order is no good'];
      } 
   }```
This thread has been closed due to long inactivity. Posting to it is not possible.
View code on GitHub