Results 1 to 10 of 23

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default New Product Box Sort Order

    Hello,
    I'm pretty sure this might be easy to set up but I just can't find it in admin. I want the new product box "New Products For [Month]" that is displayed on the main page and also on the subcategory pages to sort the products by date added instead of randomize. Newest added shows up first. How do I do that?
    Thanks.

  2. #2
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: New Product Box Sort Order

    I'm still looking into this. Does anyone know? Thanks.

  3. #3
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: New Product Box Sort Order

    Can someone let me know if this is possible or not through admin? If not possible through admin, then I guess I'm going to have to go through some code changes. Thanks.

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

    Default Re: New Product Box Sort Order

    You would need to alter the SELECT statement on the New Products and remove the randomizer ...

    The randomizer helps when you have 100s of products and 50+ are New and you want to display 6 so that it isn't always the same 6 ...
    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
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: New Product Box Sort Order

    Thanks Linda,
    I think I'm just going to leave that code alone. I can just wait until next month and everything will flow smoothly, besides, they can just look at the new products link to see the ones listed by date that I've changed already. Thanks for the reply

  6. #6
    Join Date
    May 2006
    Posts
    321
    Plugin Contributions
    0

    Default Re: New Product Box Sort Order

    I have the same question so I'm going to bring this back up. I removed the randomizer from the includes/modules/new_products.php file like this:

    PHP Code:
    }

    if (
    $new_products_query != ''$new_products $db->Execute($new_products_queryMAX_DISPLAY_NEW_PRODUCTS);

    $row 0;
    $col 0;
    $list_box_contents = array();
    $title '';

    $num_products_count = ($new_products_query == '') ? $new_products->RecordCount();

    // show only when 1 or more
    if ($num_products_count 0) {
      if (
    $num_products_count SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == ) {
        
    $col_width floor(100/$num_products_count);
      } else {
        
    $col_width floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
      }

      while (!
    $new_products->EOF) {
        
    $products_price zen_get_products_display_price($new_products->fields['products_id']);
        if (!isset(
    $productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);

        
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' $productsInCategory[$new_products->fields['products_id']] . '&products_id=' $new_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' $productsInCategory[$new_products->fields['products_id']] . '&products_id=' $new_products->fields['products_id']) . '">' $new_products->fields['products_name'] . '</a><br />' $products_price);

        
    $col ++;
        if (
    $col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS 1)) {
          
    $col 0;
          
    $row ++;
        }
        
    $new_products->MoveNext();
      } 
    But they are still not showing up in the date added...in fact, I guess they're still random because I don't see the same order every time I refresh. Did I miss something?

 

 

Similar Threads

  1. v139h Product sort order on New Products Page not working
    By jmsnyder23 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 4 Aug 2014, 02:34 PM
  2. v151 Product Sort within Category - having problems changing the default sort order
    By Don Wagner in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Oct 2012, 03:03 AM
  3. Change sort order in new products box on index.php page
    By jolewin in forum Customization from the Admin
    Replies: 2
    Last Post: 28 Mar 2011, 05:11 AM
  4. New Products Center Box Sort Order
    By jordandsa in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Sep 2009, 07:19 PM
  5. Specials Box - sort order
    By skype55 in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 24 Feb 2008, 03:47 AM

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