Forums / Templates, Stylesheets, Page Layout / Latest Products actual #, not random?

Latest Products actual #, not random?

Locked

Started by bgourmet on 3 Mar 2008, 8:53 PM · Views: 1,532

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
3 Mar 2008, 8:53 PM
#1
bgourmet avatar

bgourmet

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Latest Products actual #, not random?

I have Latest Products set to 14 days but I don't want random items. I'd like for the exact last eight items I inputed to be what appears in the New Products for Month box. None of my items are ever the same so there would never be a problem of eight of the same thing, I just want only the last eight to be in there, not a random assortment of any time setting.

Thanks!

13 Apr 2008, 2:44 AM
#2
bgourmet avatar

bgourmet

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Latest Products actual #, not random?

Is there anyone who has worked something out for this?

13 Apr 2008, 4:52 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Latest Products actual #, not random?

The specific change that you would need to make to achieve what you want is in includes/modules/new_products.php file and you would over-ride this with a copy in your template named folder and change this line (near the top)

$display_limit = zen_get_new_date_range();

to be this

$display_limit = ' order by p.products_date_added desc limit 1';

This with setting your maximum # to be displayed to 8 in the admin should get what you want

Zen-Venom Get Bitten

13 Apr 2008, 3:43 PM
#4
bgourmet avatar

bgourmet

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Latest Products actual #, not random?

With that change and setting the # to 8 in admin, I get the last product I put in showing up in Latest Products, but no others. It will only show the last one but not the last eight.

13 Apr 2008, 3:44 PM
#5
bgourmet avatar

bgourmet

New Zenner

Join Date:
Feb 2007
Posts:
37
Plugin Contributions:
0

Re: Latest Products actual #, not random?

Never mind. I changed the 1 in the code you gave me to 8 and now it works. Thanks!