Make Coupon field "required" and compulsory?

  • Posts: 14
  • Thank you received: 2
11 years 6 months ago #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.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #134952

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

It require some PHP knowledges.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum