Mandatory field with view limited by other field

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #119191

-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.1

I have created a mandarory field. View for this field is limited by user country field. So if user is in Italy, this field must be shoun otherway not.

Anyway if a user from France for example try to register, the field is correctly hidden, but user cannot complete registration because an error message shows that user should fill that field that anyway is hidden.

Any solution?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 3 months ago #119211

Hi,

Can you give us more details about the problem that you are having through some screenshots and a link of the page where you are having this issue.

Thanks :).

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #119226

As you can see in the attached image, I need a mandatory field to show for customers in Italy. So I've setted this field as mandatory (obbligatorio) and also I've setted it to show only if country is "Italy".
If a user from UK, for example, try to register, this field is hidden but being mandatory, when user click on register button it displays an error message that asks to fill this field but a user from UK cannot see that field because it's hidden. Take a look at second attached image where you can see the form. The mandatory field is not shown (correctly) but user cannot fill it and system says that it's required.
So, is that a bug about the condition or just need to set something to let it work fine?

Attachments:

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

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
11 years 3 months ago #119315

Hi,

Please change the line:
$fields =& $this->getData($area, $type, false, $allCat);

to:
$fields =& $this->getData($area, $type, true, $allCat);

in the file administrator/components/com_hikashop/classes/fields.php and that should fix the problem.

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #119333

It seems not fix the issue. Still asks me to fill that field

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

  • Posts: 2334
  • Thank you received: 403
11 years 3 months ago #119872

Hi there,

This fix works on our end so it should on yours.
How did you make the modification? Could you make sure the line has been changed?
We may need a FTP access if it really doesn't work.

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #119913

I will send you a PM. Thanks

Last edit: 11 years 3 months ago by deltafidesign.

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

  • Posts: 2334
  • Thank you received: 403
11 years 3 months ago #119971

It looks llike you did the modification in one place but there was still a line not modified.
You should try again and tell us if it works.

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #119976

Just sent you a PM. Thanks.

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

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
11 years 3 months ago #120249

The instructions I gave earlier on were not correct, it was actually the opposite that was necessary and the solution is to change the line:
$fields =& $this->getData($area, $type, true, $allCat);

to:
$fields =& $this->getData($area, $type, false, $allCat);

in the file administrator/components/com_hikashop/classes/fields.php which was the modification I had made on my end.

I did a test and it's working fine now on your website.

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #120260

Work fine now, thanks. Hope you will implement this in next releases... right?

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

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
11 years 3 months ago #120265

Of course.

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

  • Posts: 272
  • Thank you received: 13
11 years 3 months ago #120271

I've created now another field for vendor in this case. It's correctly shown but view should be limited only for Italy. Anyway it seems not working. It's always displayed.

What's wrong?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 3 months ago #120304

Hi,

I fixed the current HikaMarket build (1.3.0) in order to some improvements about the linked custom fields.
I also made several patchs in the HikaShop class fields, patch which will be include in the next HikaShop release (2.2.1).

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: deltafidesign

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

Time to create page: 0.099 seconds
Powered by Kunena Forum