+ Reply to Thread
Results 1 to 6 of 6

Thread: Controlling products shown for v3 "Featured Products" content

  1. #1
    Client Beery_Asst's Avatar
    Join Date
    Feb 2006
    Location
    Houston, TX
    Posts
    189
    Squirrelcart version
    v3.4.0

    Controlling products shown for v3 "Featured Products" content

    I've been going through the 3.0.0 files. If I add the content navigation box for "Featured Products", the box adds and it contains a list of products.

    What button/option/selection controls what products are listed as a "Featured Product"?

    I could find no setting in the product records, no category, etc., not even a php referenced file in the navigation block for the content record.

    Beery

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    I split your post into a new thread as it wasn't directly related to the thread it was in.

    By default, the Featured Products Content record shows products from the category containing the most products. If you click the "Source" button for the content field on that Content record, you'll find this by default:
    PHP Code:
    [php <?php print sc_featured_products_content(); ?> /]
    If you want to specify what category to use, pass a category record number as the first parameter:
    PHP Code:
    [php <?php print sc_featured_products_content(85); ?> /]
    If you also want to control the number of products that are shown, pass that number as the 2nd parameter:
    PHP Code:
    [php <?php print sc_featured_products_content(85,8); ?> /]

  3. #3
    Client Beery_Asst's Avatar
    Join Date
    Feb 2006
    Location
    Houston, TX
    Posts
    189
    Squirrelcart version
    v3.4.0
    Thanks Jamie. That did the trick. I just created a "Featured Products" category not set to display and put what I wanted into it. Works great.

    Now, I need to start thumbing through the documentation to see if there are notes on these routines, etc.

    Beery

  4. #4
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0

    Thumbnail?

    Jamie, did everything per your instructions above - and works great. I'd like to take it to the next level...

    Can you add some code (based on the above instructions) to display the thumbnail image of what I am currently seeing in the featured product area. The "normal" image takes up too much space...

    Thanks

  5. #5
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    You should be able to do that by changing $Image to $Thumbnail_Image on line #12 of the featured_product.tpl.php template file. Change this:

    PHP Code:
    <img src="<?php print $Image['dyn'?>" width="<?php print $Image['width'?>" height="<?php print $Image['height'?>" alt="<?php print $Image['alt'?>" />
    to this:

    PHP Code:
    <img src="<?php print $Thumbnail_Image['dyn'?>" width="<?php print $Thumbnail_Image['width'?>" height="<?php print $Thumbnail_Image['height'?>" alt="<?php print $Thumbnail_Image['alt'?>" />

  6. #6
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0

    Thumbnail Image

    Thanks Jamie, your instructions worked great!

+ 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