Creating a Return to Shopping button in Brooklyn Theme

Stacy_Dalton
New Member
1 0 2

When something is added to cart, our theme only shows a "Check Out" button.  We would like to add a "Return to Shopping" button as well.  We have attempted to add the code <a href="/collections/all" title=""Continue Shopping" class="btn">Continue Shopping</a> to the cart.liquid code, however no matter where we place this code it does not show in the cart.  We have also tried, <button name="button">Continue Shoping</button> as well as just a link using <a href="/collections/all" title=""Continue Shopping" class="btn">Continue Shopping</a> but again it will not show.  

Any help would be appreciated!!

Replies 5 (5)
alexscoots
New Member
1 0 1

Did this ever get resolved in the Brooklyn Theme?

Tomeiwines
New Member
7 0 0

I need this too.  Wondering why it was not there to begin with.  Need assistance on this  please!

 

Screen Shot 2021-03-11 at 3.20.59 PM.png

EspSuri
New Member
1 0 0

Did you ever get an answer or fix to this? I'm having the same problem.

PaulNewton
Shopify Partner
4878 412 1053

The cart drawer behaves like a modal users will click outside the cart panel to close it, or use the existing close button.

Putting another button immediately before a checkout button can be detrimental to conversions.

So avoid doing this unless you are prepared to a/b test or track the change for impact on conversions.

Merchants that want this customization can contact me at paull.newton+shopifyforums@gmail.com with this topic url, store url ,theme and any other use-case details.

Always backup themes and files before making code changes 

Quick fix

In snippets/ajax-cart-template.liquid by line=136 under the policies after the {% raw %}<p> tags add one the following the first is hard coded text the second is localized for using translations:

 

 

        <p>
          <button type="button" onclick="$('.js-drawer-close').click()" class="btn--full btn--secondary">Continue Shopping</button>
        </p>

 

 

 

Localized version requiring also editing the language files

 

 

 

        <p>
          <button type="button" onclick="$('.js-drawer-close').click()" class="btn--full btn--secondary">{%endraw%}{{ 'cart.general.continue_shopping' | t }}{% raw %}</button>
        </p>

 

 

 

In your locale files ,such as locales/en.default.json around line=104 ,  add the following  (note the comma)

 

 

      "continue_shopping": "Continue Shopping",

 

 

before:

 

      "update": "Update Cart",
      "checkout": "Check Out",

 

after

 

      "update": "Update Cart",
      "continue_shopping": "Continue Shopping",
      "checkout": "Check Out",

 

 

 

 

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
PaulNewton
Shopify Partner
4878 412 1053

@EspSuri 

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com