Results 1 to 10 of 45

Threaded View

  1. #21
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Improved SiteMap Display

    Figured it out.. I was looking at the wrong query...

    around line 92 find this:
    Code:
    // add product links
          if (SHOW_PRODUCT_LINKS_ON_SITE_MAP == 'Yes') {
          $product_sql = "select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
          TABLE_PRODUCTS_TO_CATEGORIES . " p2c 
          where p.products_id = pd.products_id 
          and p.products_id = p2c.products_id 
          and p2c.categories_id = '" . $category_id . "' 
          order by p.products_sort_order, pd.products_name";
    Make the changes highlighted below.. The changes below do the following:

    1. Prevent the sitemap from displaying inactive products
    2. Changes the sorting of the products so that they are sorted by name (which IMO is more logical than the current order by)

    If you only want to stop the display of inactive products and retain the current sort order then do not make the change highlighted in blue
    Code:
    // add product links - CMJ 09/20/2009 modified to change sort order and exclude inactive products 
          if (SHOW_PRODUCT_LINKS_ON_SITE_MAP == 'Yes') {
          $product_sql = "select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
          TABLE_PRODUCTS_TO_CATEGORIES . " p2c 
          where p.products_id = pd.products_id 
          and p.products_id = p2c.products_id 
          and p2c.categories_id = '" . $category_id . "' 
          and p.products_status != '0'
          order by pd.products_name, p.products_sort_order ";
    Hope this helps someone else..
    Last edited by DivaVocals; 21 Sep 2009 at 04:33 AM.

 

 

Similar Threads

  1. v138a Why does my sitemap display disabled products?
    By corseter in forum General Questions
    Replies: 1
    Last Post: 9 Sep 2013, 06:32 PM
  2. SEO Quake - Sitemap:No - Using Google XML Sitemap
    By limelites in forum General Questions
    Replies: 2
    Last Post: 14 Feb 2012, 11:56 AM
  3. v139h XML sitemap (formerly goolge sitemap)
    By mighty midget in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Jan 2012, 04:30 PM
  4. Auspost improved display problem.
    By viss in forum Addon Shipping Modules
    Replies: 3
    Last Post: 21 Feb 2008, 11:09 AM

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