HikaSerial Coupon Gen Plugin duplicate serials

  • Posts: 52
  • Thank you received: 1
7 years 7 months ago #248320

-- HikaShop version -- : 2.6.3
-- HikaSerial version -- : 1.10.4
-- Joomla version -- : 3.6.2

Good afternoon,

I just got an email from a client. It seems that the coupon gen plugin for HikaSerial that we are using to create gift cards is generating duplicate serials. It has only happened once so far. How do I prevent this from happening? I looked at the two orders to make sure it wasn't a typo on the client's part, but no - they truly are duplicate serials on two separate orders.

Any help would be much appreciated. I have attached the config screen for the coupon gen plugin in case you need it.

Many thanks,

Leslie

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 7 months ago #248321

Hi,

Regarding the configuration of your generator ; it is logical.
You have only 999 possibilities and because it is do it randomly, the chances to generate a number twice increase rapidly with the number of serials.
I warmly recommend you to change your coupon generator configuration in order to introduce a bigger range.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 1
5 years 10 months ago #292668

Jerome,

Does the latest version of HikaSerial resolve the duplicate serial issue? I get that the serial number is generated randomly,
but it seems to me that it would make sense for the generator to check against the list of previously generated serials to
make sure duplicates aren't created.

Many thanks...

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 10 months ago #292672

Hello,

There is no modification in the HikaSerial core regarding that.
As explained previously, more serials you have, less "empty slots" are available. And if your generate have few possibilities, you increase the chances of conflicts.

Even with an algorithm to detect duplication ; if you do not have enough available slots, you can have some really close to an infinite loop since you would require to try a very high number of combination to find an available one (which can also result to a very high number of database queries).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.058 seconds
Powered by Kunena Forum