Ways to assign an additional attribute to a product?

Highlighted
Shopify Partner
11 0 2

Hi, 

 

I'm creating a store for a client that is selling records. 

I was wondering if there is a way that I can add a field such as 'Artist' so that underneath the product there is a link to all other tracks by that artist? But then also keep the main product title to go to that product? 

 

Is this possible? Could I do it with the 'Vendor' Attribute, but somehow modify vendor to 'Artist' ? 

 

Thanks 

Highlighted
Shopify Partner
9667 1212 3392

Hello, @cwilson 

Thanks for post 

yes, you can trys this.

https://ui-elements-generator.myshopify.com/pages/line-item-property

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Highlighted
Shopify Partner
2472 129 406

You will be much better to make sure each artist get's their own collection, a smart collection set to that artist name in a product tag is the basic approach.

 

To use vendor for this you would have to go through your theme, or your themes translations to swap the word vendor for artist.

Though there will still be a few places in the shopify frontend api that will show vendor no matter what such as

https://shopify.dev/docs/themes/liquid/reference/filters/url-filters#link_to_vendor

 

You can also use tags, 

Tags would let you use collection filter urls so /collections/all/artistname

There's also using metafields 

https://shopify.com/admin/bulk?resource_name=Product&edit=metafields.metadata.artist%3Astring

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
Highlighted
Shopify Partner
11 0 2

Hi Paul,

Thanks for your reply

I tried with the Metafield way but it wasn't displaying on the page 

I've attached this screenshot... Is there a way to make the A/T/O/S clickable? So that it links to that individual collection? 


Thanks 

 


Screenshot 2020-06-30 at 14.35.20.png

0 Likes
Highlighted
Shopify Partner
11 0 2

Hi, t hanks for your reply - Correcet me if I'm wrong, but this seems to be for customers to enter information to customise the product that they add to cart? 

0 Likes
Highlighted
Excursionist
33 4 9

Hey cwilson,

As I understand it, you want to add an Artist attribute to display a link to other products with that attribute. For this, I'd definitely recommend tags. Just tag all products with the artist and some kind of identifier (so you can find the Artist tag, as opposed to any other tags you have around). Then, wherever you want to find it, you'll need to loop through the product's tags and find that Artist tag, and display the unique part.

For instance, you can say "All tags starting with * are Artist tags". Then, when you check the product's tags in Liquid, just look for the tag beginning with *, and there you go!

The bonus of this is that you can then link to a collection pre-filtered with that tag really easily. Try checking the result of this: https://shopify.dev/docs/themes/liquid/reference/filters/url-filters#link_to_add_tag on the collection page - that's an example of the collection filtered by the tag. 

I noticed you're trying to link out part of the product title/image to the artist page. There are ways to do this, you just have to position an HTML <a> over the part you want to link. For instance, you'll see something like <a href="{{ product.url }}">{{ product.title }}</a> where that product title is. The <a> is the link, just use one of those with the link you generated when you linked to the artist collection. I do recommend adding a separate bit of text for this though, because customers tend to expect the product title and image to link to the product.

Metafields are a bit trickier to set up and can't link out as easily. If you're down to use Vendor for this, it'll have much the same effect as a tag, you just need to change the places in your theme it says "Vendor" to "Artist". I wouldn't consider line item properties, that's a very different kettle of fish. Let me know if this all makes sense. 

Highlighted
Shopify Partner
2472 129 406

@cwilson wrote:

I tried with the Metafield way but it wasn't displaying on the page 


You have to reference the metafields in liquid for the values to be rendered

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com