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

#   Custom serial number based on information in order

##

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

Less More

- Posts: 55
- Thank you received: 2
-
-

13 years 6 months ago [\#97805](#97805) by [ohall](/forum/user/16115-ohall "View ohall's Profile")  *[Custom serial number based on information in order](/forum/17-serial-how-to/80037-custom-serial-number-based-on-information-in-order#97805 "Hi There,  Apologies in advance if this is a stupid question.  We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?  Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another &quot;magic number&quot; that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the &quot;magic number&quot;. Ideally, a licence key would then be emailed to them on payment confirmation.  Is this possible with HikaShop Starter and HikaShop Serial?  Many thanks, Oliver")* was created by *[ohall](/forum/user/16115-ohall "View ohall's Profile")*

Hi There,

Apologies in advance if this is a stupid question.

We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?

Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another "magic number" that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the "magic number". Ideally, a licence key would then be emailed to them on payment confirmation.

Is this possible with HikaShop Starter and HikaShop Serial?

Many thanks,
Oliver

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODAwMzctY3VzdG9tLXNlcmlhbC1udW1iZXItYmFzZWQtb24taW5mb3JtYXRpb24taW4tb3JkZXI/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)
-

13 years 6 months ago [\#97807](#97807) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom serial number based on information in order](/forum/17-serial-how-to/80037-custom-serial-number-based-on-information-in-order#97807 "Hi There,  Apologies in advance if this is a stupid question.  We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?  Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another &quot;magic number&quot; that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the &quot;magic number&quot;. Ideally, a licence key would then be emailed to them on payment confirmation.  Is this possible with HikaShop Starter and HikaShop Serial?  Many thanks, Oliver")*

Hi,

No need to apology !

HikaSerial would provide the features to generate the serials and attach them to the user and the order after completion (validation).
If you want to retrieve some information provided by the customer during the purchase, you have to use some "custom fields" which are provided by commercial versions of HikaShop (the business edition for "order" and "items" custom fields).

Order custom fields are information asked to the user during the checkout. The data is for the entire order.
Item custom fields are information asked to the user when a product is added to the cart. The data is attach to the "order product".

Best regards,

---

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

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

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

Less More

- Posts: 55
- Thank you received: 2
-
-

13 years 6 months ago [\#97867](#97867) by [ohall](/forum/user/16115-ohall "View ohall's Profile")  Replied by *[ohall](/forum/user/16115-ohall "View ohall's Profile")* on topic *[Custom serial number based on information in order](/forum/17-serial-how-to/80037-custom-serial-number-based-on-information-in-order#97867 "Hi There,  Apologies in advance if this is a stupid question.  We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?  Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another &quot;magic number&quot; that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the &quot;magic number&quot;. Ideally, a licence key would then be emailed to them on payment confirmation.  Is this possible with HikaShop Starter and HikaShop Serial?  Many thanks, Oliver")*

Thanks Jerome,

I think "item" fields are what we want then!

Not essential, but is it also possible to restrict the number of items purchased _per order line_ to one, yet still allow multiple purchases of the same item?

i.e. something like...
OrderLine:1 Item:MySoftware Qty:1 MagicNumber:1234
OrderLine:2 Item:MySoftware Qty:1 MagicNumber:5678

Or would HikaShop consolidate this to
OrderLine:1 Item:MySoftware Qty:2 MagicNumber:5678

Thanks again,
Oliver

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODAwMzctY3VzdG9tLXNlcmlhbC1udW1iZXItYmFzZWQtb24taW5mb3JtYXRpb24taW4tb3JkZXI/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)
-

13 years 6 months ago -  13 years 6 months ago [\#97879](#97879) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom serial number based on information in order](/forum/17-serial-how-to/80037-custom-serial-number-based-on-information-in-order#97879 "Hi There,  Apologies in advance if this is a stupid question.  We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?  Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another &quot;magic number&quot; that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the &quot;magic number&quot;. Ideally, a licence key would then be emailed to them on payment confirmation.  Is this possible with HikaShop Starter and HikaShop Serial?  Many thanks, Oliver")*

Hi,

The "item" would create a new "line" for each different product, item custom field value included.
So, it would be like that:

> OrderLine:1 Item:MySoftware Qty:1 MagicNumber:1234
> OrderLine:2 Item:MySoftware Qty:1 MagicNumber:5678

If the user change the quantity of a product (in this cart or when adding the product to the cart), you could have something like:

> OrderLine:1 Item:MySoftware Qty:1 MagicNumber:1234
> OrderLine:2 Item:MySoftware Qty:2 MagicNumber:5678

Regards,

---

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

Last edit: 13 years 6 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

The following user(s) said Thank You: [ohall](/forum/user/16115-ohall "View ohall's Profile")

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

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

Less More

- Posts: 55
- Thank you received: 2
-
-

13 years 6 months ago [\#97908](#97908) by [ohall](/forum/user/16115-ohall "View ohall's Profile")  Replied by *[ohall](/forum/user/16115-ohall "View ohall's Profile")* on topic *[Custom serial number based on information in order](/forum/17-serial-how-to/80037-custom-serial-number-based-on-information-in-order#97908 "Hi There,  Apologies in advance if this is a stupid question.  We are looking to use HikaShop Starter to sell a software tool and would like to produce a serial (licence) key at time of order completion, basing the key on certain information provided by the purchaser. I understand that we can write a custom serial generator, but can we have HikaShop ask the purchaser to fill in a field, if the product requires it?  Specifically, the key would be generated based upon the product id, a variant selection, and a piece of information entered by the purchaser (another &quot;magic number&quot; that we will give them). For products that don't require a licence, the user shouldn't need to (or be asked to) fill in the &quot;magic number&quot;. Ideally, a licence key would then be emailed to them on payment confirmation.  Is this possible with HikaShop Starter and HikaShop Serial?  Many thanks, Oliver")*

Perfect - thanks Jerome

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODAwMzctY3VzdG9tLXNlcmlhbC1udW1iZXItYmFzZWQtb24taW5mb3JtYXRpb24taW4tb3JkZXI/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.079 seconds

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

[](#top)
