Open internal link in new window

Highlighted
New Member
2 0 1

I am using the Brooklyn theme. On the product pages and checkout, there is a legend that says

 

"Tax included. Shipping calculated at checkout."  with shipping being a hyperlink to my shipping policy page. However, when you click on that link it takes you to that page on the same window. I want it to open in a new window. How can I do that?

 

So far I have identified these pieces of code that seem to relate to this:

            {%- capture taxes_shipping_checkout -%}
                {%- if shop.taxes_included and shop.shipping_policy.body != blank -%}
                  {{ 'cart.general.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
                {%- elsif shop.taxes_included -%}
                  {{ 'cart.general.taxes_included_but_shipping_at_checkout' | t }}
                {%- elsif shop.shipping_policy.body != blank -%}
                  {{ 'cart.general.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
                {%- else -%}
                  {{ 'cart.general.taxes_and_shipping_at_checkout' | t }}
                {%- endif -%}
              {%- endcapture -%}

 

AND

 

        {%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
              <div class="product-single__policies rte">
                {%- if shop.taxes_included -%}
                  {{ 'products.general.include_taxes' | t }}
                {%- endif -%}
                {%- if shop.shipping_policy.body != blank -%}
                  {{ 'products.general.shipping_policy_html' | t: link: shop.shipping_policy.url }}
                {%- endif -%}
              </div>
            {%- endif -%}

What do I need to edit to have this shipping page open in a new window? It would be even better if the window was a bit smaller, kind of like a popup, don't know if that would be possible.

 

 
 
0 Likes
Highlighted
Shopify Expert
667 170 234

Hi, @Quijibu ,

This is Evita from On The Map.

 

Maybe this will help - https://help.shopify.com/en/themes/customization/navigation/open-external-links-in-new-browser

 

Best,
Evita

On The Map Marketing | Developing custom Shopify Sites & Apps is our thing

- Install our latest app Accessibly - Makes your store accessible for everyone, helps to avoid fines
- Inc 5000 | Shopify Parners | 20+ stores launched | 300+ active clients
- Need help with your Shopify store? Reach out to us!
0 Likes
Highlighted
New Member
2 0 1

This is an internal link, not an external.

 

Anyway, I found a way to do it using the "edit languages" section

Highlighted
New Member
2 0 0

Thanks for the idea. Very practical and easy to apply.

0 Likes
Highlighted
New Member
5 0 0

Hi Quiijbu,
What did you do in the "edit languages" to get the shipping information to open in a new window?

Thanks.
P

0 Likes
Highlighted
New Member
1 0 0

I realize this is an old post, but maybe someone has this question now as well. You don't have to alter the code. There is a default setting for the shipping dialog that is auto-added to the product page. You can toggle between open in a new page or open on same page. Unfortunately, I can't reacll where it is and I can't seem to find it now. I seem to recall I got to it from the policies page somehow (where you edit the shipping or returns policies, etc. Sorry for the half-answer. if I find it I'll come back her w/the info. I would think if you chat w/a Shopify support person he/she should be able to direct you to where this is. For any internal or external links you add yourself, there is a toggle for this setting in the link edit box.

0 Likes