Peter.31 Posted November 15, 2019 Share Posted November 15, 2019 Ako zmením číslo objednávky napr.: XCJHSSS na 19110001. Verzia PrestaShop 1.7.6.1. Prvé dve čísla sú rok:19 Ďalšie dve čísla mesiac: 11 Posledné tri čísla sú čísla objednávky: 0001 Link to comment Share on other sites More sharing options...
homer.tmx Posted November 27, 2019 Share Posted November 27, 2019 Pomohl mi to tento modul https://www.motionseed.com/en/prestashop-modules/custom-number Link to comment Share on other sites More sharing options...
Zitty Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
Peter.31 Posted January 25, 2020 Author Share Posted January 25, 2020 Ďakujem za odpoveď. Ako nastaviť, aby sa každý mesiac vynulovalo číslo objednávky. Aby sa to počítalo od začiatku. Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2020 Share Posted January 31, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now