Additional Category for custom fields in checkout

  • Posts: 56
  • Thank you received: 2
  • Hikashop Business
1 week 1 day ago #310809

-- url of the page with the problem -- : www.ginmacher.de
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.2
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Custom Field on Checkout

Hello Team,

on my checkout page I have a custom section below (marked red) with three custom fields in the view order. I want to add another field (marked green) with a dropdown, that the user can should select where does he know my shop from.



Regarding this field I have two questions:
1.) I want this field to be in a seperate section, not in the one with the three fields and with a seperate header caption (best would be above the current section with the three fields.. How is that possible? If Imake new custom fields they only go (if I put them in the order form) in the section where the other three fields are.
2.) The field itself should contain 4 values to select, but in the chart itself if should be empty from start on (field is mandaroty in the background settings). Currently when I setup the field I can only select a value as standard value which is already there, that also makes the setting (field mandatory) obsolete, because there's already a value in. How can I setup the field in a way, that the user has to select one entry but the field itself shows no value when the user entered the shopping cart website? Means - if the user miss to fill the field and want to do the checkout the error message appears (from Background setting) that the field has to be filled with a value from the dropdown.

Thanks for your support.

Attachments:

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

  • Posts: 66849
  • Thank you received: 9881
  • MODERATOR
1 week 23 hours ago #310812

Hi,

1. That's possible. You can create a new view "fields" in the "checkout workflow" of the HikaShop configuration on top of the one you already have.
Then, in each "fields" view, you have an option where you can select which custom order field you want to be displayed there. Other custom order fields won't appear in the view.

2. You need to add a 5th value with its "value" input field empty and it's "title" input field set to "please select something" (or something similar). After saving the custom field once, select that 5th value as the default one and you'll see that the "required" option will be enforced.

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

  • Posts: 56
  • Thank you received: 2
  • Hikashop Business
1 week 9 hours ago #310854

Hello Nicolas,

thank you for the answer, but the solution only works 50%. I can add a new view in the workflow (see screenshot) and select per view the fields I want to have on the view:



But when it comes to the cart itself, the view will not be displayed with this setting.



Also, the view has the same header, I assume it's because it's the same view but doubled. When, for example, I setup the view in the admin area like that: view 1: no selection of field, view 2 only selection of 1 field, it shows all fields in view 1 and only the specific field in view 2.



I want to have it that way, that the specific field from view 2 to is only available in view 2 and the other three fields from view one (like the selection above) are available in view 1, but also with a different heading. How is that possible?

Thank you
Alexander

Attachments:

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

  • Posts: 66849
  • Thank you received: 9881
  • MODERATOR
1 week 2 hours ago #310859

Hi,

Regarding the title, it's easy to do. Disable the "show title" option of the second Fields view, and add a "Text" view just before it with the HTML of the title you want to appear before it.

Regarding the fields display not happening when the field is not selected in the first view, that's a bug.
I was able to reproduce it on my end and added a patch for that. Download again the install package of the latest version of HikaShop on our wesite and install it on your website and you'll get the patch.

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

  • Posts: 56
  • Thank you received: 2
  • Hikashop Business
6 days 23 hours ago #310885

Hi Nicolas,

thnak you for the fast reply. I have the latest Hika Shop only on my test system, on the live system I have a lower Hika Shop version on live system because if I upgrade the new version will mess up with my responsive css on the mobile version. Currently I do not have time to fix this and for the customer it looks not good so I stick a while with the old version in the live system. So I first need time to fix all the minor css issue before I install the latest version to live system.

Could you please provide me the bugfix for my current version or just tell me where do you have added which code in which file, so I can adjust it manually in the live version of the website.

Thanks a lot!

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

  • Posts: 66849
  • Thank you received: 9881
  • MODERATOR
4 days 9 hours ago #310940

Hi,

You need to edit the file "show_block_fields.php" via the menu Display>Views and apply these patchs:
monosnap.com/file/Iagj1zMwPFyg4u0HCFWmaCaH7QM7IJ
Remove the red lines and add the green lines in the view file. The lines without color are just there to help you find the code in the view file to do the replacing.

The following user(s) said Thank You: ginmacher

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

  • Posts: 56
  • Thank you received: 2
  • Hikashop Business
2 days 9 hours ago #311042

Thanks Nicolas. Works as expected!

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

Time to create page: 0.084 seconds
Powered by Kunena Forum