Overview:
After a recent update, this is now possible to Unlink the Parent and add-on quantities. However, this will have to be on an entire product basis. So you cannot have 2 addon items on the same product where one of them has a linked quantity, but the other is unlinked. Whether you use Option 1 OR Option 2, the individual product it's self is either FULLY linked, or FULLY unlinked.
Option 1: Entire Store
If you would like to unlink the quantity for every addon product added through the Custom Product Options app across the entire site, then follow the steps below.
Step 1: Locate your file
Locate the product.liquid file where you pasted the first div in the installation process, hold ctrl and press F, and search for "w3".
Step 2: Paste the Code
Once you have found our app div, simply paste the following snippet directly below it.
<input type="hidden" name="_options_unlink">
Step 3: Replace the w3-product-options Code
Locate your w3-product-options.liquid file underneath the Snippets section of your shop.
Replace all of the code in the file with the following:
Please keep in mind if you have made any previous edits to the w3-product-options.liquid file then these will be over written.
{% if step == 'item_row_class' %}
{% if item.properties._options_group_id %}options-group group-id-{{ item.properties._options_group_id }}{% endif %}
{% if item.properties._options_hidden %} options-hidden{% endif %}
{% if item.properties._options_unlink %} options-unlink{% endif %}
{% endif %}
{% if step == 'money_line' %}
{% if item.properties._options_group_id and item.properties._options_hidden == nil %}
{% assign guid = item.properties["_options_group_id"] %}
{% for item2 in cart.items %}
{% if item2.properties._options_hidden and item2.properties["_options_group_id"] == guid %}
+ {{ item2.line_price | money }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
Option 2: By Product Tag
You may find that it is necessary to unlink the addons for some products on the shop, but maybe not for others. If this is the case, we can just wrap the hidden input in a conditional statement that checks the tags of the product. If the specified tag exists on the product, then the hidden input will be added and the quantities will unlink. If the specified tag does not exist, the input will not be added, and the quantities will remain linked.
Step 1: Locate your file
Locate the product.liquid file where you pasted the first div in the installation process, hold ctrl and press F, and search for "w3".
Step 2: Paste the Code
Once you have found our app div, simply paste the following snippet directly below it.
Keep in mind that Shopify tags are Case Sensative
{% if product.tags contains 'W3Unlink' %}
<input type="hidden" name="_options_unlink">
{% endif %}
Step 3: Replace the w3-product-options Code
Locate your w3-product-options.liquid file underneath the Snippets section of your shop.
Replace all of the code in the file with the following:
Please keep in mind if you have made any previous edits to the w3-product-options.liquid file then these will be over written.
{% if step == 'item_row_class' %}
{% if item.properties._options_group_id %}options-group group-id-{{ item.properties._options_group_id }}{% endif %}
{% if item.properties._options_hidden %} options-hidden{% endif %}
{% if item.properties._options_unlink %} options-unlink{% endif %}
{% endif %}
{% if step == 'money_line' %}
{% if item.properties._options_group_id and item.properties._options_hidden == nil %}
{% assign guid = item.properties["_options_group_id"] %}
{% for item2 in cart.items %}
{% if item2.properties._options_hidden and item2.properties["_options_group_id"] == guid %}
+ {{ item2.line_price | money }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}