kels88 Posted August 4, 2011 Posted August 4, 2011 I am still fairly new to oscommerce (my first time actually) so I am learning as I go along. So I am wondering is there a way to add a modular or something to the left column menu to make it so when you rollover, the text actually changes. For example it says "MEN" right now and on rollover I want it to say "MASCULINE". A tut or explanation would be great! Thanks, Kelli
vishalchauhan Posted August 4, 2011 Posted August 4, 2011 you need to do some changes in some files... like includes/modules/boxes/bm_categories.php here is categories menu created. in top section you need to change the name of the category as you like and then use javascript function on it.. like onmouseover effect........ when user mouse over on the text it will change to other text Please take backup of your files before do changes suggested by me
kels88 Posted August 4, 2011 Author Posted August 4, 2011 you need to do some changes in some files... like includes/modules/boxes/bm_categories.php here is categories menu created. in top section you need to change the name of the category as you like and then use javascript function on it.. like onmouseover effect........ when user mouse over on the text it will change to other text Ok, thanks for pointing me in the right direction. However, I should have mentioned that I am fairly new to PHP as well, so I am not completely sure what to change. Ideally what I would like to have happen is the somehow add a modul or option where my client can go in and add a new category name and then the hover name. However, I would be okay if I can figure out a way to make it so the current menu items change what they say a on hover, but that she can still go in and add more categories even if they do not change on a roll over. I think I may be asking for too much here with the knowledge I have.
vishalchauhan Posted August 4, 2011 Posted August 4, 2011 hi so you want to add to backend so they can add short name for category find $category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']'); near about line no. 935 add after $category_inputs_sort_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_sort_name[' . $languages[$i]['id'] . ']'); now find $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_NAME . $category_inputs_string); near about line no. 940 add after $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_SORT_NAME . $category_inputs_string); you have to set constant TEXT_CATEGORIES_SORT_NAME from includes/languages/YOURLANGUAGE/categories.php file now same thing for edit category case case 'edit_category': find the code for categories_name and add categories_sort_name after it. now find categories_name in the same page and add categories_sort_name after it, wherever you find. dont forget to update your categories_description table..... add one field in table name categories_sort_name or whatever you like. try this dont forget to fetch the categories_sort_name in front end page........ in includes/modules/boxes/bm_categories.php page i think you can get it..... what i want to say.... Please take backup of your files before do changes suggested by me
kels88 Posted August 5, 2011 Author Posted August 5, 2011 hi so you want to add to backend so they can add short name for category find $category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']'); near about line no. 935 add after $category_inputs_sort_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_sort_name[' . $languages[$i]['id'] . ']'); now find $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_NAME . $category_inputs_string); near about line no. 940 add after $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_SORT_NAME . $category_inputs_string); you have to set constant TEXT_CATEGORIES_SORT_NAME from includes/languages/YOURLANGUAGE/categories.php file now same thing for edit category case case 'edit_category': find the code for categories_name and add categories_sort_name after it. now find categories_name in the same page and add categories_sort_name after it, wherever you find. dont forget to update your categories_description table..... add one field in table name categories_sort_name or whatever you like. try this dont forget to fetch the categories_sort_name in front end page........ in includes/modules/boxes/bm_categories.php page i think you can get it..... what i want to say.... Sorry for the ignorant question, but which file am i changing?
vishalchauhan Posted August 5, 2011 Posted August 5, 2011 oh sorry forgot it catalog/admin/categories.php so user can add categories short name with full name Please take backup of your files before do changes suggested by me
kels88 Posted August 28, 2011 Author Posted August 28, 2011 oh sorry forgot it catalog/admin/categories.php so user can add categories short name with full name Ok, I finally am able to work on this... I got everything so far, but I get stuck here: "now same thing for edit category case case 'edit_category': find the code for categories_name and add categories_sort_name after it. now find categories_name in the same page and add categories_sort_name after it, wherever you find. dont forget to update your categories_description table..... add one field in table name categories_sort_name or whatever you like. try this dont forget to fetch the categories_sort_name in front end page........ in includes/modules/boxes/bm_categories.php page i think you can get it..... what i want to say...." where is edit_categories? Also do you have any suggests for the rollover on the front end. I am new to PHP and most of the rollovers I have done have been in CSS or flash. Thanks for all your help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.