required custom fields

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200061

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1

Hello

I'm trying to add some required custom fields in my product. I can see the fields in the product page but there is a default value in the dropdown and the user can add the product to the cart without changing the default value... So what the difference between required or not required? What is wrong with my custom field?

Thanks

Attachments:
Last edit: 10 years 4 months ago by Carolek.

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 4 months ago #200065

Hi,

The best is to let the default value for the one which have an empty "value".
So the customer will have to select one value in the dropdown if the default is not the empty, it will provide a valid value.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200120

It's not possible to add an empty value at all. And I really need that the buyer have an error dialog when he isn't use the custom field. If I change the dropdown with a text field, the error dialog works. so what the difference? Please, I really need this to work.

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 4 months ago #200123

Hi,

In the values, add a new one with a title but with an empty "value".
Remove the "required" option of the custom field and save it.

Then, you can select the default value for the custom field and select one value which is empty.
You can reactivate the "required" option as well, and re-save the custom field.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Carolek

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

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200151

THANK YOU!!!!!!!!!!!!!!!!!

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 4 months ago #200157

Hi,

Please note that we already made some improvements in HikaShop to allow you to save an empty default value in the backend, even if the custom field is required.
I made the patch last month and it will be in the next release.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200188

Hi,
Ok, it's fine. Is there a way to copy custom fields? I need to make 100 (!!!) Of same one...

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 4 months ago #200208

There is no copy function.
The issue with such function is that when you create a new custom field, the column name is used to create the column in the database (and that's why you can't change it later on), but a copy function would take a field and generate a new one out of it without asking you anything (like the other copy buttons in HikaShop) and thus you would get a random column name for your field copy and you wouldn't be able to change it.
That's mainly why we didn't add that but also not a lot of people require to generate so many fields that are almost identical.

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

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200242

I understand. Why there is no possibility to make options required in Hikashop? Most shops have this functionality and it's a must! So I could use it and save time! Hope it will be very soon :)

Thank you for your support!

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 4 months ago #200268

Hi,

For what I know, it is possible to have require options in HikaShop.
By grouping the options with their parent product, once the product is added into the cart the customer can't delete the linked option from the cart.

When the product option is a classical option you will have a "yes/no", but if you add an option which have variants, you will just be able to select the variant and you couldn't not add the option.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 157
  • Thank you received: 2
10 years 4 months ago #200320

What you say is that the option will be with the product but it can be also with the default value. I want that the default value is "choose value" and if the user is not choosing a different value from the default one, it will be prompted by an error pop up that ask him to choose. Just like in custom fields...

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 4 months ago #200335

That capability is only possible with the custom fields.
Adding it to options would be possible with several changes in the code.
The issue with options is that, unlike custom fields, they don't have any settings.
So it would mean global options to make them all required or not, all with a choose option or not, which is not ideal as most of the time to don't want that to be global.
That's why we usually recommend to set the values you want in the dropdown option with a characteristic so that a default value is already selected in the options and the customer cannot choose nothing for the option.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum