How to add a link to the brand collection (on product page) | Dawn theme

Solved

How to add a link to the brand collection (on product page) | Dawn theme

beabebeloja
Tourist
8 0 1

Hello 🙂

 

Could anyone explain how to add a link to the brand collection (on product page) - Dawn theme?

 

Where it says "Isara" I would like it to be possible to add a direct link to the brand's collection.

 

Photo:

Sem nome (1920 × 1080 px) (2)2.png

Accepted Solution (1)
PageFly-Kate
Shopify Partner
1272 362 390

This is an accepted solution.

Hi @beabebeloja ,

 

I’m sorry to hear that. Please give it a try with this new solution:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/main-product.liquid->Find "{%- when 'text' -%}":

Step 3: Replace code here:

PageFlyKate_0-1675672794783.png

 

By below code:

 

 

<a href="/collections/{{- block.settings.text | handleize -}}"
                class="product__text{% if block.settings.text_style == 'uppercase' %} caption-with-letter-spacing{% elsif block.settings.text_style == 'subtitle' %} subtitle{% endif %}"
                {{ block.shopify_attributes }}
              >
                {{- block.settings.text -}}
              </a>

 

PageFlyKate_2-1675673037105.png

 

I hope it would help you
Best regards,

Kate | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 9 (9)

PageFly-Kate
Shopify Partner
1272 362 390

Hi @beabebeloja ,

 

This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/main-product.liquid->Find "{%- when 'text' -%}":

Step 3: Replace code here:

PageFlyKate_0-1675263679173.png

 

By below code:

<a href="/collections/vendors?q={{- block.settings.text -}}"
                class="product__text{% if block.settings.text_style == 'uppercase' %} caption-with-letter-spacing{% elsif block.settings.text_style == 'subtitle' %} subtitle{% endif %}"
                {{ block.shopify_attributes }}
              >
                {{- block.settings.text -}}
              </a>

PageFlyKate_1-1675263721108.png

 

I hope it would help you
Best regards,

Kate | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

beabebeloja
Tourist
8 0 1

It worked, but the link doesn't look good:

 

The link looks (for example): 

https://beabebe.com/collections/vendors?q=Little%20unicorn

 

And should look:

https://beabebe.com/collections/little-unicorn

 

Its possible to fix?

 

Thank you 🙂

GemPages
Shopify Partner
5625 1261 1243

Hello @beabebeloja ,

 

It's the GemPages Support Team and we are glad to assist you today!

 

I would like to give you the recommendation to support you so kindly follow the steps below:

 

1. Go to Online Store > Theme > Edit code of your current theme

GemPages_0-1675310423080.png


2. Open the main-product.liquid theme file


3. Find product__text

 

4. Change the {{- block.settings.text -}} code to

{{- block.settings.text | link_to_vendor -}}

GemPages_1-1675310628302.png

 

5. Open the base.css and add the below code to the bottom of the file in order to change style of the link

.product__info-wrapper .product__text > a {
    color: inherit;
    text-decoration: none;
}

 

If you require any further information, feel free to contact me.

 

Best regards,
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
beabebeloja
Tourist
8 0 1

Worked, but apears bellow to the product title "unknown vendor"

PageFly-Kate
Shopify Partner
1272 362 390

This is an accepted solution.

Hi @beabebeloja ,

 

I’m sorry to hear that. Please give it a try with this new solution:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/main-product.liquid->Find "{%- when 'text' -%}":

Step 3: Replace code here:

PageFlyKate_0-1675672794783.png

 

By below code:

 

 

<a href="/collections/{{- block.settings.text | handleize -}}"
                class="product__text{% if block.settings.text_style == 'uppercase' %} caption-with-letter-spacing{% elsif block.settings.text_style == 'subtitle' %} subtitle{% endif %}"
                {{ block.shopify_attributes }}
              >
                {{- block.settings.text -}}
              </a>

 

PageFlyKate_2-1675673037105.png

 

I hope it would help you
Best regards,

Kate | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

IlzeZD
Tourist
4 0 1

Thank You, this solution works (Shopify Dawn theme).

PageFly-Kate
Shopify Partner
1272 362 390

Hi @IlzeZD ,

I am so glad that my suggestion can help!!

Have a nice day!!

Kate

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

JBL_CANADA
Visitor
3 0 0

HI Kate,

 

I used your code, and it is not working. I am not sure what I am doing wrong. Basically, it doesn't change anything. 

If there any code you can use by adding custom liquid block?

 

스크린샷 2024-02-03 125512.png

 

I tried both by editing code or adding a custom block. Not working in both cases. 

Iris-Hannah
Visitor
2 0 0

Hi Kate - I'm trying to do this on Dawn theme 15.0.2 but can't find the main-product.liquid file in the Edit Code. 
Do you have an alternative solution for the new version of Dawn please?! 
Thanks