Csc Posted December 22, 2004 Share Posted December 22, 2004 Hello. I?m trying to add 2,3 or maybe 4 new boxes like the categories box. I want the same results like this box, I mean, showing new sub-categories and with the same system. For example: Categories Subcategory->(5) Subcategory->(4) Subcategory->(5) ------------------------- Categories 2 Subcategory->(2) Subcategory->(3) Subcategory->(5) ------------------------- Categories 3 Subcategory->(5) Subcategory->(6) Subcategory->(15) ------------------------- Information Box Shipping & Returns Privacy Notice Conditions of Use Contact Us ------------------------- Quick search ...... 2,3 or more boxes, like the category box already exists in the default template in Oscommerce. I have been trying to do the next thing: http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/66 But with the categories box, the method is not the same, because there are so many variables that I need to change, but I don?t know what I need to change to add new boxes like this. Anybody can help me?. Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 22, 2004 Share Posted December 22, 2004 The method is the same. All you need to do is copy and rename the categories box file. Then you need to edit it to pull in the correct information. The categories box uses this code $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); to get the category names. You will need to change that to get the information you want. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Csc Posted December 22, 2004 Author Share Posted December 22, 2004 Thanks for your answer. Sorry, but I don?t know exactly the steps I need to follow to do that. Can you help me? I know, that I need to create the files like "categories2.php", "categories3.php"... but, It?s exactly the same code I need to use?. I mean, the code you have copy&paste, is there anything I need to change in this code?. It?s only this code, or I need to change any sql code or something?. Sorry for these questions, but I want to do the best as I can. Thanks. Link to comment Share on other sites More sharing options...
Csc Posted December 22, 2004 Author Share Posted December 22, 2004 Up!! Link to comment Share on other sites More sharing options...
cmbyrne Posted December 22, 2004 Share Posted December 22, 2004 Up!! <{POST_SNAPBACK}> I would like to do the same thing, if anyone could share the details. instead of having: Categories category 1 -> category 2 -> category 3 -> i would like 3 boxes: --------------- category 1 subcategory -> subcategory -> --------------- category 2 subcategory -> subcategory -> --------------- category 3 subcategory -> subcategory -> --------------- So basically have the boxes show what would be shown when you click on a category in the normal category box Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 23, 2004 Share Posted December 23, 2004 Thanks for your answer. Sorry, but I don?t know exactly the steps I need to follow to do that. Can you help me? I know, that I need to create the files like "categories2.php", "categories3.php"... but, It?s exactly the same code I need to use?. I mean, the code you have copy&paste, is there anything I need to change in this code?. It?s only this code, or I need to change any sql code or something?. Sorry for these questions, but I want to do the best as I can. Thanks. <{POST_SNAPBACK}> Are you get stuck at copying and renaming the file or chaging it's contents? If it is the latter, I probably won't be of too much else since it depends on what you are wanting to load and that is specific to your site. Do you know where the data is located in the database? Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Csc Posted December 23, 2004 Author Share Posted December 23, 2004 Are you get stuck at copying and renaming the file or chaging it's contents? If it is the latter, I probably won't be of too much else since it depends on what you are wanting to load and that is specific to your site. Do you know where the data is located in the database? Jack <{POST_SNAPBACK}> Well, sorry for my english. :blush: I?m not sure about the data in my database of my hosting, but I know that the code you have pasted is the same that I have. You mean that I need to duplicate the data in my database?, and duplicate the boxes calling them as "categories2.php", "categories3.php"... with its data duplicated in the database?. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.