[Skip to main content](#vessel-content)

#   HikaSerial Coupon Gen Plugin duplicate serials

##

- **[NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")**
- [![NanoPlanet's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34445-nanoplanet "View NanoPlanet's Profile") Topic Author
- [ Offline](/forum/user/34445-nanoplanet)

Less More

- Posts: 52
- Thank you received: 1
-
-

10 years 2 months ago [\#248320](#248320) by [NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")  *[HikaSerial Coupon Gen Plugin duplicate serials](/forum/14-hikaserial/886126-hikaserial-coupon-gen-plugin-duplicate-serials#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")* was created by *[NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")*

-- 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

- [ ![coupongen-config.jpg](/forum/attachment/33162) ](/forum/attachment/33162 "...gen-config.jpg") [ ](/forum/attachment/33162?download=1 "...gen-config.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE0LWhpa2FzZXJpYWwvODg2MTI2LWhpa2FzZXJpYWwtY291cG9uLWdlbi1wbHVnaW4tZHVwbGljYXRlLXNlcmlhbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 2 months ago [\#248321](#248321) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[HikaSerial Coupon Gen Plugin duplicate serials](/forum/14-hikaserial/886126-hikaserial-coupon-gen-plugin-duplicate-serials#248321 "-- 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")*

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE0LWhpa2FzZXJpYWwvODg2MTI2LWhpa2FzZXJpYWwtY291cG9uLWdlbi1wbHVnaW4tZHVwbGljYXRlLXNlcmlhbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")**
- [![NanoPlanet's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34445-nanoplanet "View NanoPlanet's Profile") Topic Author
- [ Offline](/forum/user/34445-nanoplanet)

Less More

- Posts: 52
- Thank you received: 1
-
-

8 years 5 months ago [\#292668](#292668) by [NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")  Replied by *[NanoPlanet](/forum/user/34445-nanoplanet "View NanoPlanet's Profile")* on topic *[HikaSerial Coupon Gen Plugin duplicate serials](/forum/14-hikaserial/886126-hikaserial-coupon-gen-plugin-duplicate-serials#292668 "-- 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE0LWhpa2FzZXJpYWwvODg2MTI2LWhpa2FzZXJpYWwtY291cG9uLWdlbi1wbHVnaW4tZHVwbGljYXRlLXNlcmlhbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

8 years 5 months ago [\#292672](#292672) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[HikaSerial Coupon Gen Plugin duplicate serials](/forum/14-hikaserial/886126-hikaserial-coupon-gen-plugin-duplicate-serials#292672 "-- 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")*

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE0LWhpa2FzZXJpYWwvODg2MTI2LWhpa2FzZXJpYWwtY291cG9uLWdlbi1wbHVnaW4tZHVwbGljYXRlLXNlcmlhbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.093 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
