When we add a custom item to an order (using the add custom item button) it doesn’t show up on our pick list at all. I have been trying to figure out when, but I am stumped. I am showing the part of the code that adds products to our picklist below. Any help would be greatly appreciated!
{% assign hidden_variant_ids = "" %}
{% for line in line_items %}
{% for prop in line.properties %}
{% if prop.first == "_boldVariantIds" %}
{% assign hidden_variant_ids = hidden_variant_ids | append: prop.last | append: ',' %}
{% endif %}
{% endfor %}
{% endfor %}
{% for line_item in line_items %}
{% assign variant_id = line_item.variant_id | append: "" %}
{% if hidden_variant_ids contains variant_id %}{% continue %}{% endif %}
{% assign bold_item_price = line_item.price %}
{% assign bold_line_price = line_item.line_price %}
{% assign bold_var_ids = "" %}
{% assign price_index = "" %}
{% assign bold_qtys = "" %}
{% for prop2 in line_item.properties %}
{% if prop2.first == "_boldVariantIds" %}
{% assign bold_var_ids = prop2.last | split: "," %}
{% elsif prop2.first == "_boldVariantPrices" %}
{% assign price_index = prop2.last | split: "," %}
{% elsif prop2.first == "_boldVariantQtys" %}
{% assign bold_qtys = prop2.last | split: "," %}
{% endif %}
{% endfor %}
{% unless price_index == "" and bold_var_ids == "" %}
{% for price in price_index %}
{% assign bold_qty = 1 %}
{% if bold_qtys.length > 0 %}{% assign bold_qty = bold_qtys[forloop.index0] %}{% endif %}
{% assign bold_item_price = bold_item_price | plus: price %}
{% assign temp_price = price | times: bold_qty %}
{% assign bold_line_price = bold_line_price | plus: temp_price %}
{% endfor %}
{% endunless %}
{% assign bold_options = " " %}
{% for bold_option in line_item.properties %}
{% assign first_char = bold_option.first | slice: 0, 1 %}
{% assign opt_title = bold_option | first %}
{% assign opt_desc = bold_option | last %}
{% unless first_char == '_' or first_char=='_boldOptionLocalStorageId' or bold_option.first == 'master_builder' or bold_option.first == 'builder_id' or bold_option.first == '_boldOptionLocalStorageId' or bold_option.first == 'builder_info' or bold_option.last == "" or bold_option.last == blank %}
{% assign bold_options = bold_options | append: '
' | append: opt_title | append: ': ' | append: opt_desc %}
{% endunless%}
{% endfor %}
{% assign bold_options = bold_options | prepend: '' | append: "" %}
{% endfor %}
| Quantity | Product |
| - | - |
| {{ line_item.quantity }} x | **{{ line_item.title }}**<br> {{ bold_options }}<br> **{% if attributes.gift %} (gift) {% endif %}**<br> |