Results 1 to 10 of 17

Hybrid View

  1. #1
    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?

  2. #2
    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)

  3. #3
    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??

  4. #4
    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
    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??
    Lines 26 and 48, both? (line number may differ - but there is more than one place to change it)

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

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

    I figured it out, whoo hoo!! Since I'm using the Alyssa Pink template, I had to modify the Alyssa Pink new_products.php file instead of the original one. Now it's working just the way I wanted it to.

    Thank you so much for pointing me in the right direction, I really appreciate it!

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

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

    Okay, I thought I had it figured out. But now I lost the entire box of New Products on the index page, and I have no idea what I did wrong. Help???

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

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

    Just had a thought and am hoping that someone else jumps in on this...

    Now that the products are randomizing fine, I find that the products with the 'no image' icon are popping up and don't really look good - so... is there a 'case' or if { that one might be able to insert and have it skip products with no 'no image' file?

    Tag!

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

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

    You could add to the select statements:
    Code:
                               and p.products_image != ''
    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!

 

 

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

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