MoisesZaragoza Posted August 22, 2005 Share Posted August 22, 2005 How would I change the products that get displayed on the page when I first get to OSCommerce? at the end of the day the code will be good Link to comment Share on other sites More sharing options...
M-Pro Posted August 23, 2005 Share Posted August 23, 2005 In summary the process, presuming you are comfortably skilled with PHP & MySQL, but unfamiliar with osCommerce then Make a copy and rename the file includes/modules/new_products.php let say you call it my_products.php edit my_products.php modify the sql query to select the products you do want edit index.php find every occurance of include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); change this to include(DIR_WS_MODULES . FILENAME_MY_PRODUCTS); beware there are two, basically the lower one used for the home page that displays on the page that shows the welcome, the second (higher) one when within a catagory that has subcategories, the new products module would show new products within this category. Just prior to this include '$new_products_category_id = $current_category_id;' is set that is used in the new products module with category display. Not sure whether you'd want to ONLY display my_products on the home page, if so only change the lower of the two includes. edit includes\filenames.php, add define (' FILENAME_MY_PRODUCTS', 'my_products.php'); In the admin system, in configuration/maximum value, there is a field called New Products Module, which controls how many products this module displays. If you do the change as above then it'd control new products and my_products, it'd be better for you to add a seperate configuration record for your new module. Which if you know mysql you'll easilly work out. I kind of did something along the lines you want at one of my recent site, although there is a contribution that you can use to show special offers on your home page as well as or instead of new products, what i wanted was -Display on home page only -Do not display within a category which has subcategories -Display as many special offers as available -If less than the admin max display parameter, back fill with best selling products -Display a logo & strapline text within the display - Draw fancy bozes around each product Check out www.scubanet.net Although I fully integrated this more fully than described above If you aren't comfortable with PHP&MySQL then in my opinion this change isn't simple plug and play. And my changes are very tailored to the style desired by this site, so I haven't posted it as an article. the following contribtion may help http://www.oscommerce.com/community/contributions,123 it describes how to do a more fully integrated solution and adds special offers to your homepage and within categories and I strongly suspect it used new_products.php as its foundation. I hope this helps M-Pro Link to comment Share on other sites More sharing options...
MoisesZaragoza Posted August 23, 2005 Author Share Posted August 23, 2005 Thanks that was very helpfull at the end of the day the code will be good Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.