X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Want a WYSIWYG detailed description text area? (https://forum.x-cart.com/showthread.php?t=7407)

fearnothing 03-03-2007 03:10 AM

Re: Want a WYSIWYG detailed description text area?
 
Excellent Mod !!!

Any ideas on how to make this work for Manufacturers? I'm assuming /modules/manufacturers/manufacturers.tpl but the editor isn't showing when I'm including the code :(

(There's a tweak somewhere in the forum I found ages ago to allow HTML in manufacturers description, but I can't find it right now)

[Edit] I'm getting the script errors preventing me from using the advanced search too

Chris B 03-04-2007 07:28 AM

Re: Want a WYSIWYG detailed description text area?
 
here is the fix for the advanced search java error...

instead of:

<script language="JavaScript" type="text/javascript" src="/provider/wysiwyg.js">

included within single/home.tpl, right after the </HEAD>

use the following:

{if $section eq "main"}
<script language="JavaScript" type="text/javascript" src="/provider/wysiwyg.js">
{/if}



Chris

fanta 03-14-2007 05:33 AM

Re: Want a WYSIWYG detailed description text area?
 
Does this WYSIWYG works on Litecommerce?

Thank you
Gianni

fearnothing 03-15-2007 09:57 AM

Re: Want a WYSIWYG detailed description text area?
 
The code above works a treat for product descriptions on Gold (including the fix for advanced search java errors).

To enable WYSIWYG for static pages and manufacturers, this is what I did:

Copy contents of the zip file to /admin (NOT skin1/admin)

Add the following to skin1/admin/main/page_edit.tpl

Code:

<script language="JavaScript" type="text/javascript" src="wysiwyg.js"></script>

right after

Code:

        {rdelim}
{/if}
    document.pagesform.submit();
{rdelim}
</SCRIPT>


then amend the lines referring to 'pagecontent' at around line 70 like this:

Code:

<TD><TEXTAREA id="textarea1" name="pagecontent" cols="45" rows="20" id="wysiwyg1">{$page_content|escape:"html"|default:"Page$default_index content"}</TEXTAREA>
    <script language="javascript1.2">
  generate_wysiwyg('textarea1');
</script>


That takes care of static pages.

For manufacturers (assuming you have the description field freed up to accept HTML) edit

/skin1/modules/Manufacturers/manufacturers.tpl like this:

add the following code:
Code:

<script language="JavaScript" type="text/javascript" src="wysiwyg.js"></script>

right after this code at around line 135:
Code:

{if $administrate eq "" and $login ne $manufacturer.provider and $smarty.get.mode ne "add"}
{assign var="disabled" value=" disabled"}
{/if}


Then edit the lines relating to 'descr' at around line 156 to the following:
Code:

<TD><TEXTAREA id="textarea1" name="descr" rows="10" cols="60" style="width:80%"{$disabled} id="wysiwyg1">{$manufacturer.descr}</TEXTAREA>
<script language="javascript1.2">
  generate_wysiwyg('textarea1');
</script>


designtheweb 01-16-2008 11:16 AM

Re: Want a WYSIWYG detailed description text area?
 
This download doesn't seem to work, any ideas?

First download the file from http://www.ewdhosting.com/htmlarea.zip


All times are GMT -8. The time now is 08:39 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.