[Skip to main content](#vessel-content)

#   dependent characteristics

##

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago -  5 years 8 months ago [\#329006](#329006) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329006 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")* was created by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")*

-- url of the page with the problem -- : [ arsquadrum.com](http://arsquadrum.com)
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.3.23

Hi,
I have this problem:
I'm selling printed pictures with the options *with* or *without frame*.
When a client selects the option *with frame* another dropdown appears with the colors available. That's ok.
But when a client selects the option *without frame* then the dropdown with the colors should not be visible.

I thought the dynamic characteristics would do that, but it doesn't.
Am I doing something wrong?
Or is there a solution for that?

Last edit: 5 years 8 months ago by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329011](#329011) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329011 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

Normally, with the "Characteristics dynamic display" setting activated in the HikaShop configuration, you'll only get the possible values in each dropdown, based on the variants you've added to the product.
So in your case you would need to create such variants:
- with frame with color 1
- with frame with color 2
etc
- with frame with color x
- without frame without color
Then, when you select the frame characteristic, the color characteristic selector should appear. And if "with frame" is selected, then you should be able to select the colors from 1 to x, and if "without frame" is selected, then you should be able to select the color "without color". But there is no system to hide the second selector in that second case.

An alternative would be to only have a frame characteristic in your product, and the have a custom field of the table "item" for the color selector.
Then, you could hide/display the custom field based on the value selected in the characteristic selector with a few lines of javascript custom code added to the page.
[ www.hikashop.com/forum/product-category-...ased-on-variant.html](https://www.hikashop.com/forum/product-category-display/881420-have-specific-custom-fields-based-on-variant.html)

Another alternative would be to have two custom item fields, one for the frame selection and one for the color selection. In that case, in the color custom field, you can just select the frame custom field and its value "with frame" in the "displayed limited to" setting and you'll have the switch done for you automatically. The drawback though is that custom item fields can't change the price of the product... unless you combine it with a custom plugin, but that means more development and in that case, the custom javascript of my previous suggestion is simpler to implement.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329126](#329126) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329126 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi Nicolas.
Thank you for the reply.
That second solution you suggest could do the trick for me, but I'm not accostume to work with javascript in order to create a custom function. Could you give me an example script so I could change it to my case?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329128](#329128) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329128 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

Well, it would be something like that: Code:

&lt;script&gt; window.Oby.registerAjax("hkAfterUpdateVariant", "my_custom_function"); function my_custom_function() { if(document.getElementById('XXX').value == 'YYY') { document.getElementById('ZZZ').style.display = 'block'; } else { document.getElementById('ZZZ').style.display = ''; } } my_custom_function(); &lt;/script&gt;

where XXX is the id of the dropdown of the characteristic, YYY is the value of the dropdown for which you want to display the custom item field and ZZZ is the id of the div which includes all the custom item field's HTML so that it can be displayed / hidden.

The following user(s) said Thank You: [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329176](#329176) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329176 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,
I changed the script like this: Code:

&lt;script&gt; window.Oby.registerAjax("hkAfterUpdateVariant", "my_custom_function"); function my_custom_function() { if(document.getElementById('hikashop_product_characteristic_18').value == 'sim') { document.getElementById('hikashop_item_cordamoldura').style.display = 'block'; } else { document.getElementById('hikashop_item_cordamoldura').style.display = 'none'; } } my_custom_function(); &lt;/script&gt;

Now the custom field is hidden but it does not display when I select the dropdown 'sim' .
I am probably not entering the value right. Am I missing some text in the value?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329204](#329204) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329204 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

The YYY value is supposed to be an integer number corresponding to the characteristic_id of the value of the characteristic in the database.
You need to check the "value" attribute of the option in the HTML of the select on the page to get the correct value
As your website frontend is not accessible and you didn't provide a link to the product where you're doing your tests, I can't give you the exact value you should use.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329216](#329216) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329216 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

I tried with the integer number, but it didn't work.
Can I send you a private message with the access to the site?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329225](#329225) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329225 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

Yes. Please use our contact form for that and include a link to this thread for reference in your message:
[ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329264](#329264) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329264 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

I checked your page's HTML and javascript code and here is what I found:
[ monosnap.com/file/MU1MuAFBKy6D9Y1D5rcZUjJOWyTVYe](https://monosnap.com/file/MU1MuAFBKy6D9Y1D5rcZUjJOWyTVYe)
[ monosnap.com/file/r5MOwz3919lpSbIN7i12RoWqIJDaGO](https://monosnap.com/file/r5MOwz3919lpSbIN7i12RoWqIJDaGO)
As you can see, the sim option of the characteristic select with the id hikashop_product_characteristic_18 has the value 16 and not 2 like you set in the javascript code.
Change that and it should work better.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329303](#329303) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329303 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

I changed it, but it still doesn't work.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329306](#329306) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329306 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

You changed the line:
document.getElementById('hikashop_item_cordamoldura').style.display = 'none';
that you had before to:
document.getElementById('hikashop_item_cordamoldura').style.display = '';
[ monosnap.com/file/od4xnBohdS9m3ri0TuogsDOPXaV0lc](https://monosnap.com/file/od4xnBohdS9m3ri0TuogsDOPXaV0lc)
Because of that, both the if and the else of that function do the same thing and thus it's normal that the custom item field is always displayed. That was actually an error I had made in my initial code proposition that you had fixed when adding the first version of the javascript on your end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329322](#329322) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329322 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

Ok, I,changed it back now.
I have tried both and the result is allways the same.
I guess the else is working fine, but the if statement is not working.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329370](#329370) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329370 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

I have another mistake in my javascript.
You shouldn't add the double quotes around the function name.
So it should be like that: Code:

&lt;script&gt; window.Oby.registerAjax("hkAfterUpdateVariant", my_custom_function); function my_custom_function() { if(document.getElementById('hikashop_product_characteristic_18').value == '16') { document.getElementById('hikashop_item_cordamoldura').style.display = 'block'; } else { document.getElementById('hikashop_item_cordamoldura').style.display = 'none'; } } my_custom_function(); &lt;/script&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")**
- [![celsoclaro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47221-celsoclaro "View celsoclaro's Profile") Topic Author
- [ Offline](/forum/user/47221-celsoclaro)

Less More

- Posts: 10
- Thank you received: 0
-
-

5 years 8 months ago [\#329519](#329519) by [celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")  Replied by *[celsoclaro](/forum/user/47221-celsoclaro "View celsoclaro's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329519 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,
Thanks for your patience.
It's working well now.

But there is another problem. Tthe color of the frame continues to appear in the cart and at the checkout, even if you select no frame. I think it will appear on the invoice too.
Is it the same process for these cases?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14263
-
-

5 years 8 months ago [\#329523](#329523) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[dependent characteristics](/forum/26-product-category-display/901807-dependent-characteristics#329523 "-- url of the page with the problem -- :   arsquadrum.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.3.23  Hi, I have this problem: I'm selling printed pictures with the options with or without frame. When a client selects the option with frame another dropdown appears with the colors available. That's ok. But when a client selects the option without frame then the dropdown with the colors should not be visible.  I thought the dynamic characteristics would do that, but it doesn't. Am I doing something wrong? Or is there a solution for that?")*

Hi,

That's because even if you hide the custom item field, it is still in the form on the page, and thus when the form is submitted when you click on the add to cart button, the default value will be sent to the cart.

The solution here is that among the values of your custom field, you have an entry without anything entered in the "value" input field and that you select that value in the "default" setting of the custom field.
That way, the custom field selection will be discarded during the add to cart process unless the customer selects something else in the custom field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDE4MDctZGVwZW5kZW50LWNoYXJhY3RlcmlzdGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.337 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
