Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    help question How Do I Randomize New Products On Index Page?

    I just finished adding a whole bunch of items, and they're all appearing on the index page (New Products For January) in the order I entered them.

    Due to the nature of the products, I have one photo for about 30 different items...so even though I added several different categories (each with their own photo), no matter how many times I refresh, I end up with a page full of identical items.

    Is there any way to set things so that it shows maybe one or two items from one category, but also one or two of another few categories? Even strictly alphabetical would be better than this...but I don't seem to be able to do that, either.

    Thank you!!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: How Do I Randomize New Products On Index Page?

    This is handled by date added
    One can edit the items added date in the database
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    You mean, I can manually set it so that this one was entered on 1/3/10 and that one was entered on 6/9/02?? Where??? Lot of work...but it's the only thing I can think of right now to randomize the screen.

  4. #4
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    I looked, but all I could find was the "Date Available" field. How do I change the date entered?

  5. #5
    Join Date
    Sep 2009
    Location
    California
    Posts
    148
    Plugin Contributions
    0

    Have a Drink Re: How Do I Randomize New Products On Index Page?

    Quote Originally Posted by DK_Scully View Post
    I looked, but all I could find was the "Date Available" field. How do I change the date entered?
    I think that this may do what you want... I had to change my 'Admin - Max Values - New Product Listing...' date to '0' (all products) but it does a nice job. Now every page gets a random pick from the entire catalog.

    http://www.zen-cart.com/forum/showth...400#post952400

    See #13.

  6. #6
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    I already had "New Product Listing - Limited to ..." set to 0. It still is pulling everything in the order it was entered. Is some other value affecting this, maybe?

  7. #7
    Join Date
    Sep 2009
    Location
    California
    Posts
    148
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    Quote Originally Posted by DK_Scully View Post
    I already had "New Product Listing - Limited to ..." set to 0. It still is pulling everything in the order it was entered. Is some other value affecting this, maybe?
    Not to sound harsh, but did you read the entire post? Ajeh basically shows the programming change needed to randomize the SELECT, there's no admin selections to change - it's a change to the actual php file.

  8. #8
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    I did, yes. I followed the link, looked at the php code...and was thoroughly confused. I am a php moron...give me good old html any day! This stuff looks like gibberish and gives me a headache! Is it possible to walk me through this in plain English?

  9. #9
    Join Date
    Sep 2009
    Location
    California
    Posts
    148
    Plugin Contributions
    0

    Have a Drink Re: How Do I Randomize New Products On Index Page?

    Quote Originally Posted by DK_Scully View Post
    I am a php moron...
    And I too am a php idiot... but if you know html then getting your feet wet with php should be easy. Literally, Linda has the line in the module to find, and the in the lower box, the change to be made.

    Just make sure that you backup the module first, then make the change and upload it.

    It'll take three minutes.

    From post 8:


    And if in the future someone else is reading this - there's two files and multiple places to update in /includes/modules/new_products and /sideboxes/whats_new

    this is an example in the new_products:

    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
    p.products_date_added, p.products_price, p.products_type, p.master_categories_id
    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
    where p.products_id = pd.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p.products_status = 1 order by rand()" . $display_limit;

    Watch that quotation mark! *chuckle*

    "I have faith in your ability to handle the situation." (<--- old manager line)

  10. #10
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: How Do I Randomize New Products On Index Page?

    Okay, I made the change in both places and uploaded them to their respective locations. It worked for the What's New module...but not for the New Products module. (And yes, I was careful not to mess with the ".) Now what??

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to show catagory new products index in products info page?
    By eric2008 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Jun 2008, 03:22 PM
  2. How to limit specials sidebox and randomize products?
    By YairOz in forum Addon Sideboxes
    Replies: 0
    Last Post: 29 Feb 2008, 11:13 PM
  3. Truly randomize New Products list? (they only seem randomized within a small group)
    By Yuchant in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Oct 2007, 01:31 PM
  4. New products/specials above my main index page - how can I fix this?
    By stormysar in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 May 2007, 02:46 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR