Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2006
    Posts
    9
    Plugin Contributions
    0

    Default Turn off random function in Featured Products

    Hello,

    I need to stop the products from rotating in the Featured Products box. The site only has a handful of products to sell, and I'd like them to consistently display in their default sort order -- not randomly rotate!

    Have searched through the Forum and found a very dated method of doing this - anyone have a new simple fix for accomplishing this?

    Running Zen Cart version 1.3.6
    DB Patch level 1.3.6

    Thanks in advance!

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Turn off random function in Featured Products

    You would need to re-write the code to not randomize the Featured Products ...

    Copy the file:
    /includes/modules/featured_products.php

    To your template and overrides directoy, then change the way the selected products are handled to not do the randmization ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Nov 2006
    Posts
    9
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    Linda,

    Thank you for the quick response! Unfortunately, I'm not versed well enough to re-write the code!

    Anyone other suggestions would be appreciated!

    Thanks again

  4. #4
    Join Date
    Nov 2006
    Posts
    3
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    Hi,
    simply do the following

    change

    PHP Code:
    [PHP]
    $featured_products $db->ExecuteRandomMulti($featured_products_queryMAX_DISPLAY_SEARCH_RESULTS_FEATURED); 
    to
    [/PHP]
    PHP Code:
    $featured_products $db->Execute($featured_products_queryMAX_DISPLAY_SEARCH_RESULTS_FEATURED); 
    and

    PHP Code:
        $featured_products->MoveNextRandom(); 
    to
    PHP Code:
        $featured_products->MoveNext(); 
    cheers

  5. #5
    Join Date
    Nov 2006
    Posts
    9
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    Deviation --

    That worked perfectly! Exactly what I needed.

    Thank you very much for the help!

  6. #6
    Join Date
    Dec 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    I wanted to stop the random feature for the new products on the main page. I used your code change and it worked perfectly. Thanks for your help. It took several hours to find this post which seems to always be the case with the forum. Does the new book or manual have answers like this in it?

    Thanks
    Blain

  7. #7
    Join Date
    Jul 2007
    Posts
    77
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    Thanks for the help with this!

  8. #8
    Join Date
    Oct 2005
    Location
    Connectiuct
    Posts
    63
    Plugin Contributions
    1

    Default Re: Turn off random function in Featured Products

    Thanks for the great instructions on "unrandomizing" the features. One follow-up... is there a simple way to instruct it how to sort those items? I can't figure out how they are currently sorted but doesn't seem to follow any ID/ title/ or such.

  9. #9
    Join Date
    Sep 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Turn off random function in Featured Products

    I don't know if you already figured out the answer to this but if not or for anyone else viewing this thread- here is how I changed it.

    Go to Configure, Featured Product
    Change the Display Product Display - Default Sort Order
    Choose the sort order that you want.

  10. #10
    Join Date
    Oct 2005
    Location
    Connectiuct
    Posts
    63
    Plugin Contributions
    1

    Default Re: Turn off random function in Featured Products

    JPrice,
    Thanks for your reply but the Configure/FeaturedProducts sorts the side box but not the center box for featured products.

    I figured out how to fix that and just added a contribution called Featured Items Sorted in the "Other Modules" section of downloads with a fix I created for this.

    I hope that helps others looking for a similar solution.

 

 

Similar Threads

  1. Help making Template
    By Shiftypow in forum Basic Configuration
    Replies: 8
    Last Post: 4 Jun 2007, 07:20 AM
  2. Product Listing - prev/next broken....?
    By oceano in forum Basic Configuration
    Replies: 13
    Last Post: 26 Sep 2006, 12:31 AM

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
  •