Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Whats new sidebox to display 6 most recent items

    Just wondering how to get the whats new sidebox to display the 6 most recent items added to my store?

    This is the link to my site : https://www.toyzeum.com/store/


    the sidebox displays old items ive added but not in the order of the most recent added.... and for some reason it only displays 3 products instead of 6 products. Can anyone tell what is wrong within the script?

    the code I am using as follows:

    "<?php
    /**
    * whats_new sidebox - displays a random "new" product
    *
    * @package templateSystem
    * @copyright Copyright 2003-2010 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: whats_new.php 15880 2010-04-11 16:24:30Z wilt $
    */






    // display limits
    // $display_limit = zen_get_products_new_timelimit();
    // $display_limit = zen_get_new_date_range();
    $orderBy = 'order by p.products_date_added desc LIMIT 0 , 6';
    $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_date_added, 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 pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p.products_status = 1 " . $orderBy;






    // $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
    $random_whats_new_sidebox_product = $db->ExecuteRandomMulti($random_whats_new_sidebox_product_query, MAX_RANDOM_SELECT_NEW);

    if ($random_whats_new_sidebox_product->RecordCount() > 0 ) {
    require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
    $title = BOX_HEADING_WHATS_NEW;
    $title_link = FILENAME_PRODUCTS_NEW;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);"


    the sidebox displays old items ive added but not in the order of the most recent added.... and for some reason it only displays 3 products instead of 6 products. Can anyone tell what is wrong within the script?

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

    Default Re: Whats new sidebox to display 6 most recent items

    Go to your Configuration ... Maximum Values ... and set the:
    Random New Products for SideBox
    Number of random NEW products to rotate in the sidebox
    Enter the number of products to display in this sidebox at one time.

    How many products do you want to display in this sidebox?
    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: v1.5.5]
    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. Selecting the most recent order status...
    By retched in forum Contribution-Writing Guidelines
    Replies: 8
    Last Post: 12 Feb 2012, 03:09 PM
  2. Displaying most recent blog entry on store main page
    By MeltDown in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jul 2011, 05:07 PM
  3. Upgrading Zen 1.3.0 to most recent version
    By gypsynightshade in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 30 Jan 2009, 07:10 PM
  4. whats new sidebox
    By g0d4lm1ty in forum Basic Configuration
    Replies: 2
    Last Post: 15 Dec 2006, 08:49 PM

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