Guest Posted July 20, 2003 Share Posted July 20, 2003 Original Category Descriptions author by Brian Lowe. With my limited osc/php coding knowledge I have just carefully changed a few little things so that it may be compatible with the latest MS2 release. Have it running very well on my MS2 test store. Please back up your files before installing this mod. Feel free to test it out so that any changes or error may be applied if needed. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2003 Share Posted July 20, 2003 Ok change number one. 1) Link to contribution: http://www.oscommerce.com/community/contributions,1373 :oops: Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2003 Share Posted July 20, 2003 I got everything working except when I go to add a category description in the admin I get this error after I hit the "Preview" button Fatal error: Call to undefined function: tep_get_uploaded_file() in /home/cellar/public_html/catalog/admin/categories.php on line 484 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2003 Share Posted July 20, 2003 Hmmmm ok let me take a look at this: I believe its new upload instead of the tep_get_uploaded file thing. Let me restall my mod as is and then apply the already changes in my files. Then if its all ok ill upload the new fix. Looks like i didnt add the few changes to the insert file. Brb Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2003 Share Posted July 20, 2003 New "new_category.insert" file with the updated "new upload" definition instead of the old "tep_get_uploaded_file" one. Fix the catagory side error to: Locate the following 7 lines (approximately line 97): if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } REPLACE those 7 lines with the following 11 lines: if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $HTTP_POST_VARS['categories_image'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); $categories_image = ''; } else { if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } } New fixes: http://www.oscommerce.com/community/contributions,1373 PS This is only for the new MS2 (Milstone 2) release and have not tested it with anything else. Please back up your files before installing. Quote Link to comment Share on other sites More sharing options...
magicproshop Posted July 21, 2003 Share Posted July 21, 2003 Would you mind posting a url which shows what this contribution looks like? Thanks Quote Arizona Patent Services Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2003 Share Posted July 21, 2003 You can see my old MS1 one here: http://www.svflix.com/index.php?cPath=40 You can see at the top how the catagory "Animation" has a different title and a short description. Havent finished my MS2 store but here is a temporary catagory example: http://www.svflix.com/catalog/index.php?cPath=1 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2003 Share Posted July 21, 2003 Ok so if that replaces the tep_get upload then what replaces tep_get_local_path() Is this in the change log where to refernce i have been fighting a differnt contrib and trying to get it working with the latest snapshot. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2003 Share Posted July 21, 2003 That is from the old insert file: $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); That isnt need anymore cus there is a better way to do this in MS2 which is included in the new 1.5 fix. Try this: Replace this: // copy image only if modified $categories_image = tep_get_uploaded_file('categories_image'); // echo "categories_image['tmp_name'] is <b>" . $categories_image['tmp_name'] . "</b><br>"; // echo "categories_image['name'] is <b>" . $categories_image['name'] . "</b><br>"; $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($categories_image['tmp_name'])) { tep_copy_uploaded_file($categories_image, $image_directory); // echo "is_uploaded_file is true<br>"; $categories_image_name = $categories_image['name']; } else { $categories_image_name = $HTTP_POST_VARS['categories_previous_image']; } With This: // copy image only if modified $categories_image = new upload('categories_image'); $categories_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($categories_image->parse() && $categories_image->save()) { $categories_image_name = $categories_image->filename; } else { $categories_image_name = $HTTP_POST_VARS['categories_previous_image']; } Quote Link to comment Share on other sites More sharing options...
Farrukh Posted July 21, 2003 Share Posted July 21, 2003 Hi ilicious can you update the whole contirbution so that we might not miss any thing Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2003 Share Posted July 21, 2003 Hi ilicious can you update the whole contirbution so that we might not miss any thing I think i have done this in the new 1.5 fix. http://www.oscommerce.com/community/contributions,1373 Checked all the changes, applied them to my shop and seems to be running ok. Would like someone to test it out on their MS2 shop so i may track down any errors or anything i may o left out. Quote Link to comment Share on other sites More sharing options...
Ansolon Posted July 28, 2003 Share Posted July 28, 2003 Ok I setup it in last MS2 it seems it is working.... but there is one error Without subcategory it shows everything fine in main category page header and descp. However after addded sub category, the main category page header displays.... td class="pageHeading"> Las Chicas Subcategories are working fine. Moreover Adding a product to main category also shows Main categories headers and description normal.... I look codes for to find what causes the problem however I couldnt find. Quote Link to comment Share on other sites More sharing options...
Ansolon Posted August 7, 2003 Share Posted August 7, 2003 any news about the error? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2003 Share Posted August 10, 2003 Dunno really what it could be other than what was edited in the index.php file. 2) Locate the following line (approximately line 66): <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> Replace it with the following 9 lines: <td class="pageHeading"> <?php if ( (ALLOW_CATEGORY_DESCRIPTIONS == 'true') && (tep_not_null($category['categories_heading_title'])) ) { echo $category['categories_heading_title']; } else { echo HEADING_TITLE; } ?> </td> and 5) A few lines later (approximately line 241) there is a line that reads: <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> REPLACE it with the following 9 lines: <td class="pageHeading"> <?php if ( (ALLOW_CATEGORY_DESCRIPTIONS == 'true') && (tep_not_null($category['categories_heading_title'])) ) { echo $category['categories_heading_title']; } else { echo HEADING_TITLE; } ?> </td> Make sure your not missing a "<" in <td class="pageHeading"> also make sure your html above and below begins and ends evenly and isnt broken. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2003 Share Posted August 11, 2003 I posted this question in the general forum, but after further discussion I believe I am having the problem as a result of installing this mod. I was wondering if anyine who has installed this mod has had this problem. When I add new category images in the admin I get broken images. When I go back under the category images box it gives a path /tmp/phpZ5ff0J. In other words the category images and only the catgory images are trying to be stored in that directory which does not exist. Product images upload fine. and I have checked all of the permissions and they are fine, so thats not it. Any help would be greatly appreciated Quote Link to comment Share on other sites More sharing options...
Ansolon Posted August 12, 2003 Share Posted August 12, 2003 It has been resolved thanks Illicious, I didnt think this problem can solve easily like this... it is working Quote Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2003 Share Posted August 14, 2003 I have tried setting up this contrib but I cannot load the sql file into php admin. I end up with this error MySQL said: You have an error in your SQL syntax near 'true', 'false'), ', now())' at line 2 Is there anyway I can manually fix this? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2003 Share Posted August 14, 2003 If you have phpMyAdmin try adding this through the "Run SQL query/queries on database yourdatabase" window instead of uploading the sql file: INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Allow Category Descriptions', 'ALLOW_CATEGORY_DESCRIPTIONS', 'true', 'Allow use of full text descriptions for categories', '1', '19', 'tep_cfg_select_option(array('true', 'false'), ', now()); ALTER TABLE categories_description ADD categories_heading_title varchar(64) AFTER categories_name; ALTER TABLE categories_description ADD categories_description text AFTER categories_heading_title; Quote Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2003 Share Posted August 14, 2003 Thaks for the fast response. Worked a treat. Quote Link to comment Share on other sites More sharing options...
forgotten_soul Posted September 12, 2003 Share Posted September 12, 2003 hello all. unfortunately the html generated by the module is not fine enough for some browsers, and I'd like to use netscape 4.77 for administrative functions for some reasons. I've looked around in the html, and made the following changes, all in the lines which now come in the new_category_insert - file. now it works with netscape 4.77. new_category_insert : line 33 : addes a "<td>" after the "<tr>" for better html now reads : <tr><td><?php echo tep_draw_form('new_category', FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $HTTP_GET_VARS['cID'] . '&action=new_category_preview', 'post', 'enctype="multipart/form-data"'); ?></td> lines 79,80 : <tr> <tr> one of them deleted. around line 100 : </form></tr> I added a </table> here three lines before end of file (around 215) </form></tr> I also added a </table> here cu all, karlheinz meier[/code] Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2003 Share Posted September 12, 2003 Thanks for pointing this out. Almost forgot to update my shop for most browsers compatibilities. Quote Link to comment Share on other sites More sharing options...
workin Posted September 17, 2003 Share Posted September 17, 2003 (edited) hi to all i have a big problem .. when i insert an images for the directory ... i can't see it. In preview i can see the images but in the db don't exit ... can Anyone help me plz? Thk workin Edited September 17, 2003 by workin Quote Link to comment Share on other sites More sharing options...
mvp Posted October 5, 2003 Share Posted October 5, 2003 Does this mod support multiple languages? I have fields in the admin area to add the category name, category heading title, category description in English, German and Spanish, but it seems this information never makes it into the catalog_descriptions table in the mySQL database, only the product descriptions for the english version are visible in the cart. Did I miss something during the install of this mod??? Do I need to edit the categories.php file in admin/includes/languages for each language, besides the default language used by the cart? Thank you in advance for any help with this mod. You can see the problem at: Tea Herb Farm Quote Link to comment Share on other sites More sharing options...
Toe Knee<br> Posted October 7, 2003 Share Posted October 7, 2003 Hi, I'm getting Warning: Cannot modify header information - headers already sent by (output started at /home/jood/public_html/shop2/catalog/admin/includes/languages/english/categories.php:101) in /home/jood/public_html/shop2/catalog/admin/includes/functions/general.php on line 18after adding a category description, the description appears fine and nothing else seems broekn (from what I can see) just this. Does anyone know what I might've done wrong? Thanks in advance, Toe Knee Quote Link to comment Share on other sites More sharing options...
Guest Posted October 7, 2003 Share Posted October 7, 2003 I'm trying to install this contribution on my new soter using osCommerce MS2. The readme file says: <quote> 4) Locate the following line (approximately line 199): // We build the manufacturers Dropdown About 33 lines further down from it are two lines that read: ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> Insert the following 3 lines BEFORE the line that reads "?>": // Get the category name and description $category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); </quote> I can't find the line that says "We build the manufacturer's dropdown" in my index.php file. Can anyone help me locate where this code should go? I found three instances of this: ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> One was around line 60-something, one was in the 300s, and the third was around 241 (after installing all of the other code in the readme file). I inserted this code around 241 - is this correct? The code right above is: <quote> case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } </quote> Any help with this would be appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.