Metafields - vendor

spoiledbratuk
Pathfinder
313 0 23

Hi, so I want to use meta fields to show on each product page , the brand (vendor) of each product , but I want this to be clickable , so customer can click vendor and be taken to the vendor collection (brand page) 

 

is this something that’s possible? 

Replies 10 (10)
Zqdo
Shopify Partner
803 32 60

If the brand is mentioned in the admin view for your products, it should be possible to show that link on the product page as well.

 

Do you have any experience coding in Shopify?

spoiledbratuk
Pathfinder
313 0 23

I have a small amount of experience, any help appreciated?

Zqdo
Shopify Partner
803 32 60

You'll want to place this code as a link on your product.liquid file wherever you want the title to appear:

 

{{ product.vendor | escape }}

 

 

If you need help setting this up, please feel free to send me an email at zqdo.tech@gmail.com.

 

Zqdo
Shopify Partner
803 32 60

Hello @spoiledbratuk, just wanted to check back in and see if you still needed any help. Thanks!

NomtechSolution
Trailblazer
1245 111 139

Yes you can create metafields from custom content in settings and then you need to add code in theme files in product.liquid o make it to work

Chat on WhatsApp: +923246370042
Need a Shopify developer? noumanmasood64@gmail.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
made4Uo
Shopify Partner
3757 709 1081

Hi @spoiledbratuk 

 

You can use a metaobject instead and provide the vendor name and vendor link. The call the metaobject in your theme. Unfortunately, this will be not a simple solution and you need to hire someone to do this for you

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
spoiledbratuk
Pathfinder
313 0 23

Ive managed to set a "brand" metafield  - showing vendor name , but I need to make this clickable , or if not possible , show vendor description (collection / brand description) do you think this would be possible?

 

Screenshot 2023-05-28 at 10.07.49.png

made4Uo
Shopify Partner
3757 709 1081

Hi @spoiledbratuk 

 

I recommend using metaobject so the link, brand name, and description are link together.  You use details/summary to show the information when you click on the brand name. 

 

Refer to the code here.

{% assign brands = shop.metaobjects['brands'].values %}
{% for brand in brands %}
<details>
  <summary>{{ brand.name }}</summary>
  <p>{{ brand.description }}<a href="{{ brand.link }}" target="_blank">More details</a</p>
</details>
{% endfor %}

 

If you are unable to make this work. I recommend hiring someone to do this for you

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
ZestardTech
Shopify Expert
5091 909 1212

Hello @spoiledbratuk 

Yes, it is possible to use meta fields to display the brand or vendor information on each product page in Shopify and make it clickable to navigate to the vendor collection or brand page. Here's a general guide on how to achieve this:

  1. Access the Shopify Theme Editor: Log in to your Shopify admin and go to "Online Store" > "Themes." Locate the active theme and click on the "Customize" button to access the Theme Editor.

  2. Open the product template settings: In the Theme Editor, find the section related to the product template. This section might be named "Product Pages," "Product Template," or something similar. Click on it to access the settings for the product template.

  3. Edit the product template code: Look for an option that allows you to edit the product template code or customize the layout. Typically, this option is labeled as "Edit Code" or similar.

  4. Locate the code responsible for displaying the brand or vendor: In the product template code, find the section that handles the display of the brand or vendor information. This section might include code such as {{ product.vendor }}.

  5. Wrap the vendor code with an anchor tag: Modify the code to wrap the vendor information with an anchor tag (<a> tag) to make it clickable. For example.

 

 

<a href="/collections/vendors?q={{ product.vendor | handle }}">
  {{ product.vendor }}
</a>

 

 

 

This code creates a link that points to the vendor collection or brand page based on the vendor's handle. The {{ product.vendor | handle }} filter converts the vendor name to a URL-friendly format.

6.Save and publish changes: Save the modifications to the product template code and publish the theme to make the changes live on your product pages.

After implementing the above code, the brand or vendor information on each product page will be clickable, and when clicked, it will take the customer to the corresponding vendor collection or brand page.

Please note that the specific code and steps may vary depending on your theme and customization. If you encounter any difficulties or need more specific instructions, consider reaching out to your theme developer or Shopify support for further assistance.

 

 



Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
spoiledbratuk
Pathfinder
313 0 23

Thankyou, the issue is the product doesnt have a vendor listed on it , so I would need to list the vendor as a metafield in order to display - and the metafield is what I am trying to get linked ?