Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Only display products with images.

    If you look at the table:
    products

    in your database ... on these Products with out images, are you saying the field:
    products_image

    is empty or does it contain your image for the no_picture.gif ...

    So something like the module for the New Products, you can use your templates and overrides for:
    /includes/modules/new_products.php

    copying to your:
    /includes/modules/your_template_dir/new_products.php

    and add a condition to the SELECT statements ...
    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_image !=''
                               and   p.products_status = 1 " . $display_limit;

    and the other 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_status = 1
                               and p.products_image != ''
                               and p.products_id in (" . $list_of_products . ")";
    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!

  2. #12
    Join Date
    Nov 2010
    Posts
    52
    Plugin Contributions
    0

    Default Re: Only display products with images.

    Worked perfectly!!! You rock!!

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

    Default Re: Only display products with images.

    Thanks for the update that this works for you ...
    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!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Problem with attributes set with Display Only
    By canemasters in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 4 Apr 2012, 11:02 PM
  2. Display Products When Only 1 SubCategory?
    By WellCool in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 21 Apr 2009, 08:54 AM
  3. will only display 22 new products
    By traciboyle in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Oct 2008, 07:07 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