Add Back button on top of product page, instead of bottom in Boundless theme

Highlighted
New Member
3 0 0

Hi,

 

I'm using the Boundless theme.

On the bottom of all product pages, there is a back button that takes you back to the collection of that product.

 

I would like to have this button as well on the top of the product page.

The reason is that I think that it is not user friendly to show the button al the way down the page. The button should be in clear sight and easily accessible.

 

I tried the answers from this question, but none of them are working.

https://community.shopify.com/c/Shopify-Design/How-to-add-quot-Back-to-Collection-quot-button-to-the...

 

Thanks in advance.

0 Likes
Shopify Partner
1907 320 403

Hi @mimport 

Follow this:

1. open section->product-template.liquid->find bellow code and move it just next to {% assign back_url = '/' %}

   <div class="back-button grid">
    <div class="grid__item"></div>
      <a href="{{ back_url }}" class="btn back-button__link">
        <span class="icon icon-arrow-left" aria-hidden="true"></span>
        <span>{{ back_text }}</span>
      </a>
    </div>

So it look like:

{% assign back_url = '/' %}
  {% assign back_text = 'products.product.back' | t %}
  {% if collection %}
    {% assign back_url = collection.url %}
    {% assign back_text = collection.title %}
  {% endif %}
  
  <div class="back-button grid">
    <div class="grid__item"></div>
      <a href="{{ back_url }}" class="btn back-button__link">
        <span class="icon icon-arrow-left" aria-hidden="true"></span>
        <span>{{ back_text }}</span>
      </a>
    </div>

Let me know if you need help

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes