Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2006
    Posts
    56
    Plugin Contributions
    0

    Eliminating Category from New Products ... How?

    Hi:

    I have almost finished the store and I added a category to put there downloadables freebies. I uploaded all these files as final thing to finish the store. So they appears now like new products hidding the ones that I like to show and that are really the products to sell.

    I don't want to have these freebies in new products lists. So, how can I eliminate that category called Freebies from the New products of ... list?

    Thanks for helping.

    Greets!! :)

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

    Default Re: Eliminating Category from New Products ... How?

    Cheat ...

    Browse your products table in the database and sort on products_id ...

    Change the date added to older ... much much older ... now they are not new ...

    Also you can configure what "New" is ... in the Maximum Values settings there is:
    New Product Listing - Limited to ...
    Limit the New Product Listing to
    0= All Products
    1= Current Month
    7= 7 Days
    14= 14 Days
    30= 30 Days
    60= 60 Days
    90= 90 Days
    120= 120 Days
    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!

  3. #3
    Join Date
    Apr 2006
    Posts
    56
    Plugin Contributions
    0

    Re: Eliminating Category from New Products ... How?

    Quote Originally Posted by Ajeh
    Cheat ...

    Browse your products table in the database and sort on products_id ...

    Change the date added to older ... much much older ... now they are not new ...

    Also you can configure what "New" is ... in the Maximum Values settings there is:
    Hehe, I like to cheat a lot....

    Thanks for your help Ajeh!!
    Btw, Have you received the PM I sent some days ago?

    Regards!!

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

    Default Re: Eliminating Category from New Products ... How?

    I have not had time to hunt it down ... but it is on the list of fun things to do ...
    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
    Apr 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Eliminating Category from New Products ... How?

    Quote Originally Posted by Ajeh
    I have not had time to hunt it down ... but it is on the list of fun things to do ...
    It's Ok, just wondering! ;)

  6. #6
    Join Date
    Apr 2006
    Posts
    56
    Plugin Contributions
    0

    Re: Eliminating Category from New Products ... How?

    The cheat is done and all Freebies go away from New Products .... page list.

    Now I have another question.

    Can those products be hidden in some way when the "All Products" category is selected?

    They distract the attention of the buyers, I have more than 60

    Also, I would like they don't be showed either in the Best Seller Sidebox!!

    Actually I am using the best seller module by -joemama- that shows a different image with every refresh, instead of text.

    Regards!!

  7. #7
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Eliminating Category from New Products ... How?

    If they are all in the same category, you could simply do some tweaking of the sql queries for those pages to exclude that category.
    Take the products_all page for example:
    make an override copy of includes/templates/template_default/templates/tpl_products_all_default.php, then edit this line of code (line 38):
    Code:
      $products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;
    so that you put your category exculsion in there like this:
    Code:
      $products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . and p.master_categories_id != 'xx' $order_by;
    where xx is the category id of your freebies
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  8. #8
    Join Date
    Apr 2006
    Posts
    56
    Plugin Contributions
    0

    Re: Eliminating Category from New Products ... How?

    Quote Originally Posted by bunyip
    If they are all in the same category, you could simply do some tweaking of the sql queries for those pages to exclude that category.
    Take the products_all page for example:
    make an override copy of includes/templates/template_default/templates/tpl_products_all_default.php, then edit this line of code (line 38):
    Code:
      $products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;
    so that you put your category exculsion in there like this:
    Code:
      $products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . and p.master_categories_id != 'xx' $order_by;
    where xx is the category id of your freebies
    WOW. that works OK, but I've had to look for that SELECT query in the whole folders. It seems that you are talking of a zencart version previous to the 1.3.
    After making a search I found your suggest in includes/modules/pages/products_all/header_php.php
    Here is the code (line 23): I marked your suggest addin in bold-red with the category number set to 3 (my freebies category id.)

    Code:
     $products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, 
                                        p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call 
                                 FROM " . TABLE_PRODUCTS . " p 
                                 LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd 
                                 WHERE p.products_status = 1 
                                 AND p.products_id = pd.products_id 
                                 AND p.master_categories_id != '3' 
                                 AND pd.language_id = :languageID " . $order_by;
    Thanks a lot for the tip, now I only need to eliminate those damn freebies from the best-seller sidebox.

    Any ideas? Maybe the same thing... ?

    Regards!!

 

 

Similar Threads

  1. how to disable "new products" and "all products" from category sidebox?
    By phingoc in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 31 Mar 2014, 12:40 AM
  2. How to remove New/all products from the category?
    By hayadude in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Jun 2010, 03:23 PM
  3. How to prevent New Products from displaying on category page
    By JHouse in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Apr 2008, 01:07 PM
  4. How do I remove the new products from the category pages
    By philpalmer in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Oct 2006, 12:35 PM
  5. Eliminating some New Products from New Product Sidebox
    By Peace Freak in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Sep 2006, 05:22 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