kaso Posted December 12, 2008 Share Posted December 12, 2008 Hello, im new at oscommerce, and i would like have your expert advice :-) i have a website with OSC and we used to display products on the HOME PAGE (index.php) this product were in category 22 the category had the name "home page". Now i deleted from the admin category 22 by mistake, and we are not able to show up this product in home page any more. I tried to create a new category called "home page" as before in osc admin but DOES NOT WORK, probably the category has now another id different from 22. I tried to use PHP web admin to see the db scheme but im not expert and i cannot find another solution. My questions is. 01 - How can i show up product in home page again? 02 - Can i recreate a category 22? 03 - Or how can i change the osc's script and let it show up another category in home page? thanks again for your help and the great forum ciao kaso Link to comment Share on other sites More sharing options...
♥kymation Posted December 12, 2008 Share Posted December 12, 2008 The easiest way to do #1 is to do #2: change your new category to have an ID of 22. Look at the name you gave your new category, then go look in your database, in the categories_description table for that name under categories_name. Make a note of the categories_id for that row, then change it to 22. Now go to the categories table, find the number that you noted from the previous table, and change that to 22 as well. You can now add your products to this category and they should show up on your front page. #3: Changing the code will be more difficult. You have some custom code there that's showing that category on the front page. You would need to reverse-engineer that code to find out where it calls for the category, then find another way of determining that category. Possible, certainly, but that will require a fair knowledge of PHP amd SQL to work it out. Rgards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
mccdgxch Posted December 13, 2008 Share Posted December 13, 2008 Hello, im new at oscommerce, and i would like have your expert advice :-) i have a website with OSC and we used to display products on the HOME PAGE (index.php) this product were in category 22 the category had the name "home page". Now i deleted from the admin category 22 by mistake, and we are not able to show up this product in home page any more. I tried to create a new category called "home page" as before in osc admin but DOES NOT WORK, probably the category has now another id different from 22. I tried to use PHP web admin to see the db scheme but im not expert and i cannot find another solution. My questions is. 01 - How can i show up product in home page again? 02 - Can i recreate a category 22? 03 - Or how can i change the osc's script and let it show up another category in home page? thanks again for your help and the great forum ciao kaso Hi, I don't know if this is the right one for you but it display homepage category 22. Go to includes/application_top.php and look for this code (aroundline 456) // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } else { $cPath = ''; } you need to change the $cPath=''; to $cPath='22'; actually you can choose other number as well like 23, 24, 25....depending on what you have in your categories list. There is a number designate to your categories list. You can look at it in the database under categories_description and you will know which number designate to which list name. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.