Jump to content

Zmena čísla objednávky


Peter.31

Recommended Posts

  • 2 weeks later...
  • 1 month later...

Stačí v classes/order/Order.php změna funkce generateReference:

Kód:

public static function generateReference()
   {
      return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC'));
   }

nahradit:

public static function generateReference()
    {
        $query = new DbQuery();
        $query->select('MAX(id_order) as max');
        $query->from('orders');
        $query->where('id_cart' > 0);
        $order = Db::getInstance()->getRow($query);
        $reference = $order['max'] +1 ;
        $date_reference = StrFTime("%y%m", Time());
        return $date_reference.sprintf('%05d', $reference);
    }

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...