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

#   Linked parent-child product characteristics ddns

##

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

Less More

- Posts: 19
- Thank you received: 0
-
-

12 years 7 months ago -  12 years 7 months ago [\#149129](#149129) by [Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile")  *[Linked parent-child product characteristics ddns](/forum/31-development/866814-linked-parent-child-product-characteristics-ddns#149129 "-- url of the page with the problem -- localhost -- HikaShop version -- :HK Essential: 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : FreFox 27.0.1 -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I would like to implement linked dynamic comboboxes for product charateristics (ie parent-child drop-downs) using an approach similar to the reference listed below:  Being a novice HK user, I would like to ask a few questions before venturing in coding:  1. Child drop-down location. My understanding is that the child drop-down html code needs to be explicitely defined. If so, in which file should the child drop-down be inserted into (show&#95;block&#95;characteristics.php, option.php, ..) and how should the select html skeleton be structured? (Note that parents and children share the same class.)  2. jQuery. The child option drop-down should only reveal items that share the same class as their parent (ie opt1, opt2, etc.), the other items remaining hidden. Can the js module be written with jQuery? If so, where should the jQuery module be located at?  3. Upgrades. Currently, I am using Essentials v 2.3.0. How code resilient would those changes be in regard to future releases?  TIA for any clarifications and hints.")* was created by *[Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile")*

-- url of the page with the problem -- localhost
-- HikaShop version -- :HK Essential: 2.3.0
-- Joomla version -- :2.5.19
-- PHP version -- : 5.3.13
-- Browser(s) name and version -- : FreFox 27.0.1
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi, I would like to implement linked dynamic comboboxes for product charateristics (ie parent-child drop-downs) using an approach similar to the reference listed below:
[ Dynamic Dropdowns with charateristics &amp; options](https://hikashop.com/forum/development/865977-dynamic-dropdowns-with-charateristics-options.html)

Being a novice HK user, I would like to ask a few questions before venturing in coding:

*1. Child drop-down location*. My understanding is that the child drop-down html code needs to be explicitely defined. If so, in which file should the child drop-down be inserted into (show_block_characteristics.php, option.php, ..) and how should the select html skeleton be structured? (Note that parents and children share the same class.) Code:

&lt;!-- Parent drop-down skeleton: --&gt; &lt;select id="hikashop_product_characteristic_1" onchange="return hikashopUpdateVariant(this);"&gt;.. &lt;option value="10" class="opt1" selected="selected"&gt;Option 1&lt;/option&gt; &lt;option value="11" class="opt2"&gt;Option 2&lt;/option&gt; &lt;option value="12" class="opt3"&gt;Option 3&lt;/option&gt; ... &lt;/select&gt; .... &lt;!-- Child drop-down skeleton: --&gt; &lt;select id="hikashop_product_option_1" name="hikashop_product_option[1]" onchange="hikashopChangeOption();;"&gt; &lt;option value="0" class="opt1" selected="selected"&gt;None&lt;/option&gt; &lt;option value="100" class="opt1"&gt; Option 1.1&lt;/option&gt; ... &lt;option value="0" class="opt2" selected="selected"&gt;None&lt;/option&gt; &lt;option value="200" class="opt2"&gt; Option 2.1&lt;/option&gt; .... &lt;option value="0" class="opt3" selected="selected"&gt;None&lt;/option&gt; &lt;option value="300" class="opt3"&gt; Option 3.1&lt;/option&gt; ... &lt;/select&gt;

*2. jQuery.* The child option drop-down should only reveal items that share the same class as their parent (ie opt1, opt2, etc.), the other items remaining hidden. Can the js module be written with jQuery? If so, where should the jQuery module be located at? Code:

// jQuery module: function hikashopUpdateVariant(elSel) { .... };

*3. Upgrades*. Currently, I am using Essentials v 2.3.0. How code resilient would those changes be in regard to future releases?

TIA for any clarifications and hints.

Last edit: 12 years 7 months ago by [Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NjgxNC1saW5rZWQtcGFyZW50LWNoaWxkLXByb2R1Y3QtY2hhcmFjdGVyaXN0aWNzLWRkbnM/dG1wbD1tYXJrZG93bg==) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

12 years 7 months ago [\#149203](#149203) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Linked parent-child product characteristics ddns](/forum/31-development/866814-linked-parent-child-product-characteristics-ddns#149203 "-- url of the page with the problem -- localhost -- HikaShop version -- :HK Essential: 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : FreFox 27.0.1 -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I would like to implement linked dynamic comboboxes for product charateristics (ie parent-child drop-downs) using an approach similar to the reference listed below:  Being a novice HK user, I would like to ask a few questions before venturing in coding:  1. Child drop-down location. My understanding is that the child drop-down html code needs to be explicitely defined. If so, in which file should the child drop-down be inserted into (show&#95;block&#95;characteristics.php, option.php, ..) and how should the select html skeleton be structured? (Note that parents and children share the same class.)  2. jQuery. The child option drop-down should only reveal items that share the same class as their parent (ie opt1, opt2, etc.), the other items remaining hidden. Can the js module be written with jQuery? If so, where should the jQuery module be located at?  3. Upgrades. Currently, I am using Essentials v 2.3.0. How code resilient would those changes be in regard to future releases?  TIA for any clarifications and hints.")*

Hi,

1. All the code relative to the characteristics display is actually in the file administrator/components/com_hikashop/types/characteristic.php so that's probably where you want to do your modifications.

2. There is a high probability that jQuery is already loaded on your frontend. If that's not the case, you can easily load it with that line of PHP code:

3. If you modify directly the types/characteristic.php file, you'll loose your changes when you update HikaShop. An alternative is to do a characteristic display template override as explained in our developer documentation : [ www.hikashop.com/support/support/documen...r-documentation.html](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html)
That way, you won't loose your code when you update HikaShop.

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

12 years 7 months ago -  12 years 7 months ago [\#149215](#149215) by [Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile")  Replied by *[Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile")* on topic *[Linked parent-child product characteristics ddns](/forum/31-development/866814-linked-parent-child-product-characteristics-ddns#149215 "-- url of the page with the problem -- localhost -- HikaShop version -- :HK Essential: 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- : 5.3.13 -- Browser(s) name and version -- : FreFox 27.0.1 -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I would like to implement linked dynamic comboboxes for product charateristics (ie parent-child drop-downs) using an approach similar to the reference listed below:  Being a novice HK user, I would like to ask a few questions before venturing in coding:  1. Child drop-down location. My understanding is that the child drop-down html code needs to be explicitely defined. If so, in which file should the child drop-down be inserted into (show&#95;block&#95;characteristics.php, option.php, ..) and how should the select html skeleton be structured? (Note that parents and children share the same class.)  2. jQuery. The child option drop-down should only reveal items that share the same class as their parent (ie opt1, opt2, etc.), the other items remaining hidden. Can the js module be written with jQuery? If so, where should the jQuery module be located at?  3. Upgrades. Currently, I am using Essentials v 2.3.0. How code resilient would those changes be in regard to future releases?  TIA for any clarifications and hints.")*

Thank you for your explanations.

Meanwhile, I posted a new message about the same topic considering html5 data attributes as a filter option. This would offer better flexibility in case of multiple characteristics drop-downs:
[ www.hikashop.com/forum/product-category-...in-prod-charact.html](http://www.hikashop.com/forum/product-category-display/866841-how-to-add-html5-data-attributes-in-prod-charact.html)

Last edit: 12 years 7 months ago by [Helveticus](/forum/user/20683-helveticus "View Helveticus's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NjgxNC1saW5rZWQtcGFyZW50LWNoaWxkLXByb2R1Y3QtY2hhcmFjdGVyaXN0aWNzLWRkbnM/dG1wbD1tYXJrZG93bg==) 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.058 seconds

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

[](#top)
