Donation plugin minimum amount

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
2 years 3 months ago #346628

-- HikaShop version -- : 4.6.2

Is there a way to limit minimum amount for donation?
We use this plugin for gift certificate with custom amount. But we like to limit to min. 20€.

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

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 3 months ago #346633

Hi,

Yes. In settings of the custom field you've created for the input field, you have a "regular expression" setting you can use for that.
For example, you could use the regex:

^([2-9][0-9]|\d{3,})([\.,]\d\d?)?$
regexr.com/72kd9

Last edit: 2 years 3 months ago by nicolas.

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

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
2 years 3 months ago #346640

I entered exact code as you provided, but I still can buy gift with 5 or even zero €.

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

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
2 years 3 months ago #346641

Donation plugin should have minimum amount optin by default. I try in your demo site to and I can leave empty field (zero €) and I can buy that. Or donate zero € :)

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

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 3 months ago #346644

Hi,;

You need to turn on the "required" setting of the custom field.
The regular expression works, I tested it, but the "required" setting has to be turned on.

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

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
2 years 3 months ago #346659

Ok, now we geting closer.
What about translatin string for "reqired error"? Now just says....enter value. Is there a way to say...enter value higher than x?

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

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 3 months ago #346660

Hi,

In the settings of the custom field, you have a setting "Custom Error Message" where you can enter the text you want instead.
And if you want to translate it in several languages, instead of entering the text there, enter a translation key, and then under the Languages tab of the HikaShop configuration, you can add a line in the override area for each language for that key with the text you want.

Last edit: 2 years 3 months ago by nicolas.
The following user(s) said Thank You: mojweb

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

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
2 years 3 months ago #346683

Thank you. Great support.

The following user(s) said Thank You: Philip

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

Time to create page: 0.071 seconds
Powered by Kunena Forum