Editing New Product Display I'm setting up a virtual Comic Book/collectibles shop. Have found editing osCommerce to be pretty easy, but I'm having one problem that I just can not figure out.
Comic Books ship to shops on a weekly basis, so on the main page (/catalog/default.php) I want to display all the issues that are set for sale in a given week, that are enetered into the catalog to display in the middle of the page where it says "New Products for February". Below that section I'd like to continue to display upcoming Products that will be available in the future.
Right now only nine of the comics I've entered for this week display... I need to change that so that everything I've entered for this week, display. Whatever I have entered for a given week (and it will vary from week to week), needs to display.
In /catalog/products_new.php I changed $products_new_query_raw so that it looks like this:
$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_available, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and week(p.products_date_available) = week(now()) order by p.products_date_available DESC, pd.products_name";
First of all, is this the correct sql for pulling products that are available for the current week?
Next, how do I change the template parameters so that the main page displays all products available for the given week? I had thought that MAX_DISPLAY_PRODUCTS_NEW handled this, and at one point I had deleted all mention of it out of /catalog/products_new.php but I ended up creating errors on the page you access from 'What's New" link from the left hand column. I then restored all the MAX_DISPLAY_PRODUCTS_NEW parameters I removed earlier.
Can someone help me out here and point out how I can handle this? Thanks. |