Is it possible to create a custom field for customers to sort products on?

MOAChat
New Member
2 0 0

Hello! We sell antiques and we would like to be able to sort on the age of the item. Is there any way to create a custom field for the year the item was made and make it possible for customers to sort on that? We are using the debut theme. Our site is still a work in progress.

0 Likes
JustinNJ
Tourist
27 0 2

You can tag each item with a year.

We have a brand filter on the category pages that relies on the tag.

I'm just unsure how to add it to the search screen. I would like to add this too if someone knows the answer.

This the code from the categories page I believe.

<!-- sort by vendor -->
<!-- <select name="brands" class="filters-toolbar__input" onChange="window.location.href=this.value">
<option value="{{ collection.url }}">Brands</option>
{% for tag in collection.all_vendors %}
<option value="{{ collection.url }}/{{ product_vendor | handle }}">{{ tag }}</option>
{% endfor %}

</select> -->

<!-- <select class="coll-filter">
<option value="">All brands</option>
{% for tag in collection.all_vendors %}
{% if current_tags contains tag %}
<option value="{{ tag | handle }}" selected>{{ tag }}</option>
{% elsif collection.all_tags contains tag %}
<option value="{{ tag | handle }}">{{ tag }}</option>
{% endif %}
{% endfor %}
</select> -->
<!-- -->

0 Likes