Astonished Man Posted December 9, 2005 Posted December 9, 2005 I would like to include the "What's New" info box on the home page of my site, which is not the same as the store front page. The page is a php page so I wanted use include to add the info box. I started with what was in the file for whats_new.php and tried to add the functions that it needed and connection to the database but I have just made a mess of it. I just know what all is needed from the layers of files used to make this work. Anyone know how to do this? Thanks
kgt Posted December 9, 2005 Posted December 9, 2005 require('catalog/includes/application_top.php'); See where that gets you. Contributions Discount Coupon Codes Donations
Astonished Man Posted December 9, 2005 Author Posted December 9, 2005 I have tried that in the following ways: To just include the file you get path errors because it is not calling from the level it is designed to. I created application_top2.php to change file paths. In picking through the code for all "require" statements to change the path. It became obvious that there are tons of lines in this file that isn't needed for just displaying the "what's new" info box and are only relevent to the functions of the store. I tried finding what might be relevent to "what's new" info box and just make a new file with just those commands but I'm not doing well in the sifting process.
kgt Posted December 9, 2005 Posted December 9, 2005 You can do it the old fashioned way: select p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " as p, ".TABLE_PRODUCTS_DESCRIPTION." as pd where products_status = '1' and p.products_id=pd.products_id and pd.language_id='".$languages_id."'' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW Replace the constants with appropriate values and build the box from scratch. Contributions Discount Coupon Codes Donations
Astonished Man Posted December 9, 2005 Author Posted December 9, 2005 I'll give that a shot. The problem is that I am more a designer than a coder. I'm learning php and can be a decent "re-arranger" of code. But writing from scratch is still a jungle to me. Thanks for the help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.