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

#   Make Coupon field "required" and compulsory?

##

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

Less More

- Posts: 14
- Thank you received: 2
-
-

12 years 11 months ago [\#134850](#134850) by [bootfair](/forum/user/15490-bootfair "View bootfair's Profile")  *[Make Coupon field "required" and compulsory?](/forum/27-checkout/864041-make-coupon-field-required-and-compulsory#134850 "Hi, We are selling fireworks but we are not allowed to sell without a permit but some idiots keeps buying stuff on line without a permit and starts arguing for refunds. What we need to do is maybe make the coupon code field a compulsory field so that people need to enter a code supplied by us before they can go to payment page. No code - no payment - no hassle :))  Or perhaps create a custom field on the address section (or anywhere before the payment stage realy) to act like some kind of password field where we can pre-define this value and this is checked by hikashop just like the coupon code.  Is this possible at all?  Thanks.")* was created by *[bootfair](/forum/user/15490-bootfair "View bootfair's Profile")*

Hi,
We are selling fireworks but we are not allowed to sell without a permit but some idiots keeps buying stuff on line without a permit and starts arguing for refunds. What we need to do is maybe make the coupon code field a compulsory field so that people need to enter a code supplied by us before they can go to payment page. No code - no payment - no hassle ![:)](/media/kunena/emoticons/3.png ":)"))

Or perhaps create a custom field on the address section (or anywhere before the payment stage realy) to act like some kind of password field where we can pre-define this value and this is checked by hikashop just like the coupon code.

Is this possible at all?

Thanks.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 11 months ago [\#134952](#134952) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Make Coupon field "required" and compulsory?](/forum/27-checkout/864041-make-coupon-field-required-and-compulsory#134952 "Hi, We are selling fireworks but we are not allowed to sell without a permit but some idiots keeps buying stuff on line without a permit and starts arguing for refunds. What we need to do is maybe make the coupon code field a compulsory field so that people need to enter a code supplied by us before they can go to payment page. No code - no payment - no hassle :))  Or perhaps create a custom field on the address section (or anywhere before the payment stage realy) to act like some kind of password field where we can pre-define this value and this is checked by hikashop just like the coupon code.  Is this possible at all?  Thanks.")*

Hi,

This is a very specific use case.
The coupon solution can be a good idea, but actually we can't set the coupon required.
It will require custom code to edit that.

The password solution in a custom field seems to be a good idea too, but it will require too custom code.
I think that a plugin can do the job, base this plugin on the trigger "onBeforeOrderCreate()".

If the password is correct, so let do hikashop create the order, else set the var $do to false to not create the order.
Here is some documentation about plugins in HikaShop:
[ www.hikashop.com/support/documentation/6...#onBeforeOrderCreate](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeOrderCreate)

It require some PHP knowledges.

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

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