Forums / Templates, Stylesheets, Page Layout / Need PHP code hack helper for make news products of month.

Need PHP code hack helper for make news products of month.

Locked

Views: 879

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
29 Oct 2008, 1:49 PM
#1
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Need PHP code hack helper for make news products of month.

Hi all,

I want to force the "New Products For "Month" that can load the first latest 12 product by three column of table that make the PHP array of that "4x3".

Searched the \includes\modules\new_products.php find it load the Data from DB.

But if want to make a new table that force it from random to static show all latest products of just total 12 products.

How to hack the PHP code?

Thank you of your time and wish you have a nice day.

Best Regards,
Jimmy Chan

29 Oct 2008, 3:19 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Need PHP code hack helper for make news products of month.

You shouldn't need to change the display code at all. The only thing you need to change is the randomizing code. I suggest you search for zen_get_random_ (don't remember the exact full name of the function) to find the file that needs editing.

The display can be set to three columns (the default) in admin.

At a quick look, this would be the code to edit:```php
if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);