M
M
Martyer2015-12-03 15:25:37
PHP
Martyer, 2015-12-03 15:25:37

How to organize the sale of keys on cs cart?

Hello.
Cmska includes the sale of digital goods according to this principle: you create a product, add a file, the buyer pays for the product and receives a link to download it.
Task: add, for example, 10 files (keys) to one product and give each user only one after payment and remove it from the list.
Did anyone do this, or do you know where to read about it?
Thanks in advance for any hint.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Yanin, 2015-12-03
@Martyer

We do a check of the number of files to reflect, say on the item "Remaining".
We make a database that includes a list of files with a name, say kluch_assasins_01.txt.
When selling, we check for the presence of files with a cycle and a variable n that will receive data with a variable x in which all characters except numbers will be cut off.
If there is 01, then we send it and add it to the sell database. No means n++ and so on.
After that, we check the database for the presence of sell and delete this object from the database. That is, the file itself will essentially remain in the directory, but we will delete the mention of it for the site.

S
Sanes, 2015-12-03
@Sanes

There doesn't seem to be any such functionality.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question