Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Sep 2009
    Posts
    14
    Plugin Contributions
    0

    Default Stop Disabled Products From Showing in New Products for Category?

    I've been setting up a music downloads category for my site and putting in the products. However, most of them are disabled until their licenses are valid. ZC still shows the disabled products in the New Products for >month< area. How do I fix that? It will frustrate the customers.

    Thanks,

    --Allen

  2. #2
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Having the same issue. Any suggestions?
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

  3. #3
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Read the other threads I could find regarding this issue. Am using v1.3.9, read several places this was a known issue in 1.3.8. Had already ensured that -

    Config>Stock>Products status in Catalog when out of stock should be set to =0

    Which should prevent out of stock and disabled products from EVER showing, correct?

    What'd I miss this time?
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Check that the file:
    /includes/modules/new_products.php

    is current and up to date and includes the reference to the products_status = 1

    in both of the SELECT statements ...

    Note: you may have a template and override file in:
    /includes/modules/your_template_dir/new_products.php
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Quote Originally Posted by Ajeh View Post
    Check that the file:
    /includes/modules/new_products.php

    is current and up to date ... Note: you may have a template and override file in:
    /includes/modules/your_template_dir/new_products.php
    Clean, new install of latest version, why would it not be current? No other version present in template overide directory.

    Version info is " * @version $Id: new_products.php 6424 2007-05-31 05:59:21Z ajeh $"
    and includes the reference to the products_status = 1

    in both of the SELECT statements ...
    Here is the 2nd SELECT statement -
    Code:
    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                      p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and p.products_id in (" . $list_of_products . ")";
    The first SELECT statement has this line at the end -
    Code:
    and   p.products_status = 1 " . $display_limit;
    Forgive my overwhelming ignorance, but should I just add that to the second statement as well. Cut and past after the final line? Obviously, I'm once again in WAY over my head. Don't want to screw things up trying to solve a fairly minor annoyance.

    Thanks for your help and your patience.
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Compare the original code from:
    /includes/modules/new_products.php

    with your templates and overrides:
    /includes/modules/your_template_dir/new_products.php

    Do they both have the products_status = 1 in both SELECT statements?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Quote Originally Posted by Ajeh View Post
    Compare the original code from:
    /includes/modules/new_products.php

    with your templates and overrides:
    /includes/modules/your_template_dir/new_products.php

    Do they both have the products_status = 1 in both SELECT statements?
    Thought I answered both of these questions in my earlier reply.

    There IS no second version of the file in /includes/modules/my_template_dir/new_products.php

    File is ONLY located in default template location.

    There is no products_status = 1 in the second SELECT statement. So how do I remedy that? Do I insert it? How so do I do that without messing up the syntax of the query?

    Keep in mind I am totally ignorant about php and SQL languages.
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

  8. #8
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Always try to keep my posts concise, Perhaps that sometimes makes them unnecessarily cryptic. Here are the lines of code I believe you are referring to -

    Code:
    if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
      $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                    p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and   p.products_status = 1 " . $display_limit;
    } else {
      // get all products and cPaths in this subcat tree
      $productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);
    
      if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
        // build products-list string to insert into SQL query
        foreach($productsInCategory as $key => $value) {
          $list_of_products .= $key . ', ';
        }
        $list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
    
        $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                      p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and p.products_id in (" . $list_of_products . ")";
      }
    }
    If I'm following you correctly, I need to add a reference to p.products_status = 1 " to the end of the second SELECT query. Exactly how should I do that? What is the correct syntax? Should I just copy and paste
    Code:
     and   p.products_status = 1 " . $display_limit;
    before the } ?
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Stop Disabled Products From Showing in New Products for Category

    You have me confused ...

    In v1.3.9h the version id reads:
    Code:
     * @version $Id: new_products.php 8730 2008-06-28 01:31:22Z drbyte $
    yet you say you are using v1.3.9h and not v1.3.8 yet you are showing the code for v1.3.8 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jan 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Stop Disabled Products From Showing in New Products for Category

    Well, that makes two of us that are confused . Downloaded zen-cart-v1.3.9h-full-fileset-10262010.zip on 2/05/2011. Just checked that, still have the zip file. Extracted the archive. It's the only copy of zencart on a fairly new laptop with no clutter or old files laying around. Installed as per directions. But when I just checked version info in admin, shows Zen Cart 1.3.8a.

    How in the XXX?! I've been operating under the delusion that I actually installed the version I downloaded. POLTERGEIST!

    'Splains the issue though, huh? A known bug in 1.3.8.
    Fine Handcrafted Boxes & Custom Woodworking
    bruce AT phoenixwoodworks DOT net
    http://www.phoenixwoodworks.net

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Disabled products showing up in new products list
    By amyleew in forum General Questions
    Replies: 1
    Last Post: 23 May 2010, 11:11 AM
  2. New Products For (month) showing disabled products
    By sublime19 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Nov 2008, 06:55 AM
  3. Products from disabled categories show up in New Products on home page.
    By peppyone in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 23 Jun 2008, 07:20 PM
  4. Stop products from being disabled?
    By yellow1912 in forum General Questions
    Replies: 14
    Last Post: 27 Aug 2007, 04:06 PM

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