A space to discuss online store customization, theme development, and Liquid templating.
I plan to sell a product that plays mp3 sound clips. The mp3 sound clips (<30s each) would be listed in a table format (columns: file name, listen-online link, download link, vote up/down buttons) and be available to download for free. The users should be able to up/down vote the sound files so the highest voted mp3 files are always on top.
What would be the best way to achieve this? Will appreciate any guidance.
Hello there
To list MP3 file links on a Shopify product page with a voting option, you can use the following steps:
{% for mp3 in product.custom_field_name %}
<li>
<a href="{{ mp3.url }}" download>{{ mp3.title }}</a>
<form action="/vote" method="post">
<input type="hidden" name="mp3_id" value="{{ mp3.id }}">
<button type="submit" name="vote">Vote</button>
</form>
</li>
{% endfor %}
hope this helps!