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

7.1 empty product category


Question

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

Add the following to Settings > Advanced > Code Injection > HEADER. You've already done this step but others will need to if they haven't. <script src="https://ajax.googleapis.com/ajax

Worked like a charm, and TYso much for adding the css id selector – next level 👏

Posted Images

2 answers to this question

Recommended Posts

  • 0

Add the following to Settings > Advanced > Code Injection > HEADER. You've already done this step but others will need to if they haven't.

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

Add the following to Store Settings > Advanced > Page Header Code Injection for the store page.

<script>

  $( ( ) => {
  
    /*
    
      add text to empty products pages
      
      SS Version : 7.1
      
      */
      
    const text = 'Please check back soon!';
    
    // do not change anything below, there be the borg here
    
    if ( ! $( '.view-list' ).length ) return;
    
    const $listGrid = $( '.list-grid' );
    
    if ( $listGrid.children ( ).length ) return;
    
    $( '<p id="tc-empty-products-pages-text">' +
    
      text +
      
      '</p>' )
      
      .appendTo ( $listGrid );
       
    } );
    
  </script>

This is for v7.1.

I've supplied a CSS id selector #tc-empty-products-pages-text if you want to style the text.

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 post

Create an account or sign in to comment

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


×
×
  • Create New...