Is it possible to modify Magento to provide a "random discount" between 1 and 999?

The reason I ask this is because we need to uniquely differ between bank transfer payments (from customer) when they have the same grand total invoiced amount.

For instance, Customer A with grand total of 120'000 IDR gets a (random) discount of 377, so A will have to transfer 119'623 IDR. Customer B with same grand total of 120'000 (and same cart contents) gets a (random) discount of 421, so B will be transferring 119'579 IDR.

(Optionally, it would be nice if the uniqueness of the grand total can be guaranteed for one week. But if that hammers the database, we can live without it)

1 Answer 1


It doesn't available out of the box. You have to create your own module to does that. You have to extend the salesrule/validator module and have your own login in during the validator process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.