English | Українська
Cryptex replaces customer-facing order numbers with deterministic, reversible public IDs. The administration area shows both values and accepts either value in the order filter.
The modifier supports:
- ocStore 2.3.0.2.4;
- ocStore 3.0.3.7 (Ukraine);
- ocStore 3.0.4.1 (Ukraine Global);
- OpenCart 3.0.4.1;
- OpenCart 3.0.5.0.
It supports the PHP templates used by OpenCart 2 and the Twig templates and event-based mail controller used by OpenCart 3.
Copy the system directory into the OpenCart upload root. Add the following to
system/config/default.php, then refresh the modification cache in the admin
panel:
$_['cryptex_key'] = 'RANDOM%STRING';
$_['cryptex_max'] = 9000000; // Exclusive upper bound for a real order ID.
$_['cryptex_smooth'] = 1000000; // Offset applied to the encrypted value.
$_['cryptex_start'] = 123; // First real order ID that should be hidden.The example supports real order IDs through 8999999 and produces public IDs
in the seven-digit range from 1000000 through 9999999.
Requirements:
- 64-bit PHP;
cryptex_keymust be a non-empty secret string;0 <= cryptex_start < cryptex_max;cryptex_smooth >= cryptex_start;cryptex_max - 1 + cryptex_smoothmust fit in a PHP integer.
Do not change the key or numeric settings after public IDs have been issued: old links depend on the same values to decode correctly.
