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

#   How to generate/import hundreds of coupons?

##

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

Less More

- Posts: 198
- Thank you received: 4
-
-

12 years 10 months ago [\#135305](#135305) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135305 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")* was created by *[arnask](/forum/user/6752-arnask "View arnask's Profile")*

I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them?
If i will need to do it manually i'll probably will get old before i'll do that ![:)](/media/kunena/emoticons/8.png ":)")

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

12 years 10 months ago [\#135319](#135319) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135319 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

Hi,

In HikaShop there is no batch generation or import system for the coupons.
But in HikaSerial, you have a batch generation for coupons. Using the "coupon generator", you can generate manually serials which will generate coupons.
You can also generate dynamically some coupons, for example if you want to send coupons in an Acymailing newsletter.

Regards,

---

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

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

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

Less More

- Posts: 198
- Thank you received: 4
-
-

12 years 10 months ago [\#135323](#135323) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135323 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

so if i need to have a thousand coupons 00007,00008,00009,00010,00011 ... 01007 HikaSerial will do that for me?

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

12 years 10 months ago [\#135341](#135341) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135341 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

Hi,

The coupon generator will create the coupon code, it uses a random algorithm for the coupon codes so it is not easy to "find" a code like that.
When you have a coupon generator used in a pack (a pack is a group of serials) you can "generate" serials and specify a number of coupon you want to create (it can be a thousand of coupon if you want).

Regards,

---

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

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

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

Less More

- Posts: 198
- Thank you received: 4
-
-

12 years 10 months ago [\#135343](#135343) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135343 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

sorry, but it seems that it is something i don't need. I don't mind to pay for HikaSerial, but it just isn't what i need. I just need the possibility to generate a number of codes, shoose codes format and coupons options. Maybe i can use INSERT INTO function and add all coupons directly to database throught phpmyadmin?

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

12 years 10 months ago [\#135348](#135348) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135348 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

Hi,

Yes you can insert directly your coupons in the database. The best is to copy the values of an existing coupon in order to right fill all columns correctly.

Regards,

---

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

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

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

Less More

- Posts: 198
- Thank you received: 4
-
-

12 years 10 months ago [\#135351](#135351) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#135351 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

i just run SQL guery on my datadase:

INSERT INTO qdvsk_hikashop_discount(discount_type, discount_percent_amount, discount_code, discount_published, discount_currency_id, discount_coupon_nodoubling, discount_coupon_product_only, discount_affiliate)VALUES( 'coupon','30','888','1','91','0','0','-1');

and it seems that did the trick. My coupon is ready to use. Now i need somehow to generate as many these queries as i need coupons, i think i'll use MS Access for that, because codes i already have in my excel table.

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

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

Less More

- Posts: 15
- Thank you received: 1
-
-

12 years 1 month ago [\#172728](#172728) by [techworx](/forum/user/33344-techworx "View techworx's Profile")  Replied by *[techworx](/forum/user/33344-techworx "View techworx's Profile")* on topic *[How to generate/import hundreds of coupons?](/forum/46-discount-coupon/864114-how-to-generate-import-hundreds-of-coupons#172728 "I need to have hundreds or thousands of coupons. Ho can i generate or import (even better) them? If i will need to do it manually i'll probably will get old before i'll do that :)")*

export excel table to csv, and there are doesn't of simple ways to script your import a csv to your table --
the most rudimentary would be a script to generate your sql insert statements from the csv.

perl, php, ruby, even a shell script could be used to create your sql insert statements.

ruby has some nice gems to make connecting to the db, and processing csv fairly simple. I have to do this -- and i"m going to use ruby -- I'll post my script here for the benefit of the community. As it looks like this is a fairly common request with things like groupon, etc.

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

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

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

Time to create page: 0.333 seconds

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

[](#top)
