John Edwards
asked on
Customize the Order Reference in Prestashop
Hi,
I'm running Prestashop website, and would like to customize the Order Reference to be unique.
I'm running a module that split multi items in a single cart into multi orders separated with Order IDs but with same Order reference.
If you have 3 items, they will be splited into 3 orders, for instance, you will see the order IDs as 100, 101 and 102, but the Order Reference will be 986716 for all the Orders I mentioned, I need to tweak this to have the Order Reference to be different than the other.
My actual public static function generateReference from classes/order/Order.php has:
return stroupper(Tools::passwdGen (9, 'NUMERIC'));
How can edit the code so that once generated it won't give the same order reference for all the orders in a single cart
I'm running Prestashop website, and would like to customize the Order Reference to be unique.
I'm running a module that split multi items in a single cart into multi orders separated with Order IDs but with same Order reference.
If you have 3 items, they will be splited into 3 orders, for instance, you will see the order IDs as 100, 101 and 102, but the Order Reference will be 986716 for all the Orders I mentioned, I need to tweak this to have the Order Reference to be different than the other.
My actual public static function generateReference from classes/order/Order.php has:
return stroupper(Tools::passwdGen
How can edit the code so that once generated it won't give the same order reference for all the orders in a single cart
can you explain your reasoning why all orders in a shopping cart shouldn't have the same order number?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.