Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Add a 'Continue Shopping' Link to shopping cart when products are in it


carrie1

Question

Site URL: https://www.skelafoods.com

Hey there!

Wondering if anyone knows how to add a 'Continue Shopping' button to the Shopping cart when there are existing products in it?

I'm using the 'Tremont' template.

site: www.skelafoods.com
Passcode: foods

The page is actually hidden as I'm currently developing it and we are going live asap...so the store page link is www.skelafoods.com/store-2 in case you need to add products to the cart to check.

THANK YOU!

 

Link to comment

11 answers to this question

Recommended Posts

  • 0
6 hours ago, BethanWright said:

Saw an old post sharing how to with code injection but I can't seem to access page settings for cart page to do the code injection. Any suggestions?

Can you share link to that post? We can check easier

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

Carrie, I've seen many posts on this and no solid answers. I checked with CS and the answer is that it is not possible to have the "Continue Shopping" button show up when there are items in the cart, which is completely inefficient. The agent said she would submit it to the Squarespace developers as a feature request. Our best bet is for everyone to shoot an email to customer support asking to add this feature. The more requests they receive on it, the more they'll consider it necessary. Please shoot them an email so we can get this added sooner than later. Cheers!

Link to comment
  • 0

There's a solution here, available as a low cost add-on that will add a Continue Shopping button to the Cart:

Cart UX extension for Squarespace

6127C0D3-83F3-457F-BB2F-CA9C62E5595B.thumb.png.df2f2b98be712509a6df2a33bd59865f.png

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi! I'm Paul, an independent Squarespace Consultant since 2007 and founder of SF Digital, building the features that Squarespace didn't include. Our mini-extensions allow you to pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect . Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment
  • 0

@Amsterixe

Back in November I did a version that replicates the text version SS does for an empty cart, for a cart with items. I've freshened it up.

Add the following to Settings > Advanced > Code Injection > HEADER.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Add the following to Settings > Advanced > Code Injection > FOOTER.

<script>

  $( ( ) => {
  
    /*
    
      add continue shopping message when cart has items
      
      Version       : 0.1d1
      
      SS Versions   : 7.0, 7.1
      
      Dependancies  : jQuery
      
      By            : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      */
      
    /*
    
      the following values are optional, if left empty default values will be
      provided. if the values have single quotes in them put a backslash before
      the single quotes. example: it's becomes it\'s
      
      */
      
    let notEmptyMessage = '';
    
    let continueShoppingLinkText = '';
    
    // do not change anything below, there be the borg here
    
    if ( location.pathname != '/cart' ) return; // bail if not cart
    
    if ( $( '.empty-message' ).length ) return; // bail if empty
    
    const selector = '[data-test=remove-item]';
    
    let continueShoppingLinkUrl = Static.SQUARESPACE_CONTEXT.websiteSettings
    
      .storeSettings.continueShoppingLinkUrl
      
    if ( ! continueShoppingLinkText )
    
      continueShoppingLinkText = 'Continue Shopping';
      
    if ( ! notEmptyMessage )
    
      notEmptyMessage = 'You have something in your shopping cart.';
      
    if ( continueShoppingLinkUrl != '/' )
    
      continueShoppingLinkUrl = '/' + continueShoppingLinkUrl;
      
    $( '<div class="not-empty-message">' +
    
      '<span>' +
      
        notEmptyMessage +
        
        '</span> ' + // space after the closing span
        
      '<a data-test="continue-shopping-link" href="' + continueShoppingLinkUrl +
      
        '">' +
        
        '<span>' +
        
          continueShoppingLinkText +
          
          '</span>' +
          
        '</a>' +
        
      '</div>' )
      
      .insertAfter ( '.cart-title' );
      
    $( document ).on ( 'click', selector, function ( ) {
    
      if ( $( selector ).length > 1 ) return; // bail if more than one
      
      $( '.not-empty-message' ).remove ( );
      
      $( document ).off ( 'click', selector );
      
      } );
      
    } );
    
  </script>

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

Link to comment
  • 0
22 hours ago, creedon said:

@Amsterixe

Back in November I did a version that replicates the text version SS does for an empty cart, for a cart with items. I've freshened it up.

Add the following to Settings > Advanced > Code Injection > HEADER.


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Add the following to Settings > Advanced > Code Injection > FOOTER.


<script>

  $( ( ) => {
  
    /*
    
      add continue shopping message when cart has items
      
      Version       : 0.1d1
      
      SS Versions   : 7.0, 7.1
      
      Dependancies  : jQuery
      
      By            : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      */
      
    /*
    
      the following values are optional, if left empty default values will be
      provided. if the values have single quotes in them put a backslash before
      the single quotes. example: it's becomes it\'s
      
      */
      
    let notEmptyMessage = '';
    
    let continueShoppingLinkText = '';
    
    // do not change anything below, there be the borg here
    
    if ( location.pathname != '/cart' ) return; // bail if not cart
    
    if ( $( '.empty-message' ).length ) return; // bail if empty
    
    const selector = '[data-test=remove-item]';
    
    let continueShoppingLinkUrl = Static.SQUARESPACE_CONTEXT.websiteSettings
    
      .storeSettings.continueShoppingLinkUrl
      
    if ( ! continueShoppingLinkText )
    
      continueShoppingLinkText = 'Continue Shopping';
      
    if ( ! notEmptyMessage )
    
      notEmptyMessage = 'You have something in your shopping cart.';
      
    if ( continueShoppingLinkUrl != '/' )
    
      continueShoppingLinkUrl = '/' + continueShoppingLinkUrl;
      
    $( '<div class="not-empty-message">' +
    
      '<span>' +
      
        notEmptyMessage +
        
        '</span> ' + // space after the closing span
        
      '<a data-test="continue-shopping-link" href="' + continueShoppingLinkUrl +
      
        '">' +
        
        '<span>' +
        
          continueShoppingLinkText +
          
          '</span>' +
          
        '</a>' +
        
      '</div>' )
      
      .insertAfter ( '.cart-title' );
      
    $( document ).on ( 'click', selector, function ( ) {
    
      if ( $( selector ).length > 1 ) return; // bail if more than one
      
      $( '.not-empty-message' ).remove ( );
      
      $( document ).off ( 'click', selector );
      
      } );
      
    } );
    
  </script>

Let us know how it goes.

This worked great for me. Thank you!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...