This is a discussion on How to show products in first page within the osCMax v2 Features Discussion forums, part of the osCMax v2.0 Forums category; Hi. I want to cancel the " new product in month...." feature on the first page and I want to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi. I want to cancel the " new product in month...." feature on the first page and I want to be able to show any product/s (multiple) on the first page. Can anybody tell me how to do that ? or..maybe how to cancel the date match on the new items in "month.." 10x Idan |
|
#2
| |||
| |||
| so you want every first page to load with a random selection of products?
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
|
#3
| |||
| |||
| YEs , That might work. Do you know how I can do that ? |
|
#4
| |||
| |||
| One simple way is to use the new products, but change it so that it picks products from a random month... in this case modify the SQL Old SQL: Code: $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and month(p.products_date_added) = month(now()) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
Code: srand(time());
$randmonth = (rand()%12);
$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and month(p.products_date_added) = ".$randmonth." order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
This is a simple hack, but it should do what you want. To make it a tad more complex you could 1) load a selection of products (say 50 products by month, by random selection of the fisrt letter in the products name... whatever you want to use to make the selection totally random) into an array 2) select MAX_DISPLAY_NEW_PRODUCTS (assume it will be under 50 3) display the second array
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
|
#5
| |||
| |||
| You might try this contribution that uses featured products that you set in the admin section. I used it on my old OSC site before I switched to oscmax and it was a really easy contribution to load. osCommerce: Featured Products
__________________ John |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| using Easy Populate & the products show in the 'New Products For %s" table? | neil | osCMax v2 Customization/Mods | 0 | 03-18-2007 04:50 PM |
| new products-link show all products, not 10 as I configure.. | mikkvais | osCommerce 2.2 Discussion | 0 | 08-23-2005 01:31 PM |
| Show manufacturer's name on product page, not category page | kellbot | osCMax v1.7 Discussion | 0 | 04-25-2005 04:57 AM |
| Show more than 10 products | PaintballGT | osCMax v1.7 Discussion | 4 | 04-05-2005 09:02 AM |