Random order numbers after checkout OpenCart

BonusGet bonus +100 грн. for your review

Download files

Characteristics
OpenCart2.0, 2.1, 2.2, 2.3, 3.0
PHP7.0 – 8.5
XML modificationYes
LocalizationEnglish, Ukrainian, Russian
Statistics 39075 1199
Added30.05.2017
Updated16.08.2024 · 2 years ago
Files random-order.ocmod.zip

The "Random Order ID" module (random-order-id) changes the traditional order numbering logic in OpenCart and makes the order_id less predictable. Instead of a strict sequence (...101, 102, 103), each new order is assigned a number with a small "step"—a random value is added. This makes it more difficult for customers and third-party observers to understand how many orders a store has and what the next order is.

How it works

When creating an order, the module takes the last order_id from the database and adds a random number to it.

  • Random step range: 3 to 10
  • If there are no orders yet: the starting value is also taken randomly (3–10)
  • Inserting into the database: the module inserts the calculated order_id directly into the INSERT query

What does the module change?

  • File: catalog/model/checkout/order.php
  • Operations: finding the addOrder($data) call, calculating a new number, replacing part of the INSERT query
  • Data: table oc_order (via DB_PREFIX + order ), field order_id

Advantages

  • Less predictability means it's harder to "guess" neighboring orders.
  • Simple logic without settings and control panels.
  • Suitable for stores where it is important not to reveal the actual sales rate.
Important: The module manually sets the order_id. If you have integrations (1C/CRM/delivery services) that expect strictly sequential IDs, test compatibility on a test copy beforehand.

Example of application

If the last order had ID 1500, then the next one could be, for example, 1506 or 1509. This looks natural to the client, but no longer provides an obvious "ladder."

File Name Added Modified
random-order.ocmod.zip
Size: 793 B | Total downloads: 1199
30.05.201716.08.2024

Leave your review about this product

Bonus Get bonus +100 грн. for your review Bonus program

Write a review

Note: HTML is not translated!
AI Assistant

Recently viewed

2.x, 3.x
Random order numbers after checkout
Бесплатно
0
39076 1199

Featured