How can I make an author metafield clickable in my online bookstore?

How can I make an author metafield clickable in my online bookstore?

biblionepal
Excursionist
16 0 4

Hello Shopify support community members,  I am running an online bookstore using the Shopify platform and I have recently created a metafield for the "author" field in the product section. The metafield is currently visible in the product section, but it is not clickable. I am trying to create a functionality where if a viewer clicks on the author's name in a particular product, it will show all the books by that author that are available in my bookstore. I would greatly appreciate any assistance in making this metafield clickable and creating this functionality. Thank you.

Replies 3 (3)

spoiledbratuk
Pathfinder
321 0 27

Did you ever achieve this? 

GW_BAB
Shopify Partner
15 1 1

Did you ever work out how to do this? I'd like to learn!

Cristina_92
Shopify Partner
69 3 20

Hi @biblionepal !

 

I couldn't find an answer to your question.vendor.png

There is an alternative solution - using vendor or tags.

 

I used this code to make vendor clickable and show all the books by the author.

Go to Online Store -> Customize -> Choose any product -> click Add block -> choose Custom liquid. Add this code (you can write Author instead of Vendor):

 

{% if product.vendor.size > 0 %}
<b>Vendor:</b>
      {% for vendor in product.vendor %}
      {% assign vendor_coll = '/collections/all/' | append: vendor %}
        {{ vendor | link_to_vendor}}{% unless forloop.last %},{% endunless %}
   {% endfor %}
{% endif %}

 

 

ISBNExpress: Books Importer - import books by ISBN into your bookstore.
Boxi: Box Bundle Builder - create custom box builders.