-1

I am using OpenCart version 3.0.2.0. My problem is that if the basket amount created by the customer reaches $10 and passes, how do I make it accepted as an order.

focus.style
  • 6,612
  • 4
  • 26
  • 38
fresh
  • 19
  • 4
  • 1
    Welcome to StackOverflow! Please read *[how to ask a good question](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples)* to let us help you better – Christophe Hubert May 10 '20 at 15:12

1 Answers1

1

Using standard tools, you can setting a minimum price for Shipping and Payment methods. If you have a Shipping or Payment methods with minimum price of 10$ - the smaller total checkout will be impossible, because. Note. Not every Shipping or Payment has these settings.

More complex way:

catalog/controller/checkout/checkout.php

find (line 4-7)

        // Validate cart has products and has stock.
        if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
            $this->response->redirect($this->url->link('checkout/cart'));
        }

add below

if ($this->cart->getSubtotal() < 10) {
    $this->session->data['error'] = 'Your warning message';
    $this->response->redirect($this->url->link('checkout/cart'));
}
halfer
  • 19,824
  • 17
  • 99
  • 186
focus.style
  • 6,612
  • 4
  • 26
  • 38