Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default How do I turn off/comment out Item Name- Price sort links?

    Trying to disable the "Item Name-" "Price" sort links found on the top of each category page and not having much luck. Thanks.

    https://www.fuzztrip.com/index.php?m...=index&cPath=1

    Click image for larger version. 

Name:	Capturennnn.PNG 
Views:	68 
Size:	21.3 KB 
ID:	19278

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Are you using v157? or v157a?

    In v1.5.7a on line 85 of /includes/modules/responsive_classic/product_listing.php
    (line 62 in v157)
    you'll see this line:

    Code:
         $lc_text = zen_create_sort_heading($_GET['sort'], $col + 1, $lc_text);
    Put // at the beginning of that line to cause all those sort headings to not display.

    Of course, if you're not using responsive_classic, be sure to edit the file in the correct directory name matching your template.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Quote Originally Posted by DrByte View Post
    Are you using v157? or v157a?

    In v1.5.7a on line 85 of /includes/modules/responsive_classic/product_listing.php
    (line 62 in v157)
    you'll see this line:

    Code:
         $lc_text = zen_create_sort_heading($_GET['sort'], $col + 1, $lc_text);
    Put // at the beginning of that line to cause all those sort headings to not display.

    Of course, if you're not using responsive_classic, be sure to edit the file in the correct directory name matching your template.
    Thank you for the assistance, I am using 1.5.7., not 1.5.7a. I have done as instructed and it does remove the links, but the text remains. I tried finding it with developers tool kit to no avail.

    Click image for larger version. 

Name:	ytyfgfgf.PNG 
Views:	29 
Size:	15.3 KB 
ID:	19279

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Oh snap. Ya, I answered the wrong question!

    The column headings are set into the template data via the 5 lines after that section I mentioned.

    To turn off all those column headings from being output at all, comment-out the following lines by adding the // as shown:

    Code:
            if (($column_list[$col] != 'PRODUCT_LIST_IMAGE')) {
    //            $lc_text = zen_create_sort_heading($_GET['sort'], $col + 1, $lc_text);
            }
    
    
    //        $list_box_contents[0][$col] = array(
    //            'align' => $lc_align,
    //            'params' => 'class="productListing-heading"',
    //            'text' => $lc_text
    //        );
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Quote Originally Posted by DrByte View Post
    Oh snap. Ya, I answered the wrong question!

    The column headings are set into the template data via the 5 lines after that section I mentioned.

    To turn off all those column headings from being output at all, comment-out the following lines by adding the // as shown:

    Code:
            if (($column_list[$col] != 'PRODUCT_LIST_IMAGE')) {
    //            $lc_text = zen_create_sort_heading($_GET['sort'], $col + 1, $lc_text);
            }
    
    
    //        $list_box_contents[0][$col] = array(
    //            'align' => $lc_align,
    //            'params' => 'class="productListing-heading"',
    //            'text' => $lc_text
    //        );

    Hi, this is producing a page with no products (I have header/sidebox, etc). I tried first with the code I have and then compared the code you supplied and they seem to be the same.

    This is mine.

    PHP Code:
     if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
        
    $lc_text zen_create_sort_heading($_GET['sort'], $col+1$lc_text);
      }



      
    $list_box_contents[0][$col] = array('align' => $lc_align,
                                          
    'params' => 'class="productListing-heading"',
                                          
    'text' => $lc_text );
     } 
    And this is what I did.


    PHP Code:
     if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
      
    //  $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
      
    }


      
    //$list_box_contents[0][$col] = array(
                                          //'align' => $lc_align,
                                          //'params' => 'class="productListing-heading"',
                                          //'text' => $lc_text 
                                          //); 

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Quote Originally Posted by Fuzztrip View Post
    Hi, this is producing a page with no products (I have header/sidebox, etc). I tried first with the code I have and then compared the code you supplied and they seem to be the same.

    This is mine.

    PHP Code:
     if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
        
    $lc_text zen_create_sort_heading($_GET['sort'], $col+1$lc_text);
      }



      
    $list_box_contents[0][$col] = array('align' => $lc_align,
                                          
    'params' => 'class="productListing-heading"',
                                          
    'text' => $lc_text );
     } 
    And this is what I did.


    PHP Code:
     if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
      
    //  $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
      
    }


      
    //$list_box_contents[0][$col] = array(
                                          //'align' => $lc_align,
                                          //'params' => 'class="productListing-heading"',
                                          //'text' => $lc_text 
                                          //); 
    From the above it looks as though you mistakenly removed the last curly bracket from 'this is mine'.
    Simon

  7. #7
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Quote Originally Posted by simon1066 View Post
    From the above it looks as though you mistakenly removed the last curly bracket from 'this is mine'.
    Sorry, no it just got cut off when I copy/paste.

    PHP Code:
    if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
        
    $lc_text zen_create_sort_heading($_GET['sort'], $col+1$lc_text);
      }


      
    $list_box_contents[0][$col] = array(
                                          
    'align' => $lc_align,
                                          
    'params' => 'class="productListing-heading"',
                                          
    'text' => $lc_text 
                                          
    );
     } 

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    A blank page usually means you've triggered an error. Consult your /logs/ directory to read the error details.

    Blank Page troubleshooting
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    Quote Originally Posted by DrByte View Post
    A blank page usually means you've triggered an error. Consult your /logs/ directory to read the error details.

    Blank Page troubleshooting
    This is what I found, but I don't understand all of it...

    HTML Code:
    #1 sizeof() called at [/includes/templates/responsive_clone/common/tpl_tabular_display.php:30]
    
    #2 require(/includes/templates/responsive_clone/common/tpl_tabular_display.php) called at [/includes/templates/responsive_clone/templates/tpl_modules_product_listing.php:52]
    
    #3 require(/includes/templates/responsive_clone/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_clone/templates/tpl_index_product_list.php:109]
    
    #4 require(/includes/templates/responsive_clone/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:232]
    
    #5 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_clone/common/tpl_main_page.php:177]
    
    #6 require(/includes/templates/responsive_clone/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /includes/templates/responsive_clone/common/tpl_tabular_display.php on line 30.
    I don't know if I was correct in referring to the page as "blank". Everything is there, except the products.

    Click image for larger version. 

Name:	uuuuuuu.jpg 
Views:	31 
Size:	14.1 KB 
ID:	19280

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I turn off/comment out Item Name- Price sort links?

    The log message you posted suggests that the whole $list_box_contents array is damaged.

    The last comment-out instructions I posted tested fine when using the ResponsiveClassic template. The changes I noted simply avoid populating the array with the header row entries (so that they aren't displayed ... which is what you requested).

    If your template has made additional alterations to your customized product_listing.php module then it's possible you've introduce other errors.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h How to automatically turn off sold out categories
    By joew36 in forum General Questions
    Replies: 4
    Last Post: 24 Jul 2015, 01:17 PM
  2. Duplicate content in google via sort by price/item name
    By trinorthlighting in forum Basic Configuration
    Replies: 2
    Last Post: 8 Mar 2011, 08:55 PM
  3. How do I turn off the Item Weight listings?
    By MagicMan in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 18 Dec 2007, 01:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR