Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    96
    Plugin Contributions
    0

    Default Removing certain items from new products

    Is it possible to remove certain products from the New Products section?

    I have a load of older items i want to add, in their own category, but i dont when them to show in the New Products section.
    Is that in any way possible?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Removing certain items from new products

    Quote Originally Posted by znowflake View Post
    Is it possible to remove certain products from the New Products section?

    I have a load of older items i want to add, in their own category, but i dont when them to show in the New Products section.
    Is that in any way possible?
    Yes it is possible, product is identified as new based on the time duration setting in admin->configuration->Maximum Values
    New Product Listing - Limited to ...

    Setting as it relates to the information for the product and its products_date_added field.

    There are several ways that this can be modified/adjusted. One is by way of a SQL statement if you know that all of these product are going to be added to a single category where that category will be the master_categories_id for the product. If the product already exists in the database and is being "transferred" to this category, then the product should be moved instead of "reloaded" so that the existing products_id may remain but now just be in another category. This can be done through a move or through linking.

    A sql statement that could be applied for the case of all these "old" product being loaded into a single category with the category being the master_categories_id of say 15 as found for the number adjacent to the category name when viewing the catalog to say a date that is at the end of last year:

    Code:
    UPDATE products SET products_date_added = '2016-12-31' WHERE master_categories_id = 15;
    With that entered into the tools->Install SQL Patches area, all product that have a master_categories_id of 15 (regardless of whether they are linked to other categories) will have a date added value of Dec 31, 2016... That means effectively any historical entry (made prior to that date) or anything newer will have that date... There are other considerations on the WHERE side that can be applied to hone in that query.

    Ideally, one would consider performing such modifications/reviews on a backup of the database in phpMyAdmin and instead of actively doing an update, perform a select style query to identify if the returned results would be the ones desired to be updated... Ie.:
    Code:
    SELECT products_date_added, products_id FROM products WHERE master_categories_id = 15;
    This would provide the list of dates that were associated with the category and the specific product involved. From there, the WHERE statement could be refined and honed to return only the values that are desired to be modified and then that WHERE statement would replace the one of the UPDATE query above. Note, that when comparing date values through SQL there are other functions besides straight text comparison to be used.

    One last part to the above "testing", select statements do not provide any results from within the admin->tools->install SQL patches screen. Those queries must be run from a tool similar to phpMyAdmin.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2008
    Posts
    96
    Plugin Contributions
    0

    Default Re: Removing certain items from new products

    Ok all of this makes sense, except where to add it.
    Im used to going into the different files and adding things manually.
    Never used phpMyAdmin

 

 

Similar Threads

  1. removing new products, featured items, monthly specials boxes from center column
    By HighOptional in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 16 Nov 2012, 05:01 AM
  2. Removing the Add to cart button from certain products
    By rwhporg in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 14 Dec 2010, 12:20 AM
  3. Replies: 1
    Last Post: 14 Feb 2009, 04:22 AM
  4. New products list - removing items such as gift vouchers
    By livingstons in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Apr 2008, 09:46 PM
  5. Removing Items In Stock From Products
    By niteryder in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Feb 2007, 04:25 AM

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