Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2012
    Posts
    4
    Plugin Contributions
    0

    Default Help with whats new sidebox.

    Quick question, on our zen cart store we have a special category called Whats' new. Is there a way to set the new products sidebox to only pull products from this category, instead of all of them? And also remove the time limit it keeps them there?

    I don't want to use the featured items as we have several items unrelated that are already featured.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Help with whats new sidebox.

    Sideboxes come in two parts:
    /includes/modules/sideboxes (and a subdirectory where your custom sideboxes are stored, based on your template name)
    /includes/templates/your-template-name-here/sideboxes

    THe whats_new sidebox could be cloned to do what you seek. Maybe call it "mynewprods". Adjust the SQL query as needed, and then the template only needs a few changes to DIV names etc since it'll just output whatever the sql pulls in.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

    Default Re: Help with whats new sidebox.

    Are the Products in your What's New Category using that categories_id as its master_categories_id or are they just Linked to that What's New Category?
    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!

  4. #4
    Join Date
    Sep 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Help with whats new sidebox.

    They will be linked into the Whats new category; which is category id 121

  5. #5
    Join Date
    Sep 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Help with whats new sidebox.

    I tried adding an and master_category_id = 121; statement with no luck.

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

    Default Re: Help with whats new sidebox.

    First, check the settings on your Maximum Values for what you are limiting your New Products to ...

    Next, using your templates and overrides, you should change the:
    /includes/modules/sideboxes/your_template_dir/whats_new.php

    and change the code to include the line in RED:
    Code:
      $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
                                                  p.master_categories_id
                               from (" . TABLE_PRODUCTS . " p
                               left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                               where p.products_id = pd.products_id
    and p.master_categories_id = 121
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and p.products_status = 1 " . $display_limit;
    Next, check that your products that are showing are using in the table:
    products

    the master_categories_id of: 121
    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!

 

 

Similar Threads

  1. Whats New Sidebox
    By aaronjmorgan in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 3 May 2014, 06:04 AM
  2. How to toggle between Whats New Box and Whats New on Main page?
    By Asdesign in forum Basic Configuration
    Replies: 0
    Last Post: 12 Aug 2009, 06:37 PM
  3. Sidebox - Whats new
    By noisebug in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Jan 2008, 11:18 PM
  4. whats new sidebox
    By g0d4lm1ty in forum Basic Configuration
    Replies: 2
    Last Post: 15 Dec 2006, 08:49 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