WU8V Posted March 28, 2009 Share Posted March 28, 2009 I have been using HTML product descriptions because they just flat out look much nicer than the plain text version, but I would like to add more versatility and ease of updating and inserting. I would like to be able to save the HTML for each product in a subdirectory similar to how images are stored, and have the product description refer to that page that I have made. I have been semi successful in re-direction, but that statement takes over the whole browser window. I would like to be able to put the page that I have created into the same area that it would be if I just had typed in text to the products description window. The other part of this is that if I put in HTML to the product description area, then I try to use easypopulate to update the description, I cannot get anything to work with the resulting spreadsheet. I thought that if there was a simple redirect statement in there I could put it in with easypopulate and then have all the code in the separate directory. I think that there just has to be a way to do this, but I am at a loss as to how I can do it. Thanks for any advice.... BTW, I am using OSC 2.2 with only very light modifications so far. (easypopulate) Regards, Kurt Link to comment Share on other sites More sharing options...
spooks Posted March 28, 2009 Share Posted March 28, 2009 The html can be stored within database!! Just add a wysiwyg editor like FCKeditor for Product Descriptions etc http://addons.oscommerce.com/info/2900 its an easy install. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
WU8V Posted March 28, 2009 Author Share Posted March 28, 2009 The html can be stored within database!! Just add a wysiwyg editor like FCKeditor for Product Descriptions etc http://addons.oscommerce.com/info/2900 its an easy install. Thanks Spooks, this looks like a plan, although I have a question about the install.... I see a part of the config... // SECURITY: You must explicitly enable this "connector". (Set it to "true"). // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only // authenticated users can access this file or use some kind of session checking. $Config['Enabled'] = true ; Kind of confusing, first it says NOT do do this and then it does it. What is the alternative? Also, it looks like I do not have a /userfiles under my /catalog/ everything is right out there.... I think.. I this a directory that I have to create for this use only? or is this the base for the files that are already there? for example, I have /catalog/images, not /catalog/userfiles/images... Please forgive the innane questions, but I am pretty new at this, and I don't want to foul up what I have already done. Thanks and regards, Kurt Link to comment Share on other sites More sharing options...
WU8V Posted March 28, 2009 Author Share Posted March 28, 2009 Something is very wrong here... I think tha tI figured out most of this thing, but now, there is NOTHING below the line "product description English" There is no text box, no FCK, and not any of the stuff that was there before There mist be something wrong when I edited the /admin/includes/functions/html_output.php This is what I ADDED right after form area field that was already there //// //// // Output a form textarea field w/ fckeditor function tep_draw_fckeditor($name, $width, $height, $text='') { $oFCKeditor = new FCKeditor($name); $oFCKeditor -> Width = $width; $oFCKeditor -> Height = $height; $oFCKeditor -> BasePath = 'fckeditor/'; $oFCKeditor -> Value = $text; $field = $oFCKeditor->Create($name); return $field; } This would logically be the problem area, but I don't know enough about it to tell if there is something awry Thanks for any help Kurt Link to comment Share on other sites More sharing options...
spooks Posted March 29, 2009 Share Posted March 29, 2009 Yes u need to create user file dir check your edits again, you have created error, php is un-forgiving Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
WU8V Posted March 29, 2009 Author Share Posted March 29, 2009 Yes u need to create user file dir check your edits again, you have created error, php is un-forgiving After checking and rechecking, and re trying, I cannot come up with anything that is wrong with the code....but the admin screen either whites out completely, or as is my original issue, it starts, but stops just before the text editor portion of the "add new products" screen I copy and paste the code in the instruction, and recheck to make sure that I have not missed anything. The code in red is the line that I replaced in the private categories.php <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> The code in red is what I added to the private html_output.php Copyright © 2003 osCommerce Released under the GNU General Public License */ /require("fckeditor/fckeditor.php"); //// // The HTML href link wrapper function and // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= stripslashes($GLOBALS[$name]); } elseif (tep_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; } //// //// // Output a form textarea field w/ fckeditor function tep_draw_fckeditor($name, $width, $height, $text='') { $oFCKeditor = new FCKeditor($name); $oFCKeditor -> Width = $width; $oFCKeditor -> Height = $height; $oFCKeditor -> BasePath = 'fckeditor/'; $oFCKeditor -> Value = $text; $field = $oFCKeditor->Create($name); return $field; } //// // Output a form hidden field I realise that this should be an easy mod, but something is killing me on this one any help would be appreciated Link to comment Share on other sites More sharing options...
spooks Posted March 29, 2009 Share Posted March 29, 2009 You did`nt check that carfully!!! the instructions say add: require("fckeditor/fckeditor.php"); but you have added /require("fckeditor/fckeditor.php"); hence error!! :rolleyes: Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
WU8V Posted March 29, 2009 Author Share Posted March 29, 2009 Success... Thank you very much, I thought that I caught it all I must have commented that out at one time to get my admin panel back.. Now, to sort out the directory structure, but that's for another post if I can't figure it out. Thanks again, Kurt Link to comment Share on other sites More sharing options...
Rapidmodz Posted March 29, 2009 Share Posted March 29, 2009 wait I think if you want to use html in your product descrption You can just copy and paste the code in the box, Go on google type in html genertors and click on one then you can enter text,images colors ect then it gives you the html code for what you have typed and stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.