Display error for minimum subtotal not met

LiteCart Fan
Fra Netherlands
Medlem siden nov. 2020

Is there a way to check which payment module is chosen (id) at the checkout so I can use that information to give an error for a minimum subtotal depending on the module?

LiteCart Fan
Fra Netherlands
Medlem siden nov. 2020

Thanks Tim, works Perfect!

 $fee= 0;
    if ($subtotal < $this->settings['minorder']) {  
    $fee = $this->settings['fee'];
    }

      $method = [
        'title' => $this->name,
        'description' => language::translate(__CLASS__.':description', ''),
        'options' => [
          [
            'id' => 'por',
            'icon' => $this->settings['icon'],
            'name' => reference::country($country_code)->name,
            'description' => '',
            'fields' => '',
      'minorder' => $this->settings['minorder'],
            'cost' => $fee,
            'tax_class_id' => $this->settings['tax_class_id'],
            'confirm' => language::translate(__CLASS__.':title_confirm_order', 'Confirm Order'),
          ],
        ]
      ];
Du
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.