+ Reply to Thread
Results 1 to 3 of 3

Thread: New Products (or products from any category) displayed in Nav Blocks

  1. #1
    Client
    Join Date
    Feb 2008
    Posts
    12
    Squirrelcart version
    v3.0.0

    New Products (or products from any category) displayed in Nav Blocks

    Hi

    Is there a way to display New Products in a Nav Block it a similar way the Category Preview works?

    Thanks

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Create a new nav block, and put this in the Content field:
    PHP Code:
    <?php
    $prod_info 
    sc_products(1,'category_preview_box',1,5);
    $Product_Rows $prod_info['rows'];
    if (!
    $Product_Rows) return false;
    include 
    sc_tpl('category_preview_main');
    ?>
    The above code will show products from the New Products category. To show products from another category, find the category's record_number in the control panel, and change the first parameter:
    PHP Code:
    $prod_info sc_products(1,'category_preview_box',1,5); 
    to match the category record_number:
    PHP Code:
    $prod_info sc_products(23,'category_preview_box',1,5); 

  3. #3
    Client
    Join Date
    Feb 2008
    Posts
    12
    Squirrelcart version
    v3.0.0

    Nav Blocks New Products

    Hi Jamie

    That's great, works well. Thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts