Display error for minimum subtotal not met

LiteCart Fan
Depuis Netherlands
Membre depuis 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
Depuis Netherlands
Membre depuis 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'),
          ],
        ]
      ];
Vous
Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.